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

erlend-aasland commented Jan 4, 2021

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

Copy link
Member

@shihai1991 shihai1991 left a comment

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
@shihai1991 shihai1991 requested review from vstinner, corona10 and encukou Jan 4, 2021
@erlend-aasland erlend-aasland requested a review from shihai1991 Jan 4, 2021
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 erlend-aasland force-pushed the multibytecodec-module-state branch from 90deaf4 to e8b3021 Compare Jan 4, 2021
@erlend-aasland erlend-aasland requested a review from vstinner Jan 4, 2021
@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Jan 4, 2021

Thanks for your review, @vstinner. PTAL.

Modules/cjkcodecs/multibytecodec.c Outdated Show resolved Hide resolved
Erlend Egeberg Aasland and others added 2 commits Jan 4, 2021
Co-authored-by: Victor Stinner <vstinner@python.org>
@erlend-aasland erlend-aasland requested a review from vstinner Jan 4, 2021
@vstinner vstinner merged commit 0b858cd into python:master Jan 4, 2021
3 checks passed
@vstinner
Copy link
Member

vstinner commented Jan 4, 2021

Merged, thanks.

@erlend-aasland erlend-aasland deleted the multibytecodec-module-state branch Jan 4, 2021
@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Jan 4, 2021

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.

None yet

5 participants