diff --git a/news/10844.bugfix.rst b/news/10844.bugfix.rst new file mode 100644 index 00000000000..f55852647f0 --- /dev/null +++ b/news/10844.bugfix.rst @@ -0,0 +1 @@ +Accept lowercase ```` on index pages. diff --git a/src/pip/_internal/index/collector.py b/src/pip/_internal/index/collector.py index c30c37661f5..f40b3b606ff 100644 --- a/src/pip/_internal/index/collector.py +++ b/src/pip/_internal/index/collector.py @@ -401,7 +401,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: self.anchors: List[Dict[str, Optional[str]]] = [] def handle_decl(self, decl: str) -> None: - if decl != "DOCTYPE html": + if decl.lower() != "doctype html": self._raise_error() self._seen_decl = True diff --git a/tests/data/indexes/yanked/simple/index.html b/tests/data/indexes/yanked/simple/index.html index 14181a3a0ad..67a2585ae13 100644 --- a/tests/data/indexes/yanked/simple/index.html +++ b/tests/data/indexes/yanked/simple/index.html @@ -1,4 +1,4 @@ - +
simple-1.0.tar.gz