From 4c4c58b941dbf62f0e1aee81fcc63cc31487522b Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 6 Jun 2026 05:47:33 -0700 Subject: [PATCH] gh-149083: Use sentinel for urllib.parse._UNSPECIFIED (GH-149612) 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 --- Lib/urllib/parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py index d64f678d235b6f..82b95adbdc283e 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="") _MISSING_AS_NONE_DEFAULT = False class _ResultBase: