← 返回首页
bpo-1635741: Enhance get_binascii_state() by shihai1991 · Pull Request #19100 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

bpo-1635741: Enhance get_binascii_state()#19100

Closed
shihai1991 wants to merge 1 commit into
python:masterfrom
shihai1991:bpo_39824_1
Closed

bpo-1635741: Enhance get_binascii_state()#19100
shihai1991 wants to merge 1 commit into
python:masterfrom
shihai1991:bpo_39824_1

Conversation

shihai1991 commented Mar 21, 2020
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

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

corona10 left a comment
edited
Loading

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 Hide comment

Looks good to me.

corona10 commented Mar 24, 2020
edited
Loading

Copy link
Copy Markdown
Member

Looks like _Pickle_GetState needs same change on sperate PR..

_Pickle_GetState(PyObject *module)

Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
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 closed this Mar 26, 2020

Copy link
Copy Markdown
Member Author

got it, thanks, victor :)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Footer

© 2026 GitHub, Inc.