Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace inspect.getargspec with inspect.getfullargspec in custom_text…
…_test_runner

inspect.getargspec() was removed in Python 3.11, causing jsontests.py to
fail with "TypeError: 'NoneType' object is not iterable" when running on
RustPython (which targets Python 3.13).

The get_function_args() function was silently catching the AttributeError
and returning None, which then caused the error in store_class_fields()
when trying to iterate over None.

> https://docs.python.org/3/whatsnew/3.11.html
> The getargspec() function, deprecated since Python 3.0; use
> inspect.signature() or inspect.getfullargspec() instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
  • Loading branch information
moreal and claude committed Jan 13, 2026
commit c6eb6105d74effa0ce2d4ec12276877fb952809d
2 changes: 1 addition & 1 deletion extra_tests/custom_text_test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def __call__(self, data_list, totals=None):

def get_function_args(func_ref):
try:
return [p for p in inspect.getargspec(func_ref).args if p != "self"]
return [p for p in inspect.getfullargspec(func_ref).args if p != "self"]
except:
return None

Expand Down
Loading