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

Allow calling builtin_method objects by default #112

Merged

Conversation

cjwatson
Copy link
Contributor

The type of these objects is a subclass of types.BuiltinMethodType, but not identical to it. This caused downstream failures on Python >= 3.12 due to refactoring of the io module, such as
zopefoundation/zope.file#13.

@cjwatson cjwatson requested a review from icemac August 15, 2024 13:52
The type of these objects is a subclass of `types.BuiltinMethodType`, but not
identical to it.  This caused downstream failures on Python >= 3.12 due to
refactoring of the `io` module, such as
zopefoundation/zope.file#13.
@cjwatson cjwatson force-pushed the default-builtin-method-checker branch from cae76ee to 275353a Compare August 15, 2024 13:53
@icemac icemac merged commit 6ad2d1e into zopefoundation:master Aug 16, 2024
47 checks passed
@icemac
Copy link
Member

icemac commented Aug 16, 2024

Just released as https://pypi.org/project/zope.security/7.1/.

@cjwatson cjwatson deleted the default-builtin-method-checker branch August 16, 2024 08:39
# PyCFunctionType but not identical to it. As of Python 3.12, the io
# module makes more use of PyCMethodType, so we can use it to identify
# that type.
type(io.BytesIO().getbuffer): _callableChecker,
Copy link
Member

Choose a reason for hiding this comment

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

Nice fix!

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.

4 participants