[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: In Python 3.11, 68 heap types have the Py_TPFLAGS_IMMUTABLETYPE flag: * _blake2.blake2b * _blake2.blake2s * _bz2.BZ2Compressor * _bz2.BZ2Decompressor * _csv.Dialect * _csv.reader * _csv.writer * _dbm.dbm * _gdbm.gdbm * _hashlib.HASH * _hashlib.HASHXOF *

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: > Should the immutable flag also be applied to the heap types converted in and > before Python 3.9 before closing this issue? I don't think that Python 3.9 should be changed. It's too late. IMO this issue is not important enough to introduce a new type flag

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-07-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Yeah, I think these should be changed, but lest give a bit of time for other core devs to mention what they think -- ___ Python tracker

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-07-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: These types now lack the Py_TPFLAGS_IMMUTABLETYPE flag: ## Types converted in Python 3.9 - _abc._abc_data - _json.Encoder - _json.Scanner - _random.Random - _struct.Struct - _struct.unpack_iterator - ast.AST - posix.DirEntry - posix.ScandirIterator -

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-07-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I would say yes. Do you have a compiled list of what's left? -- ___ Python tracker ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-07-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Is anything left here? Should the immutable flag also be applied to the heap types converted in and before Python 3.9 before closing this issue? -- ___ Python tracker

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-07-08 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: release blocker -> ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-07-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Is anything left here? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-07-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset a3739b207adb5d17e3b53347df05b54b1a8b87f0 by Erlend Egeberg Aasland in branch 'main': bpo-43908: Immutable types inherit vectorcall (GH-27001) https://github.com/python/cpython/commit/a3739b207adb5d17e3b53347df05b54b1a8b87f0 --

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-07-02 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +25562 pull_request: https://github.com/python/cpython/pull/27001 ___ Python tracker ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-07-01 Thread Guido van Rossum
Guido van Rossum added the comment: +1-- --Guido (mobile) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-07-01 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: In inherit_slots() in Objects/typeobject.c, Py_TPFLAGS_HAVE_VECTORCALL inheritance depends on if the base type is a heap type or not. This aligns with PEP 590[1]: Heap types never inherit the vectorcall protocol because that would not be safe (heap

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-06-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 7297d74251de3b1c02dcdb9ca281461cc7fb4535 by Miss Islington (bot) in branch '3.10': bpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351) (GH-26766)

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-06-17 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 00710e6346fd2394aa020b2dfae170093effac98 by Erlend Egeberg Aasland in branch 'main': bpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351)

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-06-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +25352 pull_request: https://github.com/python/cpython/pull/26766 ___ Python tracker ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-06-05 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: PR 26351 adds the Py_TPFLAGS_IMMUTABLETYPE type flag to all types converted to heap type during 3.10 development. -- ___ Python tracker

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-06-04 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: deferred blocker -> release blocker ___ Python tracker ___ ___ Python-bugs-list

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-05-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24941 pull_request: https://github.com/python/cpython/pull/26351 ___ Python tracker ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-05-25 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Notice this issue is marked as "deferred blocker" it won't block this beta release (beta 2) but it will block the next. -- ___ Python tracker

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-05-25 Thread STINNER Victor
STINNER Victor added the comment: Guido: "I don’t think we’re waiting for more crazy hacks." Right now, _ast.AST is still mutable: $ ./python Python 3.11.0a0 (heads/subtype_dealloc-dirty:efd45ad788, May 21 2021 >>> import _ast >>> _ast.AST.x=1 >>> _ast.AST.x 1 --

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-05-25 Thread STINNER Victor
STINNER Victor added the comment: main branch: commit a09fc9c63f1b5980c62ff2712f67500bacb92b04 Author: Erlend Egeberg Aasland Date: Fri May 14 00:44:55 2021 +0200 bpo-43908: Add What's New entry for Py_TPFLAGS_IMMUTABLETYPE flag (GH-25816) --

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-05-13 Thread miss-islington
miss-islington added the comment: New changeset 3222b25b2f55d3b3d1dab4547bf7b5adaa1d874f by Miss Islington (bot) in branch '3.10': [3.10] bpo-43908: Add What's New entry for Py_TPFLAGS_IMMUTABLETYPE flag (GH-25816) (GH-26115)

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-05-13 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 11.0 -> 12.0 pull_requests: +24760 pull_request: https://github.com/python/cpython/pull/26115 ___ Python tracker

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-05-02 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +24502 pull_request: https://github.com/python/cpython/pull/25816 ___ Python tracker ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-05-02 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Victor: > And in the "Porting to Python 3.10", I don't know if we should suggest > reviewing metatypes implemented in C which overrides tp_setattro, to take the > new flag in account. I don't know either; perhaps someone else could chime in here.

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-05-02 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Should I apply the flags on other newly converted heap types? -- ___ Python tracker ___ ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-05-02 Thread Christian Heimes
Christian Heimes added the comment: New changeset 91554e4c5ca3c762998296522f854a7166ba84f0 by Christian Heimes in branch 'master': bpo-43908: Mark ssl, hash, and hmac types as immutable (GH-25792) https://github.com/python/cpython/commit/91554e4c5ca3c762998296522f854a7166ba84f0 --

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-05-01 Thread Christian Heimes
Christian Heimes added the comment: What's the plan for heap type exceptions? PyErr_NewException() and PyErr_NewExceptionWithDoc() doesn't accept flags. -- ___ Python tracker

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-05-01 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +24482 pull_request: https://github.com/python/cpython/pull/25792 ___ Python tracker ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I am decreasing the priority of this to deferred blocker since https://bugs.python.org/issue43916 is mostly fixed -- priority: release blocker -> deferred blocker ___ Python tracker

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Ok -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Ok -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: > Victor, the types, that Py_TPFLAGS_IMMUTABLETYPE flag is yet to be applied > to, are different for 3.9 and 3.10. Should we proceed with that? (If yes I'd > be happy to collaborate with Erlend to apply the flag on those types.) Please don't change the

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Victor, the types, that Py_TPFLAGS_IMMUTABLETYPE flag is yet to be applied to, are different for 3.9 and 3.10. Should we proceed with that? (If yes I'd be happy to collaborate with Erlend to apply the flag on those types.) --

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: Moreover, all static types get the Py_TPFLAGS_IMMUTABLETYPE flag automatically. For example, "./python -c pass" initializes 196 immutable static types: * ArithmeticError * AssertionError * AttributeError * BaseException * BlockingIOError * BrokenPipeError *

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: Currently, 4 types are declared with Py_TPFLAGS_IMMUTABLETYPE explicitly: * array.array * re.Pattern * re.Match * _sre.SRE_Scanner -- ___ Python tracker

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 64141382ecbad665d5738ff26d15505f3427c724 by Erlend Egeberg Aasland in branch 'master': bpo-43908: check_set_special_type_attr() checks Py_TPFLAGS_IMMUTABLETYPE (GH-25743)

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Yes, I’ll have a look at it this afternoon. (On mobile now.) -- ___ Python tracker ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: Erlend: would you mind to document the new Py_TPFLAGS_IMMUTABLETYPE flag in the C API section of What's New in Python 3.10? https://docs.python.org/dev/whatsnew/3.10.html#c-api-changes In "New Features", something like: * Add a new

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: https://docs.python.org/dev/c-api/typeobj.html#Py_TPFLAGS_IMMUTABLETYPE says: "This bit is set for type objects that are immutable: type attributes cannot be set nor deleted." Is it possible that a metatype (type subtype) overrides tp_setattro and ignores

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: PyStdPrinter_Type implements tp_new, but tp_init always fail: static int stdprinter_init(PyObject *self, PyObject *args, PyObject *kwds) { PyErr_SetString(PyExc_TypeError, "cannot create 'stderrprinter' instances"); return -1; }

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-24912 "The type of cached objects is mutable". -- ___ Python tracker ___ ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Included in GH-25743 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I just found it myself :) pushing out the PR now! -- ___ Python tracker ___ ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: Hum, another function should be updated. Do you want to propose a fix Erlend? static int type_set_annotations(PyTypeObject *type, PyObject *value, void *context) { if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) { PyErr_Format(PyExc_TypeError, "can't

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +24433 pull_request: https://github.com/python/cpython/pull/25743 ___ Python tracker ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Yep, I agree. From my coverage output, it seems that this branch is never executed. BUT, that may of course be because there's no test that exercises this branch. -- ___ Python tracker

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: > Is this always the case? If so, can we turn the check in > check_set_special_type_attr() into an assert? In any case, > Py_TPFLAGS_IMMUTABLETYPE should be used, not !Py_TPFLAGS_HEAPTYPE. I don't know. In case of doubt, I suggest to only replace

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Victor: > check_set_special_type_attr() is used to prevent setting the following > attributes: > [...] > Right now, I cannot set the attribues on array.array type: > [...] > I guess that type_setattro() is used and it checks for >

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-30 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Py_TPFLAGS_IMMUTABLETYPE has been applied to array.array by Erlend in https://github.com/python/cpython/pull/25696. Should Py_TPFLAGS_IMMUTABLETYPE be applied to other heap types also (the ones that were converted from static types)? --

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-29 Thread Guido van Rossum
Guido van Rossum added the comment: I don’t think we’re waiting for more crazy hacks. On Thu, Apr 29, 2021 at 07:27 STINNER Victor wrote: > > STINNER Victor added the comment: > > > > https://discuss.python.org/t/list-of-built-in-types-converted-to-heap-types/8403 > > In the past, I used

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: > https://discuss.python.org/t/list-of-built-in-types-converted-to-heap-types/8403 In the past, I used _random.Random for manual tests to compare static type and heap types, check which one is mutable. C type _random.Random is inherited by Python type

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-29 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > check_set_special_type_attr() must also be updated to check for > Py_TPFLAGS_IMMUTABLETYPE flag. Ok, lets just use this issue for the PR. I can fix it in an hour or so. -- ___ Python tracker

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: > Erlend: Do you want to write such change? Erlend created bpo-43973 and PR 25714. -- ___ Python tracker ___

[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2021-04-29 Thread STINNER Victor
Change by STINNER Victor : -- title: array.array should remain immutable -> array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: check_set_special_type_attr() must also be updated to check for Py_TPFLAGS_IMMUTABLETYPE flag. -- ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-29 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +24404 pull_request: https://github.com/python/cpython/pull/25714 ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5bd0619533ed6587ce76402e9b0b118eb4d4dd09 by Victor Stinner in branch 'master': bpo-43908: Document Static Types in the C API (GH-25710) https://github.com/python/cpython/commit/5bd0619533ed6587ce76402e9b0b118eb4d4dd09 --

[issue43908] array.array should remain immutable

2021-04-29 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Erlend: Do you want to write such change? Sure, I'll have a go at it. Thanks. -- ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: > BTW, slightly related, AFAICT: > - > https://github.com/python/cpython/blob/e047239eafefe8b19725efffe7756443495cf78b/Objects/typeobject.c#L4620-L4668 > - bpo-24912 object_set_class() must be changed to check for Py_TPFLAGS_IMMUTABLETYPE flag, rather than

[issue43908] array.array should remain immutable

2021-04-29 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +24399 pull_request: https://github.com/python/cpython/pull/25710 ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-29 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: The types converted to heap types in 3.10 are different from 3.9 therefore just backporting wouldn't help. Should we now try to apply the flags on other types? If yes then I'd like to volunteer to apply the flags on the types converted in 3.9. --

[issue43908] array.array should remain immutable

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset c6ad03fddf4b04c60dca4327140e59fb2dcca8e5 by Erlend Egeberg Aasland in branch 'master': bpo-43908: Make array.array type immutable (GH-25696) https://github.com/python/cpython/commit/c6ad03fddf4b04c60dca4327140e59fb2dcca8e5 --

[issue43908] array.array should remain immutable

2021-04-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5daf70b22e72ea1a88c05975f69120b8c4e4927f by Erlend Egeberg Aasland in branch 'master': bpo-43908: Make re types immutable (GH-25697) https://github.com/python/cpython/commit/5daf70b22e72ea1a88c05975f69120b8c4e4927f --

[issue43908] array.array should remain immutable

2021-04-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: In any case, that's my personal opinion of course. What we should do is decide collectively if immutability is defined behaviour. If we decide that it is, we need regression tests. If we define that as "nice to have" but ultimately

[issue43908] array.array should remain immutable

2021-04-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Immutability of the type is mainly an implementation detail I kindly disagree and based on the title of this issue I think more people have a similar opinion. -- ___ Python tracker

[issue43908] array.array should remain immutable

2021-04-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not sure tests are needed here. Immutability of the type is mainly an implementation detail. We keep the types immutable because we don't want users to use the feature of mutating these types. I don't think anything bad will happen if in some Python

[issue43908] array.array should remain immutable

2021-04-28 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: ok. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43908] array.array should remain immutable

2021-04-28 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Shreyan, see msg391954 earlier in this thread: "I also think you should try to separately land small patches that add the IMMUTABLETYPE flag to a few very public types, e.g. array.array and the three in _sre (which are exported by re.py)."

[issue43908] array.array should remain immutable

2021-04-28 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Erlend, wouldn't it be easy to apply all the changes in 1 PR? -- ___ Python tracker ___ ___

[issue43908] array.array should remain immutable

2021-04-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > We don't have immutability tests for static types then why heap types? Because all static types are immutable, and some have been converted to heap types changing the contract, therefore is a regression and therefore we need regression tests for

[issue43908] array.array should remain immutable

2021-04-28 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Is it necessary to add tests just for testing type immutability? We don't have immutability tests for static types then why heap types? -- ___ Python tracker

[issue43908] array.array should remain immutable

2021-04-28 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +24387 pull_request: https://github.com/python/cpython/pull/25697 ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-28 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +24386 pull_request: https://github.com/python/cpython/pull/25696 ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3b52c8d66b25415f09478ab43f93d59a3547dc13 by Erlend Egeberg Aasland in branch 'master': bpo-43908: Add Py_TPFLAGS_IMMUTABLETYPE flag (GH-25520) https://github.com/python/cpython/commit/3b52c8d66b25415f09478ab43f93d59a3547dc13 --

[issue43908] array.array should remain immutable

2021-04-28 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: See msg391933, Shreyan. I think Christian will take care of his types :) -- ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-28 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Was EVPtype_spec in _hashopenssl.c converted to heap type? -- ___ Python tracker ___ ___

[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: See issue https://bugs.python.org/issue43955 for the test failures. -- ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Since, these changes and the test failures are not related to each other at all, I'm opening a new issue addressing the test failures only. I'm adding everyone in this issue's nosy to the new issue's nosy as well. --

[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: There are no errors in apply-to-all.diff because I've ran the tests both with and without the changes and both give me the same output. It's safe to proceed with apply-to-all.diff. The only problem is why are the tests failing at all? I ran the tests a few

[issue43908] array.array should remain immutable

2021-04-27 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think I've ever successfully managed to complete the test on my Windows 10 box either (not even in "production" mode -- you seem to be using debug mode). I recommend using creating a new PR and having the CI machinery run the tests. It's more

[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Re-running tests complete. I'm attaching the results. If the errors are not reproducible then please tell. I'll then rebuild and rerun the tests once more. -- Added file: https://bugs.python.org/file49994/tests_log.txt

[issue43908] array.array should remain immutable

2021-04-27 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > I've not seen any failing tests for GH-25653 on the CI or on my computer. That would be GH-25520. GH-25653 is the slightly related issue/PR. Both are passing CI, though. -- ___ Python tracker

[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: > Shreyan, are you running the tests against the PR, or something else? Have > you tried make clean (or git clean -fdx)? I always have a clean branch checked out but the last time I ran the tests it was unsuccessful. I'm re-running the tests now and hoping

[issue43908] array.array should remain immutable

2021-04-27 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Are you two collaborating? No, but any help is of course appreciated. -- ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-27 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Shreyan, are you running the tests against the PR, or something else? Have you tried make clean (or git clean -fdx)? -- ___ Python tracker

[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Let me re-run the test suite again and see if the tests have been fixed in the most recent commits. -- ___ Python tracker ___

[issue43908] array.array should remain immutable

2021-04-27 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Pablo, there seems to be some instability in the tests. Apart from the typical test_asyncio random timeouts I don't see anything on the buildbots or the CI. What are those failing test? Maybe I can try to reproduce on my side --

[issue43908] array.array should remain immutable

2021-04-27 Thread Guido van Rossum
Guido van Rossum added the comment: Sure. What do you think is causing the failures for Shreyan then? (Are you two collaborating?) -- --Guido (mobile) -- ___ Python tracker

[issue43908] array.array should remain immutable

2021-04-27 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I've not seen any failing tests for GH-25653 on the CI or on my computer. The PR is based off of 1b1f9852bda85c01ef124858f293e9c13e04ffce, which is pretty recent. I can rebase onto master, but I don't see any need for it as long as the tests suite

[issue43908] array.array should remain immutable

2021-04-27 Thread Guido van Rossum
Guido van Rossum added the comment: Pablo, there seems to be some instability in the tests. Shreyan, Erlend, maybe merging in master would help? -- nosy: +Guido.van.Rossum ___ Python tracker

[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Re-running the failed tests doesn't trigger the errors but running the whole test suite does. And some errors I described are fixed in any of the last 22 commits and PRs. Therefore should we actually look into this matter or should we leave it as it is?

[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I ran the test suite without the changes and they still fail. Therefore apply-to-all.diff does not have any bug at all. But the test failures are also a major issue not only for this change but also for others. I'm opening a new issue for those test

[issue43908] array.array should remain immutable

2021-04-26 Thread Guido van Rossum
Guido van Rossum added the comment: So keep cutting in half until the error disappears? -- ___ Python tracker ___ ___

[issue43908] array.array should remain immutable

2021-04-26 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: > The solution would be bisection -- apply half of the changes from apply-to-all, and see if you still get the errors. Etc. Getting the same error. These are the errors :- 0:12:14 load avg: 0.92 [115/426] test_distutils test test_distutils crashed --

[issue43908] array.array should remain immutable

2021-04-26 Thread Shreyan Avigyan
Change by Shreyan Avigyan : Removed file: https://bugs.python.org/file49988/patch.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43908] array.array should remain immutable

2021-04-26 Thread Guido van Rossum
Guido van Rossum added the comment: The solution would be bisection -- apply half of the changes from apply-to-all, and see if you still get the errors. Etc. -- ___ Python tracker

[issue43908] array.array should remain immutable

2021-04-26 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: @serhiy.storchaka I have no idea what's causing the errors I described in https://bugs.python.org/msg391947. I looked at all the changes in apply-to-all.diff and I don't think any of the errors are related. Do you have any thoughts about this problem? Is

[issue43908] array.array should remain immutable

2021-04-26 Thread Guido van Rossum
Guido van Rossum added the comment: PS. Don't wait for me. I'm going on vacation this Thursday and won't be back until well after the 3.10b1 release is done, and before I go I'm pretty busy already. -- ___ Python tracker

[issue43908] array.array should remain immutable

2021-04-26 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: No problem, will do! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

  1   2   >