python 3.11 compatiblity

Bug #2003619 reported by Sandro
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
sqlalchemy-migrate
New
Undecided
Unassigned

Bug Description

When executing migrate on python 3.11 the following error is produced due to the deprecation of inspect.getargspec

Traceback (most recent call last):
  File "/nix/store/7a8iky58c7smv24ybgw4x592c9hn7rny-python3.11-sqlalchemy-migrate-0.13.0/bin/.migrate-wrapped", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "/nix/store/7a8iky58c7smv24ybgw4x592c9hn7rny-python3.11-sqlalchemy-migrate-0.13.0/lib/python3.11/site-packages/migrate/versioning/shell.py", line 111, in main
    f_args, f_varargs, f_kwargs, f_defaults = inspect.getargspec(command_func)
                                              ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?

Revision history for this message
lukn (lukn) wrote (last edit ):

the fix is as simple as replacing line 111 of shell.py by:

f_args, f_varargs, f_kwargs, f_defaults, _, _, _ = inspect.getfullargspec(command_func)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.