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

bpo-1635741: Enhance get_binascii_state() #19100

Closed
wants to merge 1 commit into from

Conversation

shihai1991
Copy link
Member

@shihai1991 shihai1991 commented Mar 21, 2020

@shihai1991 shihai1991 changed the title bpo-1635741: Enhance get_binascii_module() bpo-1635741: Enhance get_binascii_state() Mar 22, 2020
Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@corona10
Copy link
Member

corona10 commented Mar 24, 2020

Looks like _Pickle_GetState needs same change on sperate PR..

_Pickle_GetState(PyObject *module)

@shihai1991
Copy link
Member Author

Looks like _Pickle_GetState needs same change on sperate PR..

_Pickle_GetState(PyObject *module)

I create this sperate change due to binascii extension module have been ported to pep-489.
IMO, other extension modules' get_xxx_state() can be done with porting operation.

@shihai1991
Copy link
Member Author

cc @vstinner Hi, victor. It's a enhancement operation of binascii's get_module_state()

@vstinner
Copy link
Member

I don't think that this change is worth it. In practice, I don't see why the state would be NULL. If it's the case, the code should crash anyway :-) Existing code which checks that the state is not NULL with an assertion is fine. But I don't think that this change is worth it.

@vstinner vstinner closed this Mar 26, 2020
@shihai1991
Copy link
Member Author

got it, thanks, victor :)

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

Successfully merging this pull request may close these issues.

5 participants