@@ -53,53 +53,40 @@ pub enum LoweredMarkerValueString {
5353 ImplementationName ,
5454 /// `os_name`
5555 OsName ,
56- /// Deprecated `os.name` from <https://peps.python.org/pep-0345/#environment-markers>
57- OsNameDeprecated ,
5856 /// `platform_machine`
5957 PlatformMachine ,
6058 /// Deprecated `platform.machine` from <https://peps.python.org/pep-0345/#environment-markers>
61- PlatformMachineDeprecated ,
6259 /// `platform_python_implementation`
6360 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 ,
6861 /// `platform_release`
6962 PlatformRelease ,
7063 /// `platform_system`
7164 PlatformSystem ,
7265 /// `platform_version`
7366 PlatformVersion ,
74- /// Deprecated `platform.version` from <https://peps.python.org/pep-0345/#environment-markers>
75- PlatformVersionDeprecated ,
7667 /// `sys_platform`
7768 SysPlatform ,
78- /// Deprecated `sys.platform` from <https://peps.python.org/pep-0345/#environment-markers>
79- SysPlatformDeprecated ,
8069}
8170
8271impl From < MarkerValueString > for LoweredMarkerValueString {
8372 fn from ( value : MarkerValueString ) -> Self {
8473 match value {
8574 MarkerValueString :: ImplementationName => Self :: ImplementationName ,
8675 MarkerValueString :: OsName => Self :: OsName ,
87- MarkerValueString :: OsNameDeprecated => Self :: OsNameDeprecated ,
76+ MarkerValueString :: OsNameDeprecated => Self :: OsName ,
8877 MarkerValueString :: PlatformMachine => Self :: PlatformMachine ,
89- MarkerValueString :: PlatformMachineDeprecated => Self :: PlatformMachineDeprecated ,
78+ MarkerValueString :: PlatformMachineDeprecated => Self :: PlatformMachine ,
9079 MarkerValueString :: PlatformPythonImplementation => Self :: PlatformPythonImplementation ,
9180 MarkerValueString :: PlatformPythonImplementationDeprecated => {
92- Self :: PlatformPythonImplementationDeprecated
93- }
94- MarkerValueString :: PythonImplementationDeprecated => {
95- Self :: PythonImplementationDeprecated
81+ Self :: PlatformPythonImplementation
9682 }
83+ MarkerValueString :: PythonImplementationDeprecated => Self :: PlatformPythonImplementation ,
9784 MarkerValueString :: PlatformRelease => Self :: PlatformRelease ,
9885 MarkerValueString :: PlatformSystem => Self :: PlatformSystem ,
9986 MarkerValueString :: PlatformVersion => Self :: PlatformVersion ,
100- MarkerValueString :: PlatformVersionDeprecated => Self :: PlatformVersionDeprecated ,
87+ MarkerValueString :: PlatformVersionDeprecated => Self :: PlatformVersion ,
10188 MarkerValueString :: SysPlatform => Self :: SysPlatform ,
102- MarkerValueString :: SysPlatformDeprecated => Self :: SysPlatformDeprecated ,
89+ MarkerValueString :: SysPlatformDeprecated => Self :: SysPlatform ,
10390 }
10491 }
10592}
@@ -109,24 +96,14 @@ impl From<LoweredMarkerValueString> for MarkerValueString {
10996 match value {
11097 LoweredMarkerValueString :: ImplementationName => Self :: ImplementationName ,
11198 LoweredMarkerValueString :: OsName => Self :: OsName ,
112- LoweredMarkerValueString :: OsNameDeprecated => Self :: OsNameDeprecated ,
11399 LoweredMarkerValueString :: PlatformMachine => Self :: PlatformMachine ,
114- LoweredMarkerValueString :: PlatformMachineDeprecated => Self :: PlatformMachineDeprecated ,
115100 LoweredMarkerValueString :: PlatformPythonImplementation => {
116101 Self :: PlatformPythonImplementation
117102 }
118- LoweredMarkerValueString :: PlatformPythonImplementationDeprecated => {
119- Self :: PlatformPythonImplementationDeprecated
120- }
121- LoweredMarkerValueString :: PythonImplementationDeprecated => {
122- Self :: PythonImplementationDeprecated
123- }
124103 LoweredMarkerValueString :: PlatformRelease => Self :: PlatformRelease ,
125104 LoweredMarkerValueString :: PlatformSystem => Self :: PlatformSystem ,
126105 LoweredMarkerValueString :: PlatformVersion => Self :: PlatformVersion ,
127- LoweredMarkerValueString :: PlatformVersionDeprecated => Self :: PlatformVersionDeprecated ,
128106 LoweredMarkerValueString :: SysPlatform => Self :: SysPlatform ,
129- LoweredMarkerValueString :: SysPlatformDeprecated => Self :: SysPlatformDeprecated ,
130107 }
131108 }
132109}
@@ -136,19 +113,13 @@ impl Display for LoweredMarkerValueString {
136113 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> std:: fmt:: Result {
137114 match self {
138115 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" ) ,
146119 Self :: PlatformRelease => f. write_str ( "platform_release" ) ,
147120 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" ) ,
152123 }
153124 }
154125}
0 commit comments