summarylogtreecommitdiffstats
path: root/xdg-base-dirs.patch
blob: 51a92ee47778c29b5402b0f6001e6745d488dfe9 (plain)
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
diff --git a/pyproject.toml b/pyproject.toml
index 7bb1dfd..b1bf31b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -24,14 +24,14 @@ authors = [
     {name = "Lyz", email = "lyz@riseup.net"},
 ]
 license = {text = "GPL-3.0-only"}
-requires-python = ">=3.7"
+requires-python = ">=3.10"
 dependencies = [
     "click>=8.1.3",
     "autoflake>=1.4",
     "pyprojroot>=0.2.0",
     "sh>=1.14.2",
     "maison>=1.4.0",
-    "xdg>=5.1.1",
+    "xdg-base-dirs>=6.0.0",
 ]
 name = "autoimport"
 description = "Autoimport missing python libraries."
@@ -379,6 +379,6 @@ module = [
     "pyprojroot",
     "sh",
     "virtualenv",
-    "xdg",
+    "xdg_base_dirs",
 ]
 ignore_missing_imports = true
diff --git a/src/autoimport/entrypoints/cli.py b/src/autoimport/entrypoints/cli.py
index 17663fa..061df27 100644
--- a/src/autoimport/entrypoints/cli.py
+++ b/src/autoimport/entrypoints/cli.py
@@ -6,7 +6,7 @@ from pathlib import Path
 from typing import Any, List, Optional, Sequence, Tuple, Union
 
 import click
-import xdg
+import xdg_base_dirs as xdg
 from maison.config import ProjectConfig
 
 from autoimport import services, version
diff --git a/src/autoimport/model.py b/src/autoimport/model.py
index 2e79264..573a983 100644
--- a/src/autoimport/model.py
+++ b/src/autoimport/model.py
@@ -358,8 +358,8 @@ class SourceCode:  # noqa: R090
         # Find the package name
         try:
             project_package = os.path.basename(here()).replace("-", "_")
-        except RecursionError:  # pragma: no cover
-            # I don't know how to make a test that raises this error :(
+        except RuntimeError:  # pragma: no cover
+            # I don't know how to make a test that raises it :(
             # To manually reproduce, follow the steps of
             # https://github.com/lyz-code/autoimport/issues/131
             return None