Skip to content

Commit b684249

Browse files
committed
gh-149083: Use sentinel for urllib.parse._UNSPECIFIED
This was added in 3.15; let's use a real sentinel instead of an ad-hoc list object.
1 parent 7241f27 commit b684249

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/urllib/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def _hostinfo(self):
277277
return hostname, port
278278

279279

280-
_UNSPECIFIED = ['not specified']
280+
_UNSPECIFIED = sentinel("_UNSPECIFIED")
281281
_MISSING_AS_NONE_DEFAULT = False
282282

283283
class _ResultBase:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The private ``_UNSPECIFIED`` sentinel in :mod:`urllib.parse` is now an
2+
instance of :class:`sentinel`.

0 commit comments

Comments
 (0)