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: Adapt _multibytecodec to multi-phase initialization #24095

Merged
merged 17 commits into from
Jan 4, 2021

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Jan 4, 2021

  • Establish module state
  • Convert types to heap types and add them to module state
  • Add multi-phase init support

https://bugs.python.org/issue1635741

@erlend-aasland
Copy link
Contributor Author

@corona10 or @shihai1991, would one of you mind reviewing this PR?

Copy link
Member

@shihai1991 shihai1991 left a comment

Choose a reason for hiding this comment

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

LGTM. just nitpicks in here. And no refleaks when I run ./python -m test test_multibytecodec -R 3:3 -vv.

Modules/cjkcodecs/multibytecodec.c Outdated Show resolved Hide resolved
Modules/cjkcodecs/multibytecodec.c Outdated Show resolved Hide resolved
Modules/cjkcodecs/multibytecodec.c Outdated Show resolved Hide resolved
Modules/cjkcodecs/multibytecodec.c Outdated Show resolved Hide resolved
Modules/cjkcodecs/multibytecodec.c Show resolved Hide resolved
@erlend-aasland
Copy link
Contributor Author

Thanks for your review, @vstinner. PTAL.

Erlend Egeberg Aasland and others added 2 commits January 4, 2021 22:08
Co-authored-by: Victor Stinner <vstinner@python.org>
@vstinner vstinner merged commit 0b858cd into python:master Jan 4, 2021
@vstinner
Copy link
Member

vstinner commented Jan 4, 2021

Merged, thanks.

@erlend-aasland erlend-aasland deleted the multibytecodec-module-state branch January 4, 2021 21:37
@erlend-aasland
Copy link
Contributor Author

Merged, thanks.

Great, thanks for a thorough review!

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
)

Convert the _multibytecodec extension module (CJK codecs) to multi-phase
initialization (PEP 489).
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.

5 participants