Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple definitions for std:label:python--m-build--v #795

Closed
jaraco opened this issue Jul 17, 2024 · 9 comments
Closed

multiple definitions for std:label:python--m-build--v #795

jaraco opened this issue Jul 17, 2024 · 9 comments

Comments

@jaraco
Copy link
Member

jaraco commented Jul 17, 2024

In pypa/setuptools#4474 I report an issue where in the past few days, Setuptools docs builds have started failing due to this warning (treated as error):

WARNING: inventory <https://build.pypa.io/en/latest> contains multiple definitions for std:label:python--m-build--v

I can see that the docs for build haven't changed in the past few weeks.

It's preceded by this notice:

intersphinx inventory has moved: https://pypa-build.readthedocs.io/en/latest/objects.inv -> https://build.pypa.io/en/latest/objects.inv

That makes me wonder if maybe the pypa-build was recently updated to redirect and previously, Setuptools was linking to a stale site and that's why the issue has surfaced now.

@jaraco
Copy link
Member Author

jaraco commented Jul 17, 2024

Well, this is interesting. When updating the intersphinx mapping to the new location, the warning goes away, so it appears to be a sphinx bug. The warning about the multiple definitions no longer appears, suggesting that Sphinx is incorrectly detecting multiple definitions due to the redirection. That's a yak I'm not planning to shave today.

@jaraco jaraco closed this as completed Jul 17, 2024
@jaraco jaraco reopened this Jul 17, 2024
@jaraco
Copy link
Member Author

jaraco commented Jul 17, 2024

I'm re-opening, since it appears that the docs build in RTD doesn't match the docs in GitHub.

Latest is v1.0.2:

image

But there's no v1.0.2 in the repo:

image

@jaraco
Copy link
Member Author

jaraco commented Jul 17, 2024

Oh! I see my mistake now.

pypa-build.readthedocs.io -> build.pypa.io (not build.readthedocs.io).

@jaraco
Copy link
Member Author

jaraco commented Jul 17, 2024

After getting the correct intersphinx target configured without the redirection, the error message returns.

WARNING: inventory https://build.pypa.io/en/latest contains multiple definitions for std:label:python--m-build--v

Maybe there's something about the way the hosting is configured that causes the multiple definitions?

@jaraco
Copy link
Member Author

jaraco commented Jul 17, 2024

When I download the inventory and inspect it, I can see that the "multiple definitions" are actually distact, but they vary only by case:

 setuptools main 🐚 https build.pypa.io/en/stable/objects.inv > build.inv
 setuptools main 🐚 .tox/docs/bin/python -m sphinx.ext.intersphinx build.inv
WARNING:sphinx.sphinx.util.inventory:inventory <> contains multiple definitions for std:label:python--m-build--v
py:class
    build.ProjectBuilder                                                             : api.html#build.ProjectBuilder
    build._builder.ProjectBuilder                                                    : api.html#build.ProjectBuilder
    build.env.DefaultIsolatedEnv                                                     : api.html#build.env.DefaultIsolatedEnv
    build.env.IsolatedEnv                                                            : api.html#build.env.IsolatedEnv
py:exception
    build.BuildBackendException                                                      : api.html#build.BuildBackendException
    build.BuildException                                                             : api.html#build.BuildException
    build.BuildSystemTableValidationError                                            : api.html#build.BuildSystemTableValidationError
    build.FailedProcessError                                                         : api.html#build.FailedProcessError
    build.TypoWarning                                                                : api.html#build.TypoWarning
    build._exceptions.BuildBackendException                                          : api.html#build.BuildBackendException
    build._exceptions.BuildException                                                 : api.html#build.BuildException
    build._exceptions.BuildSystemTableValidationError                                         : api.html#build.BuildSystemTableValidationError
    build._exceptions.FailedProcessError                                             : api.html#build.FailedProcessError
    build._exceptions.TypoWarning                                                    : api.html#build.TypoWarning
py:function
    build.check_dependency                                                           : api.html#build.check_dependency
    build.util.project_wheel_metadata                                                : api.html#build.util.project_wheel_metadata
py:method
    build.ProjectBuilder.build                                                       : api.html#build.ProjectBuilder.build
    build.ProjectBuilder.check_dependencies                                          : api.html#build.ProjectBuilder.check_dependencies
    build.ProjectBuilder.from_isolated_env                                           : api.html#build.ProjectBuilder.from_isolated_env
    build.ProjectBuilder.get_requires_for_build                                         : api.html#build.ProjectBuilder.get_requires_for_build
    build.ProjectBuilder.metadata_path                                               : api.html#build.ProjectBuilder.metadata_path
    build.ProjectBuilder.prepare                                                     : api.html#build.ProjectBuilder.prepare
    build.env.DefaultIsolatedEnv.install                                             : api.html#build.env.DefaultIsolatedEnv.install
    build.env.DefaultIsolatedEnv.make_extra_environ                                         : api.html#build.env.DefaultIsolatedEnv.make_extra_environ
    build.env.IsolatedEnv.make_extra_environ                                         : api.html#build.env.IsolatedEnv.make_extra_environ
py:module
    build                                                                            : api.html#module-build
    build.env                                                                        : api.html#module-build.env
    build.util                                                                       : api.html#module-build.util
py:property
    build.ProjectBuilder.build_system_requires                                         : api.html#build.ProjectBuilder.build_system_requires
    build.ProjectBuilder.python_executable                                           : api.html#build.ProjectBuilder.python_executable
    build.ProjectBuilder.source_dir                                                  : api.html#build.ProjectBuilder.source_dir
    build.env.DefaultIsolatedEnv.path                                                : api.html#build.env.DefaultIsolatedEnv.path
    build.env.DefaultIsolatedEnv.python_executable                                         : api.html#build.env.DefaultIsolatedEnv.python_executable
    build.env.IsolatedEnv.python_executable                                          : api.html#build.env.IsolatedEnv.python_executable
std:doc
    api                                      API Documentation                       : api.html
    changelog                                Changelog                               : changelog.html
    differences                              Differences from other tools            : differences.html
    index                                    build                                   : index.html
    installation                             Installation                            : installation.html
    mission                                  Mission Statement                       : mission.html
    release                                  Release Process                         : release.html
    test_suite                               Test Suite                              : test_suite.html
std:label
    genindex                                 Index                                   : genindex.html
    modindex                                 Module Index                            : py-modindex.html
    py-modindex                              Python Module Index                     : py-modindex.html
    python--m-build---config-setting         python -m build --config-setting        : index.html#python--m-build---config-setting
    python--m-build---help                   python -m build --help                  : index.html#python--m-build---help
    python--m-build---installer              python -m build --installer             : index.html#python--m-build---installer
    python--m-build---no-isolation           python -m build --no-isolation          : index.html#python--m-build---no-isolation
    python--m-build---outdir                 python -m build --outdir                : index.html#python--m-build---outdir
    python--m-build---sdist                  python -m build --sdist                 : index.html#python--m-build---sdist
    python--m-build---skip-dependency-check  python -m build --skip-dependency-check : index.html#python--m-build---skip-dependency-check
    python--m-build---verbose                python -m build --verbose               : index.html#python--m-build---verbose
    python--m-build---version                python -m build --version               : index.html#python--m-build---version
    python--m-build---wheel                  python -m build --wheel                 : index.html#python--m-build---wheel
    python--m-build--C                       python -m build -C                      : index.html#python--m-build--C
    python--m-build--V                       python -m build -V                      : index.html#python--m-build--V
    python--m-build--h                       python -m build -h                      : index.html#python--m-build--h
    python--m-build--n                       python -m build -n                      : index.html#python--m-build--n
    python--m-build--o                       python -m build -o                      : index.html#python--m-build--o
    python--m-build--s                       python -m build -s                      : index.html#python--m-build--s
    python--m-build--v                       python -m build -v                      : index.html#python--m-build--v
    python--m-build--w                       python -m build -w                      : index.html#python--m-build--w
    python--m-build--x                       python -m build -x                      : index.html#python--m-build--x
    python--m-build-options                  python -m options                       : index.html#python--m-build-options
    python--m-build-positional-arguments     python -m positional arguments          : index.html#python--m-build-positional-arguments
    python--m-build-srcdir                   python -m build srcdir                  : index.html#python--m-build-srcdir
    search                                   Search Page                             : search.html

@jaraco
Copy link
Member Author

jaraco commented Jul 17, 2024

I'm guessing those labels are generated by the use of sphinx-argparse-cli.

@jaraco
Copy link
Member Author

jaraco commented Jul 17, 2024

Maybe it's not a sphinx-argparse-cli issue. Those two labels are unique if compared case-sensitive.

According to Gemini (which I barely trust), HTML labels are case sensitive, so those two labels are in fact distinct. It's sphinx that's improperly warning when two labels exist that vary only by case.

@jaraco
Copy link
Member Author

jaraco commented Jul 17, 2024

In sphinx-doc/sphinx#12585, users report a recent emergent issue with Sphinx 7.4.0, and indeed, if I downgrade to Sphinx 7.3.7, the error goes away, so it's probably not an issue with build or with sphinx-argparse-cli, but with Sphinx 7.4.

@jayaddison
Copy link

Sphinx contributor / author of this warning message here. It is intended to flag potential problems in Intersphinx objects.inv files that could cause people's inter-project documentation links to land at unexpected/incorrect locations. However the warning-level may be too high severity and reducing this could make sense.

If it is possible to adjust sphinx-argparse-cli to emit case-insensitively-distinct entity identifiers for each command-line flag, that might help, however we would probably still want to maintain existing entries for backwards compatibility, and this may require further feasibility checks.

PS: For an interim workaround if you do want to upgrade Sphinx while this warning message exists, you can suppress these warnings following some guidance from here (quoting @AA-Turner):

Thank you for opening this ... (). This was introduced in 799ae16 (#12329). You can suppress it with 'intersphinx.external' in your suppress_warnings, though the warning is alerting you to that intersphinx has encountered an ambiguity in resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants