Commit 712ad38 1 parent 1240c4a commit 712ad38 Copy full SHA for 712ad38
File tree 1 file changed +3
-8
lines changed
src/python/pants/backend/python/util_rules
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 8
8
import logging
9
9
from collections .abc import Mapping
10
10
from dataclasses import dataclass
11
- from typing import TYPE_CHECKING , Any
11
+ from typing import Any
12
12
13
- from packaging .version import parse
14
-
15
- if TYPE_CHECKING :
16
- # We seem to get a version of `packaging` that doesn't have `LegacyVersion` when running
17
- # pytest..
18
- from packaging .version import LegacyVersion , Version
13
+ from packaging .version import Version , parse
19
14
20
15
from pants .backend .python .util_rules .pex_requirements import (
21
16
LoadedLockfile ,
34
29
35
30
@dataclass (frozen = True , order = True )
36
31
class PythonRequirementVersion :
37
- _parsed : LegacyVersion | Version
32
+ _parsed : Version
38
33
39
34
@classmethod
40
35
def parse (cls , version : str ) -> PythonRequirementVersion :
You can’t perform that action at this time.
0 commit comments