about summary refs log tree commit diff
path: root/pkgs/development/python-modules/sqlalchemy-migrate
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/sqlalchemy-migrate')
-rw-r--r--pkgs/development/python-modules/sqlalchemy-migrate/default.nix8
-rw-r--r--pkgs/development/python-modules/sqlalchemy-migrate/python3.11-comp.diff13
2 files changed, 15 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/sqlalchemy-migrate/default.nix b/pkgs/development/python-modules/sqlalchemy-migrate/default.nix
index ae9d8bd953e8..ecfa57be2e30 100644
--- a/pkgs/development/python-modules/sqlalchemy-migrate/default.nix
+++ b/pkgs/development/python-modules/sqlalchemy-migrate/default.nix
@@ -4,7 +4,6 @@
 , fetchPypi
 , fetchpatch
 , python
-, pythonAtLeast
 , scripttest
 , pytz
 , pbr
@@ -20,21 +19,18 @@ buildPythonPackage rec {
   pname = "sqlalchemy-migrate";
   version = "0.13.0";
 
-  # using deprecated inspect.getargspec function
-  # https://bugs.launchpad.net/sqlalchemy-migrate/+bug/2003619
-  disabled = pythonAtLeast "3.11";
-
   src = fetchPypi {
     inherit pname version;
     sha256 = "1y0lcqii7b4vp7yh9dyxrl4i77hi8jkkw7d06mgdw2h458ljxh0b";
   };
 
-  # See: https://review.openstack.org/#/c/608382/
   patches = [
+    # See: https://review.openstack.org/#/c/608382/
     (fetchpatch {
       url = "https://github.com/openstack/sqlalchemy-migrate/pull/18.patch";
       sha256 = "1qyfq2m7w7xqf0r9bc2x42qcra4r9k9l9g1jy5j0fvlb6bvvjj07";
     })
+    ./python3.11-comp.diff
   ];
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/sqlalchemy-migrate/python3.11-comp.diff b/pkgs/development/python-modules/sqlalchemy-migrate/python3.11-comp.diff
new file mode 100644
index 000000000000..c8e201b0ca6d
--- /dev/null
+++ b/pkgs/development/python-modules/sqlalchemy-migrate/python3.11-comp.diff
@@ -0,0 +1,13 @@
+diff --git a/migrate/versioning/shell.py b/migrate/versioning/shell.py
+index 5fb86b1..fae0ce4 100644
+--- a/migrate/versioning/shell.py
++++ b/migrate/versioning/shell.py
+@@ -108,7 +108,7 @@ def main(argv=None, **kwargs):
+         parser.error("Invalid command %s" % command)
+ 
+     parser.set_usage(inspect.getdoc(command_func))
+-    f_args, f_varargs, f_kwargs, f_defaults = inspect.getargspec(command_func)
++    f_args, f_varargs, f_kwargs, f_defaults, _, _, _ = inspect.getfullargspec(command_func)
+     for arg in f_args:
+         parser.add_option(
+             "--%s" % arg,