File: pr1970.patch

package info (click to toggle)
python-miio 0.5.12-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,888 kB
  • sloc: python: 23,425; makefile: 9
file content (66 lines) | stat: -rw-r--r-- 1,638 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From 59de2285b678d2a62ecd6178f3670a8e95775b83 Mon Sep 17 00:00:00 2001
From: Alexandre Detiste <alexandre.detiste@gmail.com>
Date: Sun, 22 Sep 2024 17:52:10 +0200
Subject: [PATCH 1/2] replace deprecated appdirs with platfromdirs fork
Forwarded: https://github.com/rytilahti/python-miio/pull/1970

--- a/pyproject.toml
+++ b/pyproject.toml
@@ -34,7 +34,7 @@
 zeroconf = "^0"
 attrs = "*"
 pytz = "*"
-appdirs = "^1"
+platformdirs = "*"
 tqdm = "^4"
 netifaces = { version = "^0", optional = true }
 android_backup = { version = "^0", optional = true }
@@ -75,13 +75,14 @@
 line_length = 88
 forced_separate = "miio.discover"
 known_first_party = "miio"
-known_third_party = ["appdirs",
+known_third_party = [
   "attr",
   "click",
   "construct",
   "croniter",
   "cryptography",
   "netifaces",
+  "platformdirs",
   "pytest",
   "pytz",
   "setuptools",
--- a/miio/integrations/vacuum/roborock/vacuum.py
+++ b/miio/integrations/vacuum/roborock/vacuum.py
@@ -11,7 +11,7 @@
 
 import click
 import pytz
-from appdirs import user_cache_dir
+from platformdirs import user_cache_dir
 
 from miio.click_common import (
     DeviceGroup,
--- a/miio/integrations/vacuum/roborock/vacuum_cli.py
+++ b/miio/integrations/vacuum/roborock/vacuum_cli.py
@@ -10,7 +10,7 @@
 from typing import Any, List  # noqa: F401
 
 import click
-from appdirs import user_cache_dir
+from platformdirs import user_cache_dir
 from tqdm import tqdm
 
 from miio.click_common import (
--- a/setup.py
+++ b/setup.py
@@ -51,7 +51,7 @@
 
 install_requires = \
 ['PyYAML>=5,<7',
- 'appdirs>=1,<2',
+ 'platformdirs',
  'attrs',
  'click>=8',
  'construct>=2.10.56,<3.0.0',