pytoolz / toolz

A functional standard library for Python.
http://toolz.readthedocs.org/
Other
4.71k stars 263 forks source link

Test fails with python 3.10 #512

Closed opoplawski closed 3 years ago

opoplawski commented 3 years ago

Fedora is looking to move to python 3.10. toolz 0.11.1 through latest master yields:

FAIL: test_inspect_args.test_introspect_builtin_modules
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/toolz-e9bc1e150b7b1ea1bec300a55382ed564b215f41/toolz/tests/test_inspect_args.py", line 433, in test_introspect_builtin_modules
    raise AssertionError(message + '\n\n'.join(messages))
AssertionError: Missing introspection for the following callables:

builtins:
    anext
eriknw commented 3 years ago

Aha, good catch! I'll push a fix and release tomorrow. Thanks!

This error is safe to ignore if you care to proceed. It just means that the new builtin function anext can't get a signature object from the inspect module, so toolz.curry(anext) may not be able to work perfectly (but there's no reason to do this anyway). Our fix will be to add our own signatures for this object.

eriknw commented 3 years ago

Fixed. Would you like a release, or do you work from source?

opoplawski commented 3 years ago

Thanks for the quick fix. For the moment, it's just good to know there is a fix out there. I'm not sure when python 3.10 will actually get pushed to Fedora Rawhide. So, a release soon would be nice, but if you want to hold off for a bit I can always grab a git snapshot if needed.

eriknw commented 3 years ago

Btw, @opoplawski, you may be interested to learn that by raising this issue, you helped update CPython: https://github.com/python/cpython/pull/25551

So, thanks again!