gh-151945: Fix reference warnings in http.cookiejar docs#152816
gh-151945: Fix reference warnings in http.cookiejar docs#152816harjothkhara wants to merge 1 commit into
Conversation
Resolve the nit-picky reference warnings in Doc/library/http.cookiejar.rst and drop the file from Doc/tools/.nitignore so future regressions are caught by CI. Documented targets are qualified with their owning class, for example Cookie.version, CookiePolicy.rfc2965, the urllib.request.Request methods and attributes, and urllib.response.addinfourl.info. References with no documented target become inline literals: the removed get_origin_req_host method. The http.server part of the issue is left for a separate change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Documentation build overview
|
hugovk
left a comment
There was a problem hiding this comment.
Thanks! Whilst we're here, please could also update the headers to use sentence case?
https://devguide.python.org/documentation/style-guide/#capitalization
That is, change the four "Objects" to "objects":
| attribute. Dependency on a deprecated method ``get_origin_req_host`` has | ||
| been removed. |
There was a problem hiding this comment.
To keep same formatting:
| attribute. Dependency on a deprecated method ``get_origin_req_host`` has | |
| been removed. | |
| attribute. Dependency on a deprecated method | |
| :meth:`!get_origin_req_host` has been removed. |
| attribute. Dependency on a deprecated method ``get_origin_req_host`` has | ||
| been removed. |
There was a problem hiding this comment.
| attribute. Dependency on a deprecated method ``get_origin_req_host`` has | |
| been removed. | |
| attribute. Dependency on a deprecated method | |
| :meth:`!get_origin_req_host` has been removed. |
| turn it off again by | ||
| setting it to :const:`None`. |
There was a problem hiding this comment.
https://devguide.python.org/documentation/markup/#quick-reference
| turn it off again by | |
| setting it to :const:`None`. | |
| turn it off again by setting it to ``None``. |
And we can update the others in this file as well.
| Add correct :mailheader:`Cookie` header to *request*. | ||
|
|
||
| If policy allows (ie. the :attr:`rfc2965` and :attr:`hide_cookie2` attributes of | ||
| If policy allows (ie. the :attr:`~CookiePolicy.rfc2965` and |
There was a problem hiding this comment.
Let's also avoid Latin abbreviations, and you can update the other ie. and eg. in this file: https://devguide.python.org/documentation/style-guide/#use-simple-language
| If policy allows (ie. the :attr:`~CookiePolicy.rfc2965` and | |
| If policy allows (that is, the :attr:`~CookiePolicy.rfc2965` and |
StanFromIreland
left a comment
There was a problem hiding this comment.
The reference fixes here are correct 👍 Please apply Hugo's suggestions.
Per @picnixz's suggestion in gh-151945, this covers the
http.cookiejarhalf of the issue; @picnixz is taking
http.server.Fixes the Sphinx nit-picky reference warnings for
Doc/library/http.cookiejar.rstand removes the file fromDoc/tools/.nitignoreso future regressions are caught by CI.Cookie.version,CookiePolicy.rfc2965/hide_cookie2, theurllib.request.Requestmethods and attributes, andurllib.response.addinfourl.info.get_origin_req_hostmethod, which has no documentedtarget, becomes an inline literal.
Verified with a full nit-picky build: the file emits no warnings and
Doc/tools/check-warnings.py --fail-if-regression --fail-if-improvedpasses. Documentation-only reference fix, so no NEWS entry (skip news).
Disclosure: I used AI assistance on this change; I've reviewed it and can
explain it.
Doc/library/http.{cookiejar,server}.rst#151945