https://github.com/python/cpython/commit/9352936b4ec21a0237df09a8e416dca2401d7921 commit: 9352936b4ec21a0237df09a8e416dca2401d7921 branch: 3.15 author: Miss Islington (bot) <[email protected]> committer: JelleZijlstra <[email protected]> date: 2026-06-06T13:13:52Z summary:
[3.15] gh-149083: Use sentinel for urllib.parse._UNSPECIFIED (GH-149612) (#151017) This was added in 3.15; let's use a real sentinel instead of an ad-hoc list object. (cherry picked from commit 884ac3e3ec02347301939ff1f124972d4973f015) Co-authored-by: Jelle Zijlstra <[email protected]> files: M Lib/urllib/parse.py diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py index d64f678d235b6f9..82b95adbdc283ef 100644 --- a/Lib/urllib/parse.py +++ b/Lib/urllib/parse.py @@ -277,7 +277,7 @@ def _hostinfo(self): return hostname, port -_UNSPECIFIED = ['not specified'] +_UNSPECIFIED = sentinel("_UNSPECIFIED", repr="<not specified>") _MISSING_AS_NONE_DEFAULT = False class _ResultBase: _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
