@@ -53,53 +53,40 @@ pub enum LoweredMarkerValueString {
53
53
ImplementationName ,
54
54
/// `os_name`
55
55
OsName ,
56
- /// Deprecated `os.name` from <https://peps.python.org/pep-0345/#environment-markers>
57
- OsNameDeprecated ,
58
56
/// `platform_machine`
59
57
PlatformMachine ,
60
58
/// Deprecated `platform.machine` from <https://peps.python.org/pep-0345/#environment-markers>
61
- PlatformMachineDeprecated ,
62
59
/// `platform_python_implementation`
63
60
PlatformPythonImplementation ,
64
- /// Deprecated `platform.python_implementation` from <https://peps.python.org/pep-0345/#environment-markers>
65
- PlatformPythonImplementationDeprecated ,
66
- /// Deprecated `python_implementation` from <https://github.com/pypa/packaging/issues/72>
67
- PythonImplementationDeprecated ,
68
61
/// `platform_release`
69
62
PlatformRelease ,
70
63
/// `platform_system`
71
64
PlatformSystem ,
72
65
/// `platform_version`
73
66
PlatformVersion ,
74
- /// Deprecated `platform.version` from <https://peps.python.org/pep-0345/#environment-markers>
75
- PlatformVersionDeprecated ,
76
67
/// `sys_platform`
77
68
SysPlatform ,
78
- /// Deprecated `sys.platform` from <https://peps.python.org/pep-0345/#environment-markers>
79
- SysPlatformDeprecated ,
80
69
}
81
70
82
71
impl From < MarkerValueString > for LoweredMarkerValueString {
83
72
fn from ( value : MarkerValueString ) -> Self {
84
73
match value {
85
74
MarkerValueString :: ImplementationName => Self :: ImplementationName ,
86
75
MarkerValueString :: OsName => Self :: OsName ,
87
- MarkerValueString :: OsNameDeprecated => Self :: OsNameDeprecated ,
76
+ MarkerValueString :: OsNameDeprecated => Self :: OsName ,
88
77
MarkerValueString :: PlatformMachine => Self :: PlatformMachine ,
89
- MarkerValueString :: PlatformMachineDeprecated => Self :: PlatformMachineDeprecated ,
78
+ MarkerValueString :: PlatformMachineDeprecated => Self :: PlatformMachine ,
90
79
MarkerValueString :: PlatformPythonImplementation => Self :: PlatformPythonImplementation ,
91
80
MarkerValueString :: PlatformPythonImplementationDeprecated => {
92
- Self :: PlatformPythonImplementationDeprecated
93
- }
94
- MarkerValueString :: PythonImplementationDeprecated => {
95
- Self :: PythonImplementationDeprecated
81
+ Self :: PlatformPythonImplementation
96
82
}
83
+ MarkerValueString :: PythonImplementationDeprecated => Self :: PlatformPythonImplementation ,
97
84
MarkerValueString :: PlatformRelease => Self :: PlatformRelease ,
98
85
MarkerValueString :: PlatformSystem => Self :: PlatformSystem ,
99
86
MarkerValueString :: PlatformVersion => Self :: PlatformVersion ,
100
- MarkerValueString :: PlatformVersionDeprecated => Self :: PlatformVersionDeprecated ,
87
+ MarkerValueString :: PlatformVersionDeprecated => Self :: PlatformVersion ,
101
88
MarkerValueString :: SysPlatform => Self :: SysPlatform ,
102
- MarkerValueString :: SysPlatformDeprecated => Self :: SysPlatformDeprecated ,
89
+ MarkerValueString :: SysPlatformDeprecated => Self :: SysPlatform ,
103
90
}
104
91
}
105
92
}
@@ -109,24 +96,14 @@ impl From<LoweredMarkerValueString> for MarkerValueString {
109
96
match value {
110
97
LoweredMarkerValueString :: ImplementationName => Self :: ImplementationName ,
111
98
LoweredMarkerValueString :: OsName => Self :: OsName ,
112
- LoweredMarkerValueString :: OsNameDeprecated => Self :: OsNameDeprecated ,
113
99
LoweredMarkerValueString :: PlatformMachine => Self :: PlatformMachine ,
114
- LoweredMarkerValueString :: PlatformMachineDeprecated => Self :: PlatformMachineDeprecated ,
115
100
LoweredMarkerValueString :: PlatformPythonImplementation => {
116
101
Self :: PlatformPythonImplementation
117
102
}
118
- LoweredMarkerValueString :: PlatformPythonImplementationDeprecated => {
119
- Self :: PlatformPythonImplementationDeprecated
120
- }
121
- LoweredMarkerValueString :: PythonImplementationDeprecated => {
122
- Self :: PythonImplementationDeprecated
123
- }
124
103
LoweredMarkerValueString :: PlatformRelease => Self :: PlatformRelease ,
125
104
LoweredMarkerValueString :: PlatformSystem => Self :: PlatformSystem ,
126
105
LoweredMarkerValueString :: PlatformVersion => Self :: PlatformVersion ,
127
- LoweredMarkerValueString :: PlatformVersionDeprecated => Self :: PlatformVersionDeprecated ,
128
106
LoweredMarkerValueString :: SysPlatform => Self :: SysPlatform ,
129
- LoweredMarkerValueString :: SysPlatformDeprecated => Self :: SysPlatformDeprecated ,
130
107
}
131
108
}
132
109
}
@@ -136,19 +113,13 @@ impl Display for LoweredMarkerValueString {
136
113
fn fmt ( & self , f : & mut Formatter < ' _ > ) -> std:: fmt:: Result {
137
114
match self {
138
115
Self :: ImplementationName => f. write_str ( "implementation_name" ) ,
139
- Self :: OsName | Self :: OsNameDeprecated => f. write_str ( "os_name" ) ,
140
- Self :: PlatformMachine | Self :: PlatformMachineDeprecated => {
141
- f. write_str ( "platform_machine" )
142
- }
143
- Self :: PlatformPythonImplementation
144
- | Self :: PlatformPythonImplementationDeprecated
145
- | Self :: PythonImplementationDeprecated => f. write_str ( "platform_python_implementation" ) ,
116
+ Self :: OsName => f. write_str ( "os_name" ) ,
117
+ Self :: PlatformMachine => f. write_str ( "platform_machine" ) ,
118
+ Self :: PlatformPythonImplementation => f. write_str ( "platform_python_implementation" ) ,
146
119
Self :: PlatformRelease => f. write_str ( "platform_release" ) ,
147
120
Self :: PlatformSystem => f. write_str ( "platform_system" ) ,
148
- Self :: PlatformVersion | Self :: PlatformVersionDeprecated => {
149
- f. write_str ( "platform_version" )
150
- }
151
- Self :: SysPlatform | Self :: SysPlatformDeprecated => f. write_str ( "sys_platform" ) ,
121
+ Self :: PlatformVersion => f. write_str ( "platform_version" ) ,
122
+ Self :: SysPlatform => f. write_str ( "sys_platform" ) ,
152
123
}
153
124
}
154
125
}
0 commit comments