[issue31791] Ensure that all PyTypeObject fields are set to non-NULL defaults

2017-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 1. This will increase the size of type object. Most types are not numbers, not collections and don't support the buffer protocol, thus save memory for tp_as_number, tp_as_sequence, tp_as_mapping and tp_as_buffer. This also can increase the time of type crea

[issue31791] Ensure that all PyTypeObject fields are set to non-NULL defaults

2017-10-14 Thread pdox
pdox added the comment: I believe it would also make sense to inline the 'as' structures (tp_as_async, tp_as_number, tp_as_sequence, tp_as_mapping, and tp_as_buffer), instead of having them be pointers. This would save one pointer dereference with each use. But this would have API compatibili

[issue31791] Ensure that all PyTypeObject fields are set to non-NULL defaults

2017-10-14 Thread pdox
New submission from pdox : Ensure that every function pointer in every PyTypeObject is set to a non-NULL default, to spare the cost of checking for NULL with every use. As a basic example, consider PyNumber_Negative: PyObject * PyNumber_Negative(PyObject *o) { PyNumberMethods *m; if (

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-14 Thread Nick Coghlan
Nick Coghlan added the comment: Just confirming that the locals() vs frame.f_locals distinction also exists in the C API: the former is PyEval_GetLocals() (which implicitly ensures the snapshot is up to date), while the equivalent of the latter is direct access to frame->f_locals (and it's le

[issue31790] double free or corruption (while using smem)

2017-10-14 Thread Zoltan Krajcsovics
New submission from Zoltan Krajcsovics : Command executed when the crash happened: /usr/bin/python /usr/bin/smem -t -c command pss -P /usr/lib/chromium/chromium The attached error.log contains the backtrace and memory map printed. This is a sporadic error, the command is called every second 0-

[issue31742] Default to emitting FutureWarning for provisional APIs

2017-10-14 Thread Guido van Rossum
Guido van Rossum added the comment: OK, I'll wait for the new PEP and ignore the ticket. -- ___ Python tracker ___ ___ Python-bugs-l

[issue31742] Default to emitting FutureWarning for provisional APIs

2017-10-14 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-14 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-14 Thread Guido van Rossum
Guido van Rossum added the comment: Sounds like a plan, I will ignore the ticket then. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-14 Thread Nick Coghlan
Nick Coghlan added the comment: Err, I phrased that last sentence really badly. I meant that if Guido *hasn't* been following this ticket closely, he's more likely to ask for clarification if PEP 558 proposes a semantic change based on the discussion here without adequately justifying it in t

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-14 Thread Nick Coghlan
Nick Coghlan added the comment: Guido: any proposed semantic changes for CPython will eventually make their way through PEP 558 (and potentially a competing PEP if someone else is sufficiently keen on the idea of making non-tracing mode behave the same way as tracing mode), so ignoring the de

[issue31780] Using format spec ',x' displays incorrect error message

2017-10-14 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> terry.reedy resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue31780] Using format spec ',x' displays incorrect error message

2017-10-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 59b5c139d2ae95b1d1da63f81c3d777932215533 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31780: Fix incorrect error message for ',x', ',b', ',o' specs (GH-4002) (#4004) https://github.com/python/cpython/commit/59b5c139d2ae95

[issue31780] Using format spec ',x' displays incorrect error message

2017-10-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 28773ca7a7aa58a28e42a9eb0066acf71b5a8dc4 by Terry Jan Reedy (Dargor) in branch 'master': bpo-31780: Fix incorrect error message for ',x', ',b', ',o' specs (#4002) https://github.com/python/cpython/commit/28773ca7a7aa58a28e42a9eb0066acf71b5a8dc4

[issue31780] Using format spec ',x' displays incorrect error message

2017-10-14 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +3977 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue25588] Run test suite from IDLE idlelib.run subprocess

2017-10-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Running the file containing 'import test.autotest' directly with python gives the test_aifc failure and the same bizarre behavior after test_concurrent_futures. Testing restarts apparently in 5 parallel threads or processes. The lines of output are the same

[issue25588] Run test suite from IDLE idlelib.run subprocess

2017-10-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 0fee56c86344386bde8486ab803f564cb8a5203b by Terry Jan Reedy in branch '3.6': [3.6] bpo-25588: Document autotest in idle_test/README.txt. (GH-4000) (#4001) https://github.com/python/cpython/commit/0fee56c86344386bde8486ab803f564cb8a5203b ---

[issue31786] In select.poll.poll() ms can be 0 if timeout < 0

2017-10-14 Thread Pablo
Change by Pablo : -- keywords: +patch pull_requests: +3976 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailin

[issue31780] Using format spec ',x' displays incorrect error message

2017-10-14 Thread Pablo
Change by Pablo : -- keywords: +patch pull_requests: +3975 stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue25588] Run test suite from IDLE idlelib.run subprocess

2017-10-14 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +3974 stage: commit review -> patch review ___ Python tracker ___ ___ Python-bugs-list m

[issue25588] Run test suite from IDLE idlelib.run subprocess

2017-10-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 620f70eed615efde35517d7ae86354de3b2a0d03 by Terry Jan Reedy in branch 'master': bpo-25588: Document autotest in idle_test/README.txt. (#4000) https://github.com/python/cpython/commit/620f70eed615efde35517d7ae86354de3b2a0d03 --

[issue25588] Run test suite from IDLE idlelib.run subprocess

2017-10-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: The README patch will finish this issue. Fixing individual failures and investigating the crash will be new issues. -- ___ Python tracker __

[issue25588] Run test suite from IDLE idlelib.run subprocess

2017-10-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: As I reported on related #31761, importing autotest on Windows 10 has 3 errors with Python's shell and 4 with IDLE's, with two of those the same as the python shell failures. IDLE can be detected in at least two ways. >>> import sys; 'idlelib.run' in sys.modu

[issue25588] Run test suite from IDLE idlelib.run subprocess

2017-10-14 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +3973 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue31789] Better error message when failing to overload metaclass.mro

2017-10-14 Thread Dan Snider
New submission from Dan Snider : class meta(type): mros = (object,) def __new__(metacls, name, bases, namespace, fake_bases=()): print('entering __new__') metacls.fake_bases = fake_bases cls = type.__new__(metacls, name, bases, namespace) print('e

[issue31788] Typo in comments Modules/_ssl.c

2017-10-14 Thread Semen Zhydenko
New submission from Semen Zhydenko : completly must be changed to completely -- assignee: docs@python components: Documentation messages: 304405 nosy: Semen Zhydenko, docs@python priority: normal severity: normal status: open title: Typo in comments Modules/_ssl.c versions: Python 2.7, P

[issue31780] Using format spec ',x' displays incorrect error message

2017-10-14 Thread Nitish
Change by Nitish : -- nosy: +nitishch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[issue17776] IDLE Internationalization

2017-10-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ned> IDLE uses some Tk-supplied default menus and menu items On Windows and *nix, the visible menu labels all come from IDLE. I don't yet understand what is going on with Mac menus. Some menu items call the tk file dialog, and the config highlight tab calls

[issue17776] IDLE Internationalization

2017-10-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: In the last few months, configdialog has been refactored to have a class for each settings tab. This makes it easier to revise and add new options, such as 'menu language'. With this done, the IDLE features implemented as (optional) extensions were turned i

[issue21263] test_gdb failures on os x 10.9.2

2017-10-14 Thread Aniket Vyas
Aniket Vyas added the comment: Hi ! I am willing to take a look into this. I am pretty new to the community and would appreciate some pointers relating to the issue which can give me a head-start to resolving it. Thanks in advance ! -- nosy: +vyas45

[issue31785] Move instruction code from ceval.c to a separate file

2017-10-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: > A strict (non-leaky) abstraction interface is necessary > for being able to re-use the instruction code in an > alternate evaluator. The problem is that we don't have a strict (non-leaky) abstraction and I don't think we should impose one. > Done proper

[issue31778] ast.literal_eval supports non-literals in Python 3

2017-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The support of parsing addition and subtraction at any level of nesting was added by bc95973b51abadc84960e7836ce313f12cf515cf. The commit message and NEWS entry don't contain an issue number, thus the rationale of this change is not known. Raymond, could yo

[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2017-10-14 Thread Oren Milman
Change by Oren Milman : -- pull_requests: +3972 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-14 Thread Guido van Rossum
Guido van Rossum added the comment: > Moreover, if f_locals can be modified outside a tracing hook, then we have > the same problem in a cross-function way, e.g. if function f1() calls > function f2() which does sys._getframe(1).f_locals['foo'] = 42. That's covered by the rule that says sys._

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-14 Thread Guido van Rossum
Guido van Rossum added the comment: @Armin: > Guido: you must be tired and forgot that locals() is a regular function :-) > The compiler cannot recognize it reliably. I know, but we occasionally do make exceptions for builtins. In particular super() is recognized by the compiler. @Everyone

[issue31725] Turtle/tkinter: NameError crashes ipython with "Tcl_AsyncDelete: async handler deleted by the wrong thread"

2017-10-14 Thread Rick J. Pelleg
Rick J. Pelleg added the comment: Just one more issue: since it happened before I found out that the "turtle" package already has the pre-defined short version of commands, such as "fd()", "lt()", etc., the crashed session included four function definitions, for "fd()", "bk()", "lt()" and "rt()"

[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2017-10-14 Thread Alex Dzyoba
Change by Alex Dzyoba : -- nosy: +alexdzyoba ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2017-10-14 Thread Oren Milman
Oren Milman added the comment: According to Serhiy's advice (https://bugs.python.org/issue31455#msg304338), this issue now also includes some crashes in _elementtree: The following code crashes: import _elementtree parser = _elementtree.XMLParser.__new__(_elementtree.XMLParser) parser.close()

[issue31725] Turtle/tkinter: NameError crashes ipython with "Tcl_AsyncDelete: async handler deleted by the wrong thread"

2017-10-14 Thread Rick J. Pelleg
Rick J. Pelleg added the comment: Sorry, all reproduction attempts failed, both in plain Python and in iPython. I guess you can close this for now. -- ___ Python tracker ___ __

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-14 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 8c26a34f93db7ae96b42bcce6b557437436c7721 by Raymond Hettinger in branch 'master': bpo-31757: Make Fibonacci examples consistent (#3991) https://github.com/python/cpython/commit/8c26a34f93db7ae96b42bcce6b557437436c7721 -- ___

[issue31732] Add TRACE level to the logging module

2017-10-14 Thread R. David Murray
R. David Murray added the comment: I'm not arguing against the rejection, but I want to mention a point in relation to Raymond's statement "five levels have sufficed for a long and that the need for finer distinctions almost never arises in practice". In thinking about my own codebase, I hav

[issue31672] string.Template should use re.ASCII flag

2017-10-14 Thread INADA Naoki
INADA Naoki added the comment: New changeset 073150db39408c1800e4b9e895ad0b0e195f1056 by INADA Naoki in branch 'master': bpo-31672: doc: Remove one sentence from library/string.rst (GH-3990) https://github.com/python/cpython/commit/073150db39408c1800e4b9e895ad0b0e195f1056 -- ___

[issue9633] pdb go stack up/down

2017-10-14 Thread Nick Coghlan
Nick Coghlan added the comment: Note that we're currently looking into this as something that could be potentially addressed by PEP 558 and any related changes to the way that function locals interact with trace hooks: https://bugs.python.org/issue30744#msg304388 --

[issue31787] various refleaks when calling the __init__() method of an object more than once

2017-10-14 Thread Oren Milman
Change by Oren Milman : -- keywords: +patch pull_requests: +3971 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue31714] Improve re documentation

2017-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue31714] Improve re documentation

2017-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 69ed5b61e7d2bdaf2dc6684061f737adc24a96ae by Serhiy Storchaka in branch '3.6': [3.6] bpo-31714: Improved regular expression documentation. (GH-3907). (#3994) https://github.com/python/cpython/commit/69ed5b61e7d2bdaf2dc6684061f737adc24a96ae ---

[issue31787] various refleaks when calling the __init__() method of an object more than once

2017-10-14 Thread Oren Milman
New submission from Oren Milman : Various __init__() methods don't decref (if needed) before assigning to fields of the object's struct (i.e. assigning to `self->some_field`): - _asyncio_Task___init___impl() (in Modules/_asynciomodule.c) - _lzma_LZMADecompressor___init___impl() (in Modules/_lzmam

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-14 Thread Nick Coghlan
Nick Coghlan added the comment: The current pdb misbehaviour when navigating the stack is indeed a valid argument in favour of allowing immediate write-through from trace functions for regular local variables as well - I don't recall reading that bug report when Xavier first linked to it, so

[issue31714] Improve re documentation

2017-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +3970 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue31714] Improve re documentation

2017-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset cd195e2a7ac5c9b2574d5462752b7939641de4a9 by Serhiy Storchaka in branch 'master': bpo-31714: Improved regular expression documentation. (#3907) https://github.com/python/cpython/commit/cd195e2a7ac5c9b2574d5462752b7939641de4a9 -- _

[issue31786] In select.poll.poll() ms can be 0 if timeout < 0

2017-10-14 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : According to the documentation select.poll.poll() is blocked for infinite timeout if the timeout argument is negative. But due to rounding it is possible that timeout < 0, but an integer ms passed to the poll() syscall is 0, and poll() is not blocked. --

[issue9633] pdb go stack up/down

2017-10-14 Thread Nick Coghlan
Change by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue31334] select.poll.poll fails on BSDs with arbitrary negative timeouts

2017-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: -> patch review versions: -Python 3.3, Python 3.4, Python 3.5 ___ Python tracker ___ ___ Pyt

[issue31754] Documented type of parameter 'itemsize' to PyBuffer_FillContiguousStrides is incorrect.

2017-10-14 Thread Aniket Vyas
Aniket Vyas added the comment: Thanks Mariatta. I have initiated a PR for the issue. https://github.com/python/cpython/pull/3993 -- ___ Python tracker ___ ___

[issue31754] Documented type of parameter 'itemsize' to PyBuffer_FillContiguousStrides is incorrect.

2017-10-14 Thread Aniket Vyas
Change by Aniket Vyas : -- keywords: +patch pull_requests: +3969 stage: needs patch -> patch review ___ Python tracker ___ ___ Python

[issue31785] Move instruction code from ceval.c to a separate file

2017-10-14 Thread pdox
pdox added the comment: rhettinger, helper functions used by the instruction code would also be moved into instructions.h (e.g. call_function, do_call_core, cmp_outcome, etc). Done properly, there should be very little need to move between instructions.h and ceval.c to understand what is happ