Skip to content

Commit

Permalink
Address compatibility with python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
bwohlberg committed Jan 17, 2025
1 parent de7b918 commit 1e84a7a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/source/automodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ def _fix_disable(cls, nstnm):
coattr.append(co.co_posonlyargcount)
coattr.extend([co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize,
co.co_flags, _fix_disable.__code__.co_code, co.co_consts,
co.co_names, co.co_varnames, co.co_filename, co.co_name, co.co_qualname,
co.co_firstlineno, co.co_lnotab, co.co_exceptiontable, co.co_freevars,
co.co_cellvars])
co.co_names, co.co_varnames, co.co_filename, co.co_name])
if hasattr(co, 'co_qualname'):
coattr.append(co.co_qualname)
coattr.extend([co.co_firstlineno, co.co_lnotab])
if hasattr(co, 'co_exceptiontable'):
coattr.append(co.co_exceptiontable)
coattr.extend([co.co_freevars, co.co_cellvars])
sporco.common._fix_nested_class_lookup.__code__ = CodeType(*coattr)


Expand Down

0 comments on commit 1e84a7a

Please sign in to comment.