Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e400c60

Browse files
committed
Remove _platform RustPython-only module
1 parent d282526 commit e400c60

File tree

4 files changed

+7
-45
lines changed

4 files changed

+7
-45
lines changed

Lib/platform.py

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

13041310

1305-
# RustPython specific
1306-
from _platform import *
1307-
1308-
13091311
### Command line interface
13101312

13111313
if __name__ == '__main__':

Lib/test/test_platform.py

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

124-
# TODO: RUSTPYTHON
125-
@unittest.expectedFailure
126124
def test_sys_version(self):
127125
# Old test.
128126
for input, output in (

stdlib/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ mod json;
1818
mod math;
1919
#[cfg(unix)]
2020
mod mmap;
21-
mod platform;
2221
mod pyexpat;
2322
mod pystruct;
2423
mod random;
@@ -100,7 +99,6 @@ pub fn get_module_inits() -> impl Iterator<Item = (Cow<'static, str>, StdlibInit
10099
"_json" => json::make_module,
101100
"math" => math::make_module,
102101
"pyexpat" => pyexpat::make_module,
103-
"_platform" => platform::make_module,
104102
"_random" => random::make_module,
105103
"_statistics" => statistics::make_module,
106104
"_struct" => pystruct::make_module,

stdlib/src/platform.rs

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)