Open kloczek opened 1 month ago
Hi @kloczek we run the full test suite in CI from an installed package and aren't seeing those failures. The difference is ~typing.List
vs list
etc in autodoc.
Are you able to reproduce the failures in the CI environment? As otherwise this is quite a confusing failure.
A
Describe the bug
Looks like pytest test suite fails in 7 units related to typing checks.
How to Reproduce
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesinstaller
modulecut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-8.0.2-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-8.0.2-2.fc37.x86_64/usr/lib/python3.10/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.10.14, pytest-8.2.2, pluggy-1.5.0 libraries: Sphinx-8.0.2, docutils-0.20.1 base tmp_path: /tmp/pytest-of-tkloczko/pytest-27 rootdir: /home/tkloczko/rpmbuild/BUILD/sphinx-8.0.2 configfile: pyproject.toml testpaths: tests plugins: hypothesis-6.100.0, flaky-3.8.1 collected 2193 items tests/test_addnodes.py . [ 0%] tests/test_application.py ........ [ 0%] tests/test_builders/test_build.py ........... [ 0%] tests/test_builders/test_build_changes.py .. [ 1%] tests/test_builders/test_build_dirhtml.py . [ 1%] tests/test_builders/test_build_epub.py ..........s.. [ 1%] tests/test_builders/test_build_gettext.py ........... [ 2%] tests/test_builders/test_build_html.py ................................. [ 3%] ............................. [ 4%] tests/test_builders/test_build_html_5_output.py ........................ [ 6%] ........................................................................ [ 9%] ....................................................................... [ 12%] tests/test_builders/test_build_html_assets.py ..... [ 12%] tests/test_builders/test_build_html_code.py ... [ 12%] tests/test_builders/test_build_html_download.py .. [ 13%] tests/test_builders/test_build_html_highlight.py ...... [ 13%] tests/test_builders/test_build_html_image.py ...... [ 13%] tests/test_builders/test_build_html_maths.py ....... [ 13%] tests/test_builders/test_build_html_numfig.py .......................... [ 15%] ........................................................................ [ 18%] ........................................................................ [ 21%] ......................................................... [ 24%] tests/test_builders/test_build_html_tocdepth.py ........................ [ 25%] ................................. [ 26%] tests/test_builders/test_build_latex.py ssssss.......................... [ 28%] ........................s..................s........... [ 30%] tests/test_builders/test_build_linkcheck.py ............................ [ 32%] ............. [ 32%] tests/test_builders/test_build_manpage.py ...... [ 32%] tests/test_builders/test_build_texinfo.py ......... [ 33%] tests/test_builders/test_build_text.py ............... [ 34%] tests/test_builders/test_build_warnings.py .... [ 34%] tests/test_builders/test_builder.py .. [ 34%] tests/test_config/test_config.py ....................................... [ 36%] ........................... [ 37%] tests/test_config/test_correct_year.py ... [ 37%] tests/test_directives/test_directive_code.py ........................... [ 38%] .............. [ 39%] tests/test_directives/test_directive_object_description.py .. [ 39%] tests/test_directives/test_directive_only.py . [ 39%] tests/test_directives/test_directive_option.py ... [ 39%] tests/test_directives/test_directive_other.py .......... [ 40%] tests/test_directives/test_directive_patch.py ... [ 40%] tests/test_directives/test_directives_no_typesetting.py ..............ss [ 40%] .....ss.........sss.............. [ 42%] tests/test_domains/test_domain_c.py ................................... [ 44%] tests/test_domains/test_domain_cpp.py .................................. [ 45%] ........................................................................ [ 48%] .......... [ 49%] tests/test_domains/test_domain_js.py ................... [ 50%] tests/test_domains/test_domain_py.py ................................... [ 51%] .............. [ 52%] tests/test_domains/test_domain_py_canonical.py ..... [ 52%] tests/test_domains/test_domain_py_fields.py ....... [ 52%] tests/test_domains/test_domain_py_pyfunction.py .............. [ 53%] tests/test_domains/test_domain_py_pyobject.py ................. [ 54%] tests/test_domains/test_domain_rst.py ........ [ 54%] tests/test_domains/test_domain_std.py ...................... [ 55%] tests/test_environment/test_environment.py .... [ 55%] tests/test_environment/test_environment_indexentries.py ........ [ 56%] tests/test_environment/test_environment_record_dependencies.py . [ 56%] tests/test_environment/test_environment_toctree.py ............ [ 56%] tests/test_errors.py .. [ 56%] tests/test_events.py ... [ 57%] tests/test_extensions/test_ext_apidoc.py .......................... [ 58%] tests/test_extensions/test_ext_autodoc.py .............................. [ 59%] .............................F.........s............. [ 62%] tests/test_extensions/test_ext_autodoc_autoattribute.py ..........F. [ 62%] tests/test_extensions/test_ext_autodoc_autoclass.py ........F.F......... [ 63%] .... [ 63%] tests/test_extensions/test_ext_autodoc_autodata.py ....F. [ 64%] tests/test_extensions/test_ext_autodoc_autofunction.py .........F.... [ 64%] tests/test_extensions/test_ext_autodoc_automodule.py ...... [ 64%] tests/test_extensions/test_ext_autodoc_autoproperty.py ...... [ 65%] tests/test_extensions/test_ext_autodoc_configs.py ...................... [ 66%] ......F... [ 66%] tests/test_extensions/test_ext_autodoc_events.py ...... [ 66%] tests/test_extensions/test_ext_autodoc_mock.py ....... [ 67%] tests/test_extensions/test_ext_autodoc_preserve_defaults.py .. [ 67%] tests/test_extensions/test_ext_autodoc_private_members.py ..... [ 67%] tests/test_extensions/test_ext_autosectionlabel.py ... [ 67%] tests/test_extensions/test_ext_autosummary.py .......................... [ 68%] . [ 68%] tests/test_extensions/test_ext_autosummary_imports.py .. [ 69%] tests/test_extensions/test_ext_coverage.py .... [ 69%] tests/test_extensions/test_ext_doctest.py ...... [ 69%] tests/test_extensions/test_ext_duration.py . [ 69%] tests/test_extensions/test_ext_extlinks.py ... [ 69%] tests/test_extensions/test_ext_githubpages.py ... [ 69%] tests/test_extensions/test_ext_graphviz.py ..... [ 70%] tests/test_extensions/test_ext_ifconfig.py .. [ 70%] tests/test_extensions/test_ext_imgconverter.py s [ 70%] tests/test_extensions/test_ext_imgmockconverter.py . [ 70%] tests/test_extensions/test_ext_inheritance_diagram.py ...... [ 70%] tests/test_extensions/test_ext_intersphinx.py ..................... [ 71%] tests/test_extensions/test_ext_intersphinx_cache.py .... [ 71%] tests/test_extensions/test_ext_math.py sss....................... [ 72%] tests/test_extensions/test_ext_napoleon.py ................. [ 73%] tests/test_extensions/test_ext_napoleon_docstring.py ................... [ 74%] ................................. [ 75%] tests/test_extensions/test_ext_todo.py ... [ 76%] tests/test_extensions/test_ext_viewcode.py ...... [ 76%] tests/test_extensions/test_extension.py . [ 76%] tests/test_highlighting.py ..... [ 76%] tests/test_intl/test_catalogs.py ... [ 76%] tests/test_intl/test_intl.py ........................................... [ 78%] ................. [ 79%] tests/test_intl/test_locale.py .... [ 79%] tests/test_markup/test_markup.py ..................................... [ 81%] tests/test_markup/test_metadata.py . [ 81%] tests/test_markup/test_parser.py . [ 81%] tests/test_markup/test_smartquotes.py .......... [ 81%] tests/test_project.py ....... [ 82%] tests/test_pycode/test_pycode.py ....... [ 82%] tests/test_pycode/test_pycode_ast.py ................................... [ 84%] ........... [ 84%] tests/test_pycode/test_pycode_parser.py ............................ [ 85%] tests/test_quickstart.py .......... [ 86%] tests/test_roles.py . [ 86%] tests/test_search.py ................. [ 87%] tests/test_theming/test_html_theme.py ... [ 87%] tests/test_theming/test_templating.py ... [ 87%] tests/test_theming/test_theming.py ....................... [ 88%] tests/test_toctree.py ... [ 88%] tests/test_transforms/test_transforms_move_module_targets.py .... [ 88%] tests/test_transforms/test_transforms_post_transforms.py ............... [ 89%] . [ 89%] tests/test_transforms/test_transforms_post_transforms_code.py ... [ 89%] tests/test_transforms/test_transforms_post_transforms_images.py . [ 89%] tests/test_transforms/test_transforms_reorder_nodes.py ... [ 89%] tests/test_util/test_util.py .... [ 90%] tests/test_util/test_util_console.py ... [ 90%] tests/test_util/test_util_display.py ..... [ 90%] tests/test_util/test_util_docstrings.py ... [ 90%] tests/test_util/test_util_docutils.py ... [ 90%] tests/test_util/test_util_docutils_sphinx_directive.py ........ [ 91%] tests/test_util/test_util_fileutil.py ..... [ 91%] tests/test_util/test_util_i18n.py ....... [ 91%] tests/test_util/test_util_images.py .... [ 91%] tests/test_util/test_util_inspect.py ................................... [ 93%] ............ [ 93%] tests/test_util/test_util_inventory.py ..... [ 94%] tests/test_util/test_util_logging.py ................... [ 95%] tests/test_util/test_util_matching.py ........... [ 95%] tests/test_util/test_util_nodes.py ........................... [ 96%] tests/test_util/test_util_rst.py .......... [ 97%] tests/test_util/test_util_template.py .. [ 97%] tests/test_util/test_util_typing.py .................................. [ 98%] tests/test_versioning.py .......... [ 99%] tests/test_writers/test_api_translator.py ........... [ 99%] tests/test_writers/test_docutilsconf.py .. [ 99%] tests/test_writers/test_writer_latex.py . [100%] =================================== FAILURES =================================== __________________________ test_autodoc_GenericAlias ___________________________ app =Environment Information
Python 3.10.14.
List of installed modules in build env:
```console Package Version ----------------------------- ----------- alabaster 0.7.16 attrs 24.2.0 Babel 2.15.0 build 1.2.1 charset-normalizer 3.3.2 defusedxml 0.7.1 distro 1.9.0 docutils 0.20.1 exceptiongroup 1.1.3 filelock 3.15.4 flaky 3.8.1 html5lib 1.1 hypothesis 6.100.0 imagesize 1.4.1 importlib_metadata 8.0.0 iniconfig 2.0.0 installer 0.7.0 Jinja2 3.1.4 lxml 5.2.2 MarkupSafe 2.1.5 packaging 24.0 pluggy 1.5.0 Pygments 2.18.0 pyproject_hooks 1.0.0 pytest 8.2.2 python-dateutil 2.9.0.post0 requests 2.32.3 setuptools 70.2.0 snowballstemmer 2.2.0 sortedcontainers 2.4.0 Sphinx 7.3.7 sphinxcontrib-applehelp 1.0.8 sphinxcontrib-devhelp 1.0.6 sphinxcontrib-htmlhelp 2.0.5 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.7 sphinxcontrib-serializinghtml 2.0.0 sphinxcontrib-websupport 1.2.7 tokenize_rt 5.2.0 tomli 2.0.1 typing_extensions 4.12.2 urllib3 2.2.2 webencodings 0.5.1 wheel 0.44.0 zipp 3.19.2 ```Sphinx extensions
N/A
Additional context
N/A
Please let me know if you need more details or want me to perform some diagnostics.