gh-76007: Deprecate `zlib.__version__` attribute by StanFromIreland · Pull Request #140130 · python/cpython
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that too :-)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be a valid feature request for AC or it’s somehow impossible?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea why it's not supported currently.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about the patch?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can propose it as a PR.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.