NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
458 stars 102 forks source link

AttributeError: '_Module' object has no attribute 'is_module' #187

Closed casperdcl closed 3 years ago

casperdcl commented 3 years ago

Probably a Python3.9 issue. From https://github.com/tqdm/tqdm/runs/2659177454:

$ pydoc-markdown --build --site-dir _site
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.5/x64/bin/pydoc-markdown", line 8, in <module>
    sys.exit(cli())
  ...
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/pydoc_markdown/contrib/loaders/python.py", line 114, in <listcomp>
    [x.name for x in discovered_items if x.is_module()],
AttributeError: '_Module' object has no attribute 'is_module'
casperdcl commented 3 years ago

Actually https://github.com/tqdm/tqdm/runs/2274399493 succeeded 2 months ago on Python3.9.2 so does indeed look like a pydoc-markdown error.

bziemons commented 3 years ago

Downgrading docspec-python to 0.1.0 seems to work for me.

m-birke commented 3 years ago

Ive got the same problem. With no changes on May 21 it worked, since May 22 no longer.

@bziemons thanks! this also works for me (May 21 is exactly the date, where docspec-python 0.1.1 was released

m-birke commented 3 years ago

@NiklasRosenstein

maybe the requirement should look like 'docspec-python ==0.1.0' for now?

bziemons commented 3 years ago

that would still break all older pydoc-markdown versions. I think it would be more wise to yank docspec-python 0.1.1 from pypi and push that version as 0.2.0 instead.

NiklasRosenstein commented 3 years ago

Hey folks, thanks for reporting this. and sorry for the troubles! I yanked docspec-python 0.1.1 from PyPI and re-published it as 0.2.0. Also Pydoc-Markdown 3.13.0 now directly depends on docspec-python~0.2.0 and the respective code has been fixed.