Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zlib ver #3735

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Fix clippy warning, mark failing test.
  • Loading branch information
DimitrisJim committed Jun 11, 2023
commit 8545578f98d9bb9f68383f90e598aa31dc57fd58
2 changes: 2 additions & 0 deletions Lib/test/test_zlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 51,8 @@

class VersionTestCase(unittest.TestCase):

DimitrisJim marked this conversation as resolved.
Show resolved Hide resolved
# TODO: RUSTPYTHON ZLIB_VERSION missing.
@unittest.expectedFailure
def test_library_version(self):
# Test that the major version of the actual library in use matches the
# major version that we were compiled against. We can't guarantee that
Expand Down
3 changes: 1 addition & 2 deletions stdlib/src/zlib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 17,6 @@ mod zlib {
write::ZlibEncoder, Compress, Compression, Decompress, FlushCompress, FlushDecompress,
Status,
};
use std::ffi::CStr;
use std::io::Write;

#[cfg(not(feature = "zlib"))]
Expand Down Expand Up @@ -61,7 60,7 @@ mod zlib {
#[pyattr(name = "ZLIB_RUNTIME_VERSION", once)]
fn zlib_runtime_version(_vm: &VirtualMachine) -> String {
unsafe {
CStr::from_ptr(libz_sys::zlibVersion())
std::ffi::CStr::from_ptr(libz_sys::zlibVersion())
.to_string_lossy()
.into_owned()
}
Expand Down