From f13104abb274c4d419c7650f96259c3939f83edb Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sun, 30 Jan 2022 13:11:13 +0000 Subject: [PATCH 1/2] Accept lowercase doctype declarations --- src/pip/_internal/index/collector.py | 2 +- tests/data/indexes/yanked/simple/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 From d028ae5586643f1bc3fc8dd797c017bfa3206019 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sun, 30 Jan 2022 16:16:01 +0000 Subject: [PATCH 2/2] :newspaper: --- news/10844.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/10844.bugfix.rst 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.