Skip to content

Getting exception with Python 3.9 and 0.9.2 #286

@dbrattli

Description

@dbrattli

Expected Behavior

Should work with Python 3.9.

Actual Behavior

Getting exception:

Traceback (most recent call last): File "/usr/local/bin/pdoc", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.9/site-packages/pdoc/cli.py", line 572, in main recursive_write_files(module, ext='.html', **template_config) File "/usr/local/lib/python3.9/site-packages/pdoc/cli.py", line 349, in recursive_write_files recursive_write_files(submodule, ext=ext, **kwargs) File "/usr/local/lib/python3.9/site-packages/pdoc/cli.py", line 344, in recursive_write_files f.write(m.html(**kwargs)) File "/usr/local/lib/python3.9/site-packages/pdoc/__init__.py", line 832, in html html = _render_template('/html.mako', module=self, **kwargs) File "/usr/local/lib/python3.9/site-packages/pdoc/__init__.py", line 158, in _render_template return t.render(**config).strip() File "/usr/local/lib/python3.9/site-packages/mako/template.py", line 476, in render return runtime._render(self, self.callable_, args, data) File "/usr/local/lib/python3.9/site-packages/mako/runtime.py", line 878, in _render _render_context( File "/usr/local/lib/python3.9/site-packages/mako/runtime.py", line 920, in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File "/usr/local/lib/python3.9/site-packages/mako/runtime.py", line 947, in _exec_template callable_(context, *args, **kwargs) File "_html_mako", line 143, in render_body File "_html_mako", line 49, in show_module File "_html_mako", line 428, in render_show_module File "/usr/local/lib/python3.9/site-packages/pdoc/__init__.py", line 1085, in subclasses for c in type.__subclasses__(self.obj)) TypeError: descriptor '__subclasses__' for 'type' objects doesn't apply to a 'types.GenericAlias' object 

Steps to Reproduce

  1. git clone https://github.com/dbrattli/Expression.git
  2. cd expression
  3. pdoc --html expression -o docs

Additional info

  • pdoc version: 0.9.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions