Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Lib/test/test_mmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ def test_non_ascii_byte(self):
self.assertEqual(m.read_byte(), b)
m.close()

@unittest.expectedFailure # TODO: RUSTPYTHON
@unittest.skipUnless(os.name == 'nt', 'requires Windows')
def test_tagname(self):
data1 = b"0123456789"
Expand Down Expand Up @@ -867,6 +868,7 @@ def test_resize_fails_if_mapping_held_elsewhere(self):
finally:
f.close()

@unittest.expectedFailure # TODO: RUSTPYTHON
@unittest.skipUnless(os.name == 'nt', 'requires Windows')
def test_resize_succeeds_with_error_for_second_named_mapping(self):
"""If a more than one mapping exists of the same name, none of them can
Expand Down
13 changes: 7 additions & 6 deletions crates/stdlib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,16 @@ chrono.workspace = true
mac_address = "1.1.3"
uuid = { version = "1.1.2", features = ["v1"] }

# mmap
[target.'cfg(all(unix, not(target_arch = "wasm32")))'.dependencies]
memmap2 = "0.5.10"
page_size = "0.6"

[target.'cfg(all(unix, not(target_os = "redox"), not(target_os = "ios")))'.dependencies]
termios = "0.3.3"

[target.'cfg(unix)'.dependencies]
rustix = { workspace = true }

# mmap + socket dependencies
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
memmap2 = "0.9.9"
page_size = "0.6"
gethostname = "1.0.2"
socket2 = { version = "0.6.0", features = ["all"] }
dns-lookup = "3.0"
Expand Down Expand Up @@ -146,12 +144,15 @@ widestring = { workspace = true }
[target.'cfg(windows)'.dependencies.windows-sys]
workspace = true
features = [
"Win32_Foundation",
"Win32_Networking_WinSock",
"Win32_NetworkManagement_IpHelper",
"Win32_NetworkManagement_Ndis",
"Win32_Security_Cryptography",
"Win32_Storage_FileSystem",
"Win32_System_Environment",
"Win32_System_IO"
"Win32_System_IO",
"Win32_System_Threading"
]

[target.'cfg(target_os = "macos")'.dependencies]
Expand Down
5 changes: 4 additions & 1 deletion crates/stdlib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ mod json;
mod locale;

mod math;
#[cfg(unix)]
#[cfg(any(unix, windows))]
mod mmap;
mod opcode;
mod pyexpat;
Expand Down Expand Up @@ -189,6 +189,9 @@ pub fn get_module_inits() -> impl Iterator<Item = (Cow<'static, str>, StdlibInit
#[cfg(unix)]
{
"_posixsubprocess" => posixsubprocess::make_module,
}
#[cfg(any(unix, windows))]
{
"mmap" => mmap::make_module,
}
#[cfg(all(unix, not(target_os = "redox")))]
Expand Down
Loading
Loading