File: remove-appdirs.patch

package info (click to toggle)
python-cobra 0.29.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,512 kB
  • sloc: python: 14,703; xml: 12,841; makefile: 137; sh: 32
file content (38 lines) | stat: -rw-r--r-- 965 bytes parent folder | download
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
--- a/setup.cfg
+++ b/setup.cfg
@@ -53,7 +53,6 @@
 [options]
 zip_safe = True
 install_requires = 
-	appdirs ~=1.4
 	depinfo ~=2.2
 	diskcache ~=5.0
 	httpx ~=0.24
@@ -61,6 +60,7 @@
 	numpy >=1.13
 	optlang ~=1.8
 	pandas >=1.0,<3.0
+	platformdirs
 	pydantic >=1.6
 	python-libsbml ~=5.19
 	rich >=8.0
--- a/src/cobra/core/configuration.py
+++ b/src/cobra/core/configuration.py
@@ -8,7 +8,7 @@
 from textwrap import dedent
 from typing import Optional, Tuple, Union
 
-import appdirs
+import platformdirs
 
 from ..exceptions import SolverNotFound
 from ..util.solver import interface_to_str
@@ -97,7 +97,7 @@
     def _set_default_cache_directory(self) -> None:
         """Set the platform-dependent default cache directory."""
         self.cache_directory = pathlib.Path(
-            appdirs.user_cache_dir(appname="cobrapy", appauthor="opencobra")
+            platformdirs.user_cache_dir(appname="cobrapy", appauthor="opencobra")
         )
 
     @property