Skip to content

Commit 4a1c4fb

Browse files
fridexfrenzymadness
authored andcommitted
Test with pip==22.0.3
1 parent 565886c commit 4a1c4fb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

micropipenv.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
from urllib.parse import urlparse
4949

5050
_LOGGER = logging.getLogger(__title__)
51-
_SUPPORTED_PIP_STR = ">=9,<=21.3.1" # Respects requirement in setup.py and latest pip to release date.
51+
_SUPPORTED_PIP_STR = ">=9,<=22.0.3" # Respects requirement in setup.py and latest pip to release date.
5252

5353
try:
5454
from pip import __version__ as pip_version
@@ -410,9 +410,15 @@ def _instantiate_package_finder(pip_session): # type: (PipSession) -> PackageFi
410410
)
411411

412412
link_collector = LinkCollector(session=pip_session, search_scope=search_scope)
413+
additional_kwargs = {}
414+
# pip 22 deprecates vendored html5lib and uses stdlib html.parser
415+
# https://pip.pypa.io/en/latest/news/#id19
416+
if Version(pip_version).release >= (22,):
417+
additional_kwargs["use_deprecated_html5lib"] = False
413418
return PackageFinder.create(
414419
link_collector=link_collector,
415420
selection_prefs=selection_prefs,
421+
**additional_kwargs, # type: ignore
416422
)
417423

418424

0 commit comments

Comments
 (0)