Warn on to-be-removed forms of constraints

This commit is contained in:
Pradyun Gedam 2020-07-04 17:56:45 +05:30
parent 20431888cb
commit 6437bec269
No known key found for this signature in database
GPG Key ID: DA17C4B29CB32E4B
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,7 @@ from pip._internal.exceptions import (
HashErrors,
UnsupportedPythonVersion,
)
from pip._internal.req.req_install import check_invalid_constraint_type
from pip._internal.req.req_set import RequirementSet
from pip._internal.resolution.base import BaseResolver
from pip._internal.utils.compatibility_tags import get_supported
@ -167,6 +168,8 @@ class Resolver(BaseResolver):
check_supported_wheels=check_supported_wheels
)
for req in root_reqs:
if req.constraint:
check_invalid_constraint_type(req)
requirement_set.add_requirement(req)
# Actually prepare the files, and collect any exceptions. Most hash