FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-76007: Deprecate `zlib.__version__` attribute by StanFromIreland · Pull Request #140130 · python/cpython · GitHub

Repository navigation

gh-76007: Deprecate zlib.__version__ attribute - #140130

Merged
vstinner merged 3 commits into
python:mainfrom
StanFromIreland:zlib-version
Oct 15, 2025
Merged

vstinner merged 3 commits into
python:mainfrom
StanFromIreland:zlib-version

Conversation

StanFromIreland commented Oct 14, 2025 •
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Member

Comment thread Modules/zlibmodule.c Outdated
Comment thread Modules/zlibmodule.c Outdated
Comment thread Modules/zlibmodule.c Outdated

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Comment thread Modules/zlibmodule.c
ZLIB_CRC32_COMBINE_METHODDEF
ZLIB_DECOMPRESS_METHODDEF
ZLIB_DECOMPRESSOBJ_METHODDEF
{"__getattr__", zlib_getattr, METH_VARARGS, "Module __getattr__"},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I tried to convert the function to Argument Clinic, but it failed, oh!

Error in file 'Modules/zlibmodule.c' on line 2019:
'__getattr__' is a special method and cannot be converted to Argument Clinic!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I tried that too :-)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Would this be a valid feature request for AC or it’s somehow impossible?

StanFromIreland Oct 19, 2025 •
edited
Loading

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I tried, and it is relatively straightforward (I based my implementation on METHOD_INIT's), here is a patch. I do not know if there was a reason for this not being done before, other than there not being a need, as it is explicitly in the unsupported list, maybe Victor knows more?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I have no idea why it's not supported currently.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

What do you think about the patch?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

You can propose it as a PR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I opened #140376

vstinner merged commit 46f11b3 into python:main Oct 15, 2025
49 checks passed

Copy link
Copy Markdown
Member

Merged, thanks. I also saw that version but forgot to deprecate it :-)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL