[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread James Edwards
James Edwards added the comment: Edit conflict -- indeed -- self closing. --- I should point out that this could be fixed with something like the following: @classmethod def __subclasshook__(cls, C): if cls is Sequence: return _check_methods(C, "__reversed__", "__

[issue36457] functools.singledispatchmethod interacts poorly with subclasses

2019-03-27 Thread Tim Mitchell
New submission from Tim Mitchell : The new functools.singledispatchmethod (issue32380) class interacts poorly with subclasses. There is no way for a sub-class to override or extend the dispatch registry. E.g. class BaseVistor: @singledispatchmethod def visit(self, obj): raise Value

[issue36458] Compile errors --without-threads

2019-03-27 Thread patrik
New submission from patrik : Compiling python 3.6.8 configured with --without-threads (no other options) fails, with undefined references to PyGILState_GetThisThreadState in pylifecycle.c, and PyGILState_Ensure and PyGILState_Release in object.c. I used Louis' fix from issue #24784 in pylifec

[issue36458] Compile errors --without-threads

2019-03-27 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. Unfortunately, Python 3.6.8 was the last bugfix release of 3.6 so we now only accept and fix security-related issues for it. I did a quick check and this does not appear to be a problem in 3.7.x but feel free to re-open the issue if it can

[issue6422] timeit called from within Python should allow autoranging

2019-03-27 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Were you working on the additional functionality that you mentioned in > msg272704 or would that be open for someone else to do? Thanks! Please consider it open. I don't expect it to be difficult, it's just finding the Round Tuits. Perhaps an easy first

[issue36458] Compile errors --without-threads

2019-03-27 Thread patrik
patrik added the comment: Not a problem. I wanted to record the issue just in case someone else encounters it, and also because there seems to have been a history of issues with the no-threads option. Happy to hear its sorted in 3.7. -- ___ Python

[issue36457] functools.singledispatchmethod interacts poorly with subclasses

2019-03-27 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue36459] A possible double PyMem_FREE() due to tokenizer.c's tok_nextc()

2019-03-27 Thread Zackery Spytz
New submission from Zackery Spytz : Commit cb90c89de14aab636739b3e810cf949e47b54a0c added a PyMem_FREE(tok->buf) call in tok_nextc() if a PyMem_REALLOC() call fails. This will cause a double free when PyTokenizer_Free() is called on the tokenizer state. -- components: Interpreter Core

[issue36459] A possible double PyMem_FREE() due to tokenizer.c's tok_nextc()

2019-03-27 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +12541 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue36459] A possible double PyMem_FREE() due to tokenizer.c's tok_nextc()

2019-03-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue36452] Detect dict iteration "overflow" when changing keys

2019-03-27 Thread Inada Naoki
Inada Naoki added the comment: New changeset 796cc6e3ad3617c1ea9e528663aac1a206230a28 by Inada Naoki (Thomas Perl) in branch 'master': bpo-36452: dictiter: track maximum iteration count (GH-12596) https://github.com/python/cpython/commit/796cc6e3ad3617c1ea9e528663aac1a206230a28 --

[issue36452] Detect dict iteration "overflow" when changing keys

2019-03-27 Thread Inada Naoki
Inada Naoki added the comment: Thank you. I like your patch. -- components: +Interpreter Core resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2019-03-27 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-03-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In your example you can add PyTypeObject *tp = Py_TYPE(self); Py_TYPE(self) = &PyList_Type; if (PyType_GetFlags(tp) & Py_TPFLAGS_HEAPTYPE) { Py_DECREF(tp); } before calling PyList_Type.tp_dealloc(). It is possible to add such code d

<    1   2