[issue43973] Use Py_TPFLAGS_IMMUTABLETYPE in __class__ assignments check

2021-04-30 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Do you think that something should be changed? If yes, please open a new > separated issue. No, my comment was just for information :) -- ___ Python tracker

[issue43973] Use Py_TPFLAGS_IMMUTABLETYPE in __class__ assignments check

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: > Ok! Did you see bpo-24912 regarding the ModuleType check? No, I didn't. Sorry, there are too many things to look at, and too little bit. Do you think that something should be changed? If yes, please open a new separated issue. --

[issue43973] Use Py_TPFLAGS_IMMUTABLETYPE in __class__ assignments check

2021-04-30 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43973] Use Py_TPFLAGS_IMMUTABLETYPE in __class__ assignments check

2021-04-30 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ok! Did you see bpo-24912 regarding the ModuleType check? -- ___ Python tracker ___ ___

[issue43973] Use Py_TPFLAGS_IMMUTABLETYPE in __class__ assignments check

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset b73b5fb9ea08156991a065c1696e8d8cf7622482 by Erlend Egeberg Aasland in branch 'master': bpo-43973: object_set_class() checks Py_TPFLAGS_IMMUTABLETYPE (GH-25714) https://github.com/python/cpython/commit/b73b5fb9ea08156991a065c1696e8d8cf7622482

[issue43973] Use Py_TPFLAGS_IMMUTABLETYPE in __class__ assignments check

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: > IMO, we can drop most (all?) of the huge comment before the check in > object_set_class(). I don't think so. I don't understand why it's allowed to override the __class__ attribute of ModuleType instances whereas it's a static type. IMO the long comment

[issue43973] Use Py_TPFLAGS_IMMUTABLETYPE in __class__ assignments check

2021-04-29 Thread Shreyan Avigyan
Change by Shreyan Avigyan : -- nosy: +shreyanavigyan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43973] Use Py_TPFLAGS_IMMUTABLETYPE in __class__ assignments check

2021-04-29 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +24403 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25714 ___ Python tracker

[issue43973] Use Py_TPFLAGS_IMMUTABLETYPE in __class__ assignments check

2021-04-29 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: IMO, we can drop most (all?) of the huge comment before the check in object_set_class(). History is preserved in the git log. Contrary to Py_TPFLAGS_HEAPTYPE, using Py_TPFLAGS_IMMUTABLETYPE speaks for itself. We might reduce it to just refer to to

[issue43973] Use Py_TPFLAGS_IMMUTABLETYPE in __class__ assignments check

2021-04-29 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Use Py_TPFLAGS_IMMUTABLETYPE iso. Py_TPFLAGS_HEAPTYPE in object_set_class(). See also: - bpo-43908 (particularly msg392286) - bpo-24912 -