pdoc icon indicating copy to clipboard operation
pdoc copied to clipboard

Python 3.10 Static Method Changes

Open tjni opened this issue 2 years ago • 0 comments

The following test fails on Python 3.10:

======================================================================
FAIL: test_text (pdoc.test.CliTest) (package='example_pkg')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/tmp/nix-build-python3.10-pdoc3-0.10.0.drv-0/pdoc3-0.10.0/pdoc/test/__init__.py", line 372, in test_text
    self.assertNotIn(pattern, out)
AssertionError: 'non_callable_routine' unexpectedly found in "Module example_pkg ...

I think this is because, according to documentation:

Changed in version 3.10: Static methods now inherit the method attributes (module, name, qualname, doc and annotations), have a new wrapped attribute, and are now callable as regular functions.

I apologize I don't know enough how to fix this but would be happy to contribute what I can.

tjni avatar May 12 '22 21:05 tjni