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-43908: Add Py_TPFLAGS_IMMUTABLETYPE flag #25520

Merged
merged 10 commits into from Apr 28, 2021

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Apr 22, 2021

@erlend-aasland erlend-aasland marked this pull request as ready for review Apr 22, 2021
Doc/c-api/typeobj.rst Outdated Show resolved Hide resolved
Doc/c-api/typeobj.rst Outdated Show resolved Hide resolved
@erlend-aasland erlend-aasland marked this pull request as draft Apr 26, 2021
@erlend-aasland erlend-aasland changed the title bpo-43908: Add Py_TPFLAGS_IMMUTABLE flag and use it in arraymodule bpo-43908: Add Py_TPFLAGS_IMMUTABLE flag Apr 26, 2021
@erlend-aasland erlend-aasland marked this pull request as ready for review Apr 26, 2021
@erlend-aasland erlend-aasland requested a review from gvanrossum Apr 26, 2021
@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Apr 26, 2021

@erlend-aasland erlend-aasland changed the title bpo-43908: Add Py_TPFLAGS_IMMUTABLE flag bpo-43908: Add Py_TPFLAGS_IMMUTABLETYPE flag Apr 26, 2021
Objects/typeobject.c Show resolved Hide resolved
@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Apr 27, 2021

@pablogsal are you ok with the PR as it is?

Doc/c-api/typeobj.rst Outdated Show resolved Hide resolved
Doc/c-api/typeobj.rst Outdated Show resolved Hide resolved
Include/object.h Outdated Show resolved Hide resolved
Objects/typeobject.c Show resolved Hide resolved
Erlend Egeberg Aasland and others added 3 commits Apr 28, 2021
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Erlend Egeberg Aasland and others added 3 commits Apr 28, 2021
Doc/c-api/typeobj.rst Outdated Show resolved Hide resolved
Objects/typeobject.c Show resolved Hide resolved
Erlend Egeberg Aasland and others added 2 commits Apr 28, 2021
Co-authored-by: Victor Stinner <vstinner@python.org>
Copy link
Member

@vstinner vstinner left a comment

LGTM.

IMO it was important to mention "type attributes cannot be set nor deleted" to explain what "immutable" means. I stop nitpicking, let's move on to add this flag to types recently converted to heap types.

@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Apr 28, 2021

Thanks, @vstinner! I appreciate the doc/comment nitpicking; you're improved the PR considerably.

@vstinner
Copy link
Member

vstinner commented Apr 28, 2021

@erlend-aasland: Travis CI failed:

Fixing docs whitespace ... 1 file:

  Doc/c-api/typeobj.rst

Please fix the 1 file(s) with whitespace issues

(on UNIX you can run `make patchcheck` to make the fixes)

Doc/c-api/typeobj.rst Outdated Show resolved Hide resolved
@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Apr 28, 2021

@erlend-aasland: Travis CI failed:

Oops, I'll fix it. I normally do make html in the Doc directory to make sure I've got the reST markup right.

@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Apr 28, 2021

FYI, unrelated random ssl test failure on the macOS CI, @vstinner.

@vstinner vstinner merged commit 3b52c8d into python:master Apr 28, 2021
11 of 12 checks passed
@vstinner
Copy link
Member

vstinner commented Apr 28, 2021

Merged, thanks.

@erlend-aasland erlend-aasland deleted the immutable-types branch Apr 28, 2021
@pablogsal
Copy link
Member

pablogsal commented Apr 28, 2021

FYI, unrelated random ssl test failure on the macOS CI, @vstinner.

CC: @tiran This is happening white a lot

kreathon pushed a commit to kreathon/cpython that referenced this pull request May 2, 2021
Introduce Py_TPFLAGS_IMMUTABLETYPE flag for immutable type objects, and
modify PyType_Ready() to set it for static types.

Co-authored-by: Victor Stinner <vstinner@python.org>
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

7 participants