Skip to content

Conversation

@StanFromIreland
Copy link
Member

IIRC we compile Windows releases with zlib-ng, but there is nothing stopping you from doing so on other platforms. The constant is also not documented as "Availability: Windows only".

@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@emmatyping
Copy link
Member

emmatyping commented Oct 14, 2025

Hi Stan! Thank you for bringing this up. Couple of points:

  1. Zlib-ng is not available on Unix yet: Use zlib-ng (fast!) rather than mainline stale zlib in binary releases cpython#91349 (comment)
    I suppose you could install zlib-ng as zlib and maybe it would work? But you wouldn't get the right includes to define this variable I don't think.
  2. Changes to typeshed should go to https://github.com/python/typeshed. Mypy vendors typeshed but changes should preferably made to typeshed itself, then synced here. I'd recommend opening an issue on the typeshed issue tracker to discuss this.

I have plans to modify the CPython Unix build to allow building with zlib-ng so it would be good to clarify what the availability of it is (feel free to ping me on a typeshed issue)

For now though, I am going to close this PR because there isn't anything mypy-specific to be done here. Hope that's okay!

@emmatyping emmatyping closed this Oct 14, 2025
@StanFromIreland StanFromIreland deleted the StanFromIreland-patch-1 branch October 14, 2025 18:47
@StanFromIreland
Copy link
Member Author

I suppose you could install zlib-ng as zlib and maybe it would work? But you wouldn't get the right includes to define this variable I don't think.

It is present in the Fedora builds, and it is compiled for me with zlib-ng present on my system, for example:

$ python3.14
Python 3.14.0 (main, Oct  7 2025, 00:00:00) [GCC 15.2.1 20250808 (Red Hat 15.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import zlib
>>> zlib.ZLIBNG_VERSION
'2.2.5'

As for mypy vs. typeshed, apologies I got mixed up between the two!

@emmatyping
Copy link
Member

It is present in the Fedora builds

Good to know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants