Skip to content

Commit d282526

Browse files
ecpostyouknowone
authored andcommitted
Modify the new 3.10.6 version of platform.py to work with platform.rs
1 parent 31fdb20 commit d282526

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Lib/platform.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,13 +1065,7 @@ def _sys_version(sys_version=None):
10651065
repr(sys_version))
10661066
version, buildno, builddate, buildtime, compiler = \
10671067
match.groups()
1068-
1069-
# XXX: RUSTPYTHON support
1070-
if "rustc" in sys_version:
1071-
name = "RustPython"
1072-
else:
1073-
name = 'CPython'
1074-
1068+
name = 'CPython'
10751069
if builddate is None:
10761070
builddate = ''
10771071
elif buildtime:
@@ -1308,6 +1302,10 @@ def freedesktop_os_release():
13081302
return _os_release_cache.copy()
13091303

13101304

1305+
# RustPython specific
1306+
from _platform import *
1307+
1308+
13111309
### Command line interface
13121310

13131311
if __name__ == '__main__':

Lib/test/test_platform.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ def tearDown(self):
121121
sys._git = self.save_git
122122
sys.platform = self.save_platform
123123

124+
# TODO: RUSTPYTHON
125+
@unittest.expectedFailure
124126
def test_sys_version(self):
125127
# Old test.
126128
for input, output in (

0 commit comments

Comments
 (0)