Skip to content

http: fix class name in doc string - #945

Open
pjonsson wants to merge 1 commit into
Open-EO:masterfrom
pjonsson:http-fix-docstring
Open

pjonsson wants to merge 1 commit into
Open-EO:masterfrom
pjonsson:http-fix-docstring

Conversation

@pjonsson

Copy link
Copy Markdown
Contributor

The Retry class sits directly under
util, not util.retry.

The Retry class sits directly under
util, not util.retry.
@pjonsson

Copy link
Copy Markdown
Contributor Author

Not sure what is causing the secret CI to fail, but I picked urllib3.util.Retry since that is used by connection.py including its type annotations that I assume are validated by some type checker.

I think the code should pick one name to refer to the class and stick to that consistently, happy to switch to the other one if that is better.

@soxofaan

soxofaan commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

I'm not sure what you mean,
but Retry is defined at urllib3/util/retry.py: the https://github.com/urllib3/urllib3/blob/a0cab2d084bd49fe347aea118daf0a26acd2c93c/src/urllib3/util/retry.py#L43

it is indeed also available from an import in urllib3.util ( https://github.com/urllib3/urllib3/blob/a0cab2d084bd49fe347aea118daf0a26acd2c93c/src/urllib3/util/__init__.py#L7 ) but that is not the exact definition place, and sphinx is sometimes pretty picky about these things

@pjonsson

Copy link
Copy Markdown
Contributor Author

The urllib3 documentation uses urllib3.util.Retry (https://urllib3.readthedocs.io/en/stable/reference/urllib3.util.html), and some places in the source code uses that while other places uses urllib3.util.retry.Retry. My intention was to align so the same one is used everywhere.

If Sphinx is picky, shouldn't that workflow be enabled for pull requests as well (but with the commit+push step disabled when running on a pull request)?

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

2 participants