Commit f23d778 1 parent 7e1467e commit f23d778 Copy full SHA for f23d778
File tree 1 file changed +4
-4
lines changed
src/python/pants/core/util_rules
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11
11
from dataclasses import dataclass
12
12
from enum import Enum
13
13
14
- from pkg_resources import Requirement
14
+ from packaging . requirements import Requirement
15
15
16
16
from pants .core .goals .export import (
17
17
ExportedBinary ,
@@ -293,9 +293,9 @@ def check_version_constraints(self) -> None:
293
293
if not self .version_constraints :
294
294
return None
295
295
# Note that this is not a Python requirement. We're just hackily piggybacking off
296
- # pkg_resource .Requirement's ability to check version constraints.
297
- constraints = Requirement . parse (f"{ self .name } { self .version_constraints } " )
298
- if constraints .specifier .contains (self .version ): # type: ignore[attr-defined]
296
+ # packaging.requirements .Requirement's ability to check version constraints.
297
+ constraints = Requirement (f"{ self .name } { self .version_constraints } " )
298
+ if constraints .specifier .contains (self .version ):
299
299
# all ok
300
300
return None
301
301
You can’t perform that action at this time.
0 commit comments