Merge pull request #238634 from SuperSandro2000/sqlalchemy-migrate

python311Packages.sqlalchemy-migrate: fix build
This commit is contained in:
Sandro 2023-06-26 21:58:24 +02:00 committed by GitHub
commit 2f51fc5acf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 6 deletions

View file

@ -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 = ''

View file

@ -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,