[issue18836] Potential race condition in exceptions
New submission from Sworddragon: On a try/except-block if an exception raises (for example KeyboardInterrupt) the except block could cause another exception and if this block tries to catch it too the nested except block could cause another exception again. This goes into an unlimited recursion. In the attachments is an example of such a problem (race_condition_fast.py). But as it is called a race condition it is nearly impossible to reproduce it by a human. For this case I have adjusted the example (race_condition_slow.py). The third CTRL + C will cause a KeyboardInterrupt. -- components: Interpreter Core files: race_condition_fast.py messages: 196181 nosy: Sworddragon priority: normal severity: normal status: open title: Potential race condition in exceptions type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file31469/race_condition_fast.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18836 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18836] Potential race condition in exceptions
Changes by Sworddragon sworddrag...@aol.com: Added file: http://bugs.python.org/file31470/race_condition_slow.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18836 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18823] Idle: use pipes instead of sockets to talk with user subprocess
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18823 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18836] Potential race condition in exceptions
Ezio Melotti added the comment: The third CTRL + C will cause a KeyboardInterrupt. This is expected. The first ctrl+c interrupts the first sleep and goes in the second try, executing the second sleep. The second ctrl+c interrupts the second sleep and goes in the second except where it finds the third sleep. Here a third ctrl+c will interrupt the sleep and since this line is not in a try block nothing will catch the KeyboardInterrupt. Are you saying that if the user keeps hitting ctrl+c you would need an endless chain of nested try/except in order to catch them all? -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18836 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18836] Potential race condition in exceptions
Sworddragon added the comment: Are you saying that if the user keeps hitting ctrl+c you would need an endless chain of nested try/except in order to catch them all? Correct. For example if I want to show the user the message Aborted instead of a huge exception if he hits CTRL + C another KeyboardInterrupt could appear. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18836 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18837] multiprocessing.reduction is undocumented
New submission from Tomi Pieviläinen: In older versions (2.x, 3.2, 3.3) multiprocessing.reduction was only mentioned in a one example, with a one comment after it. In the 3.4dev documentation even this was dropped. -- assignee: docs@python components: Documentation messages: 196184 nosy: docs@python, tpievila priority: normal severity: normal status: open title: multiprocessing.reduction is undocumented versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18837 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18837] multiprocessing.reduction is undocumented
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +jnoller, sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18837 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Stefan Behnel added the comment: BTW, I also like how short and clean iterparse() becomes when you move this feature into the parser. It's basically just a convenience function that does read(), feed(), and yield-from. Plus the usual bit of bolerplate code, obviously. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Nick Coghlan added the comment: Eli's summary left out an exchange between us that happened after he'd already written the summary - he pointed out the same problem with the EventParser name that you noticed: it's really an alternative XMLParser that exposes read_events(), rather than an event parser. So a completely different name like EventScanner or EventStream may be more appropriate. (I quite like EventStream, since it further suggests the destructive nature of read_events()). As for why we think it's worth keeping this as a separate API, it's really about turning XMLParser's push API for events (where the events are pushed into the target object by the parser calling the appropriate methods), into an iterparse style pull API where the events can be retrieved via calls to read_events(). The back end implementation for the event streaming API *should* be a custom target object combined with a regular XMLParser object, but there are implementation issues currently preventing that. We also discussed adding the event streaming interface directly to XMLParser, but I agreed with Eli that it's worth keeping that base API simple, especially since in the long run we want the new class to just be a convenience API for combining XMLParser and a custom target object, even if it can't be implemented that way right now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Stefan Behnel added the comment: iterparse's parser argument will be deprecated No need to do that. Update the docs, yes, but otherwise keep the possibility to improve the implementation later on, without going through a deprecation + dedeprecation cycle. That would just confuse users IMHO. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Nick Coghlan added the comment: Since parsers don't support changing the target after creation, I think it makes sense to deprecate passing in a parser *instance*, and instead require passing in a callback that accepts the target to use and *returns* an appropriate parser object. The parser can only use the default TreeBuilder as a target. line in the iterparse docs is a sign that this is a more appropriate API - if iterparse needs a particular kind of target, the API should be designed so iterparse *provides* that target instead of saying please don't use a custom target type. However, I don't think it makes sense to provide such a callback based API until it is actually possible to implement the streaming event API using a custom target object with XMLParser. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Stefan Behnel added the comment: I don't see adding one method to XMLParser as a design problem. In fact, it's even a good design on the technical side, because if ET ever gains an HTMLParser, then the implementation of this feature would be highly dependent on the underlying parser, i.e. it would be very different from the implementation in XMLParser. It might not even be supported at all. Moving the API into the parser gives us that choice quite naturally. It also solves the naming issue. Why add another thing to the module that needs explanation (and even an explanation why it's there and how it's different from what else is there), when we can just add the feature to what's there and be done? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Stefan Behnel added the comment: ... instead require passing in a callback that accepts the target ... That could be the parser class then, for example, except that there may be other options to set as well. Plus, it would not actually allow iterparse to wrap a user provided target. So, in fact, that approach doesn't match with the design of introducing a target wrapper. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Stefan Behnel added the comment: it's really about turning XMLParser's push API for events (where the events are pushed into the target object by the parser calling the appropriate methods), into an iterparse style pull API where the events can be retrieved via calls to read_events(). Sorry, but this is ignoring the fact that the target is an *inherent* part of this feature. In fact, the push API of XMLParser forms an integral part of the design. The events that are being collected are a mixture of what the XMLParser produces and what the target produces. You can't think this feature without these two parts. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18838] The order of interactive prompt and traceback on Windows
New submission from Drekin: On Windows, Python 3.3.2, when I run Python as a subprocess via Popen(py -i somescript.py, stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate() and somescript.py ends with exception, there is first interactive promt in stderr output and then the traceback which is reversed to standard order when somescript.py is run interactively directly. Corresponding StackOverflow question: http://stackoverflow.com/questions/18419724/position-of-prompt-in-stderr-after-systemexit . -- components: Windows messages: 196192 nosy: Drekin priority: normal severity: normal status: open title: The order of interactive prompt and traceback on Windows type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18838 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Stefan Behnel added the comment: in the long run we want the new class to just be a convenience API for combining XMLParser and a custom target object, even if it can't be implemented that way right now. Just to be clear: I changed my opinion on this one and I no longer think that it is a good idea. The negative impact on what's there currently is just too large, specifically the user visible deprecation and the change to the target object API. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13107] Text width in optparse.py can become negative
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13107 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18835] Add aligned memroy variants to the suite of PyMem functions/macros
Antoine Pitrou added the comment: Unless the memory allocator actually supports it, this means you lose a whole lot of memory for padding, though... Memory which will sit there unused at the end of another cacheline. Note that the current small object allocator, if not disabled, *should* already return you aligned memory, by construction (each allocation size has dedicated pools from which memory blocks are carved). -- nosy: +haypo, pitrou, tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18835 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18839] Wrong sentence in sys.exit.__doc__
New submission from Marco Buttu: Python 3.3:: import sys print(sys.exit.__doc__) exit([status]) Exit the interpreter by raising SystemExit(status). If the status is omitted or None, it defaults to zero (i.e., success). If the status is numeric, it will be used as the system exit status. If it is another kind of object, it will be printed and the system exit status will be one (i.e., failure). The sentence If the status is numeric, it will be used as the system exit status. is wrong:: sys.exit(3.33) 3.33 $ echo $? 1 It should be If the status is an *integer*, it will be used as the system exit status., as specified in the SystemExit `doc`. .. doc: http://docs.python.org/3/library/exceptions.html#SystemExit -- assignee: docs@python components: Documentation messages: 196195 nosy: docs@python, marco.buttu priority: normal severity: normal status: open title: Wrong sentence in sys.exit.__doc__ type: behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18839 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18835] Add aligned memroy variants to the suite of PyMem functions/macros
STINNER Victor added the comment: The default allocator for PyObject is PyType_GenericAlloc(). If the type has the Py_TPFLAGS_HAVE_GC flag, PyType_GenericAlloc() calls _PyObject_GC_Malloc(). It is the case for the set type. _PyObject_GC_Malloc() adds an header of sizeof(PyGC_Head) (12 bytes on x86) before the PyObject data and then calls PyObject_MALLOC(). By default, Python uses pymalloc for PyObject_MALLOC() which uses an alignment of 8 bytes. For set, I suppose that you are talking about the allocation of the table, not of the set object itself. set_table_resize() uses PyMem_NEW() to allocate the table. If we provide a PyMem_MallocAligned(alignment, size), table entries would be aligned, but not entries of the smalltable. Does it matter? I suggest variants such as PyMem_Alloc32(n) and PyMem_Alloc64(n) to return suitably aligned data blocks. I would prefer a parameter rather than a new function per alignment! Which API does you propose exactly? On Linux, I see at least 3 functions: int posix_memalign(void **memptr, size_t alignment, size_t size); void *valloc(size_t size); void *memalign(size_t boundary, size_t size); Do you propose aligned variant for PyMem, PyMem_Raw and PyObject, or only PyMem? Unless the memory allocator actually supports it, this means you lose a whole lot of memory for padding, though... Memory which will sit there unused at the end of another cacheline. What is the alignment of a cacheline? Can a line starts at any address? Do you have an idea of performance benefit of memory alignment? Adding yet another API to allocate memory has a cost. Python 3.4 already implemented the PEP 445 which added many new functions. If we add new functions, they should conform the PEP 445 (need get/set allocator functions to support hooks to track the memory usage). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18835 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18839] Wrong sentence in sys.exit.__doc__
Roundup Robot added the comment: New changeset 187a678c6033 by Ezio Melotti in branch '2.7': #18839: document that sys.exit() will not accept a non-integer numeric value as exit status. http://hg.python.org/cpython/rev/187a678c6033 New changeset 694e50a79638 by Ezio Melotti in branch '3.3': #18839: document that sys.exit() will not accept a non-integer numeric value as exit status. http://hg.python.org/cpython/rev/694e50a79638 New changeset 6cb3ae431bef by Ezio Melotti in branch 'default': #18839: merge with 3.3. http://hg.python.org/cpython/rev/6cb3ae431bef -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18839 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18839] Wrong sentence in sys.exit.__doc__
Ezio Melotti added the comment: Fixed, thanks for the report! -- assignee: docs@python - ezio.melotti nosy: +ezio.melotti resolution: - fixed stage: - committed/rejected status: open - closed type: behavior - enhancement versions: +Python 2.7, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18839 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18408] Fixes crashes found by pyfailmalloc
Roundup Robot added the comment: New changeset 79ce25c70795 by Victor Stinner in branch 'default': Issue #18408: _PyObject_Dump() now saves/restores the current exception http://hg.python.org/cpython/rev/79ce25c70795 New changeset e63f19d0a651 by Victor Stinner in branch 'default': Issue #18664, #18408: Rewrite PyErr_WriteUnraisable() to handle errors http://hg.python.org/cpython/rev/e63f19d0a651 New changeset 8fb3a6f9b0a4 by Victor Stinner in branch 'default': Restore changeset 5bd9db528aed (issue #18408) http://hg.python.org/cpython/rev/8fb3a6f9b0a4 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18408 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18664] occasional test_threading failure
Roundup Robot added the comment: New changeset e63f19d0a651 by Victor Stinner in branch 'default': Issue #18664, #18408: Rewrite PyErr_WriteUnraisable() to handle errors http://hg.python.org/cpython/rev/e63f19d0a651 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18664 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18834] Add Clang to distutils to build C/C++ extensions
Brett Cannon added the comment: Please upload the patches as files to the issue, that way our review tool can be used. -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18834 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18835] Add aligned memroy variants to the suite of PyMem functions/macros
Antoine Pitrou added the comment: What is the alignment of a cacheline? Can a line starts at any address? If it could, Raymond wouldn't be asking for this feature ;-) Cachelines are typically aligned at whatever their size is. So, a 64-byte cacheline will be aligned at a 64 bytes boundary. Perhaps some CPUs operate differently, but mainstream CPUs are generally like that (for good reason: a cache is much simpler to implement if there can't be some overlapping between cache lines). Do you have an idea of performance benefit of memory alignment? Adding yet another API to allocate memory has a cost. Agreed. Aligned memory allocation is useful if your *algorithms* benefit from alignment (e.g. some SIMD-optimized code, or something relying on page tables). But aligning every data structure on a cacheline boundary doesn't sound like a very good idea: if it was, the system allocator would do it for you, IMHO ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18835 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18840] Tutorial recommends pickle module without any warning of insecurity
New submission from Donald Stufft: The Python tutorial tells, and even recommends, new users that they can use the pickle module to serialize arbitrary objects. However it does not provide any warning about the insecurity of unpickling arbtirary data. The text even goes so far as to mention sending pickled data over a network connection to other machines. I believe this section should be replaced with using the json module instead of pickle. It is more standard and doesn't present the same security concerns with untrusted data as pickle does. However if it continues to recommend pickle to new users it should at least warn them of the dangers of using pickle. The section in question is located at http://docs.python.org/3/tutorial/inputoutput.html#the-pickle-module -- assignee: docs@python components: Documentation messages: 196203 nosy: docs@python, dstufft priority: normal severity: normal status: open title: Tutorial recommends pickle module without any warning of insecurity ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18840] Tutorial recommends pickle module without any warning of insecurity
Fred L. Drake, Jr. added the comment: Advising the reader to be aware of the security warnings in the API documentation seems sufficient. JSON isn't intended to support arbitrary data, and that's what this section is discussing. Another section about data interchange with other applications (regardless of language), may be a reasonable addition, or a good candidate for a separate How-To document that can be referenced. -- nosy: +fdrake ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18840] Tutorial recommends pickle module without any warning of insecurity
Donald Stufft added the comment: The section to me just seems to be about how to handle more than just strings, it mentions numbers, lists, dictionaries, and class instances. Of those it mentions, only the class instances are not able to handled out of the box by JSON. However like I said even if it remains pickle this particular area of the documentation should still warn users even though there's already a warning in the API documentation for pickle. As it is if a new user reads this and doesn't click through to the API documentation they've received recommendation from the Python documentation that they can send pickle strings over the network. This is dangerous behavior and the documentation shouldn't be advising new users to do dangerous things by default. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18840] Tutorial recommends pickle module without any warning of insecurity
Donald Stufft added the comment: Further more the tutorial claims it's the standard way of persisting data which in my experience it's far from that due to the security concerns. I've seen very little actual use of pickle in the wild (and when it was used it was often used by people who didn't understand the security implications). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12641] NewInterface
stakingrainbow2 added the comment: NewInterface -- nosy: +stakingrainbow2 title: Remove -mno-cygwin from distutils - NewInterface Added file: http://bugs.python.org/file31471/sa6.html ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11619] On Windows, don't encode filenames in the import machinery
STINNER Victor added the comment: I updated parser_unicode.patch to the last Python version. The new patch has just a minor nit: test_symtable does crash :-D Fixed in new patch: parser_unicode-3.patch -- Added file: http://bugs.python.org/file31472/parser_unicode-3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11619 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1944] Documentation for PyUnicode_AsString (et al.) missing.
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13655] Python SSL stack doesn't have a default CA Store
Changes by Ludwig Nussel ludwig.nus...@suse.de: -- nosy: +lnussel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13655 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11619] On Windows, don't encode filenames in the import machinery
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file21759/parser_unicode.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11619 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11619] On Windows, don't encode filenames in the import machinery
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file31446/parser_unicode-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11619 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12641] NewInterface
Changes by PJ Eby p...@telecommunity.com: Removed file: http://bugs.python.org/file31471/sa6.html ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12641] Remove -mno-cygwin from distutils
Changes by PJ Eby p...@telecommunity.com: -- title: NewInterface - Remove -mno-cygwin from distutils ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18840] Tutorial recommends pickle module without any warning of insecurity
Fred L. Drake, Jr. added the comment: When I read ... that can take almost any Python object ..., I don't think the recommendation is about just a few types. The Zope and ZODB communities certainly use pickle extensively, we're aware of the security implications, and we send pickled data over the network all the time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18606] Add statistics module to standard library
Steven D'Aprano added the comment: I have changed the algorithm for statistics.sum to use long integer summation of numerator/denominator pairs. This removes the concerns Mark raised about the float addition requiring correct rounding. Unless I've missed something, this now means that statistics.sum is now exact, including for floats and Decimals. The cost is that stats.sum(ints) is a little slower, sum of Decimals is a lot slower (ouch!) but sum of floats is faster and of Fractions a lot faster. (Changes are relative to my original implementation.) In my testing, algorithmic complexity is O(N) on the number of items, at least up to 10 million items. -- Added file: http://bugs.python.org/file31473/statistics_newsum.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18606 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18840] Tutorial recommends pickle module without any warning of insecurity
Donald Stufft added the comment: A description of the pickle module itself does not equate to the purpose of the section. Given that this is a tutorial and previous section taught how to read and write from files I would suggest that the purpose of the section was to give them the next step to persisting data which could be pickle or it could be JSON (or it could be another format all together). I don't see what Zope/ZODB's awareness of the security implications has to do with anything unless you're trying to state that the developers and users of ZODB are newcomers to Python whose knowledge of pickle stems from what they read in the tutorial. However I am glad that those communities are aware of the implications if they are using that module, but the point is the reader of the tutorial is *not* likely to be aware of them and should *not* be using pickle without being aware of them especially if they are sending that data over the network. I'm really not sure what your problem is here. What is there to lose by annotating this section of the tutorial with a similar warning as exists in the pickle documentation that they should not unpickle data from an untrusted or unauthenticated sources? I can see how someone could state that the problem with switching to JSON is that it's harder to construct a serialization for arbitrary objects. That's not something I think it all that important to teach someone brand new to Python however I can understand if switching this section to using a safe serialization format doesn't sit well with people which is why I suggested at least adding a warning. So what exactly is your problem with at a minimum adding a warning? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18829] csv produces confusing error message when passed a non-string delimiter
Vajrasky Kok added the comment: Apparently, other attributes of the csv dialect beside delimiter, such as escapechar and quotechar share the same problem. import _csv _csv.reader('foo', quotechar=b'') Traceback (most recent call last): File stdin, line 1, in module TypeError: quotechar must be set if quoting enabled _csv.reader('foo', escapechar=b'+') _csv.reader object at 0x7fa85d7847d0Traceback (most recent call last): File stdin, line 1, in module TypeError: bad argument type for built-in operation My patch already fixed the problem, only lacked the unit test. But since this ticket is about delimiter, I'll create the unit test for quotechar and escapechar in separate ticket after this ticket has been closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18829 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18841] math.isfinite fails with Decimal sNAN
New submission from Steven D'Aprano: math.isfinite currently raises ValueError when given a Decimal sNAN (signalling NAN). I've run into a situation where I'm calling isfinite() on a numeric value which may be a Decimal sNAN, and it would be nice if it returned False. On the other hand, see the discussion on issue 15544, which possibly leads to the conclusion that raising ValueError is the right thing to do. http://bugs.python.org/issue15544 Either way, behaviour should be documented. -- assignee: docs@python components: Documentation, Library (Lib) messages: 196213 nosy: docs@python, stevenjd priority: normal severity: normal status: open title: math.isfinite fails with Decimal sNAN type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18840] Tutorial recommends pickle module without any warning of insecurity
Antoine Pitrou added the comment: I would be ok with changing that part of the tutorial to use json. Since json is much better known outside of the Python programming circles, and since its output is human-readable, it's probably a better fit for the tutorial. pickle can be mentioned as a more powerful and more dangerous alternative. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18836] Potential race condition in exceptions
R. David Murray added the comment: Then you catch KeyboardInterrupt and present your alternate text. I'm not following what the problem is. In particular, once you've caught KeyboardInterrupt, a second ctl-C *should* cause a normal program break, otherwise you've locked the user into a infinite loop he can't get out of if your program logic is wrong. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18836 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12641] Remove -mno-cygwin from distutils
Changes by Éric Araujo mer...@netwok.org: -- Removed message: http://bugs.python.org/msg196207 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18838] The order of interactive prompt and traceback on Windows
R. David Murray added the comment: For anyone who wants to look in to this: according to the stack overflow question and comments, this is a behavior change between python2 and python3. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18838 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18830] Remove duplicates from a result of getclasstree()
Éric Araujo added the comment: +1 -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18830 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18840] Tutorial recommends pickle module without any warning of insecurity
Antoine Pitrou added the comment: By the way, there is one difference between json and pickle in this context: json will output a text serialization, pickle a binary one. If serializing to a binary file, users must do the (utf-8, most likely) encoding themselves. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods
New submission from Steven D'Aprano: On issue 15544 Mark Dickinson suggested adding methods to float to match methods on Decimal, giving type-agnostic ways of testing real numbers that don't rely on converting to float. I don't see any sign that Mark raised a feature request, so I'm taking the liberty of doing so myself. Note that the math.is* functions convert to float first, which means that they behave differently. Example: math.isnan(Decimal('sNAN')) raises ValueError, rather than returning True. float.is_nan float.is_infinity float.is_finite would mirror the spelling of Decimal methods, rather than the math module. As float doesn't support signalling NANs, there probably isn't any need to include is_snan and is_qnan. For what it's worth, I have code that would use this. I currently write something like: if isinstance(x, Decimal) and x.is_nan() or math.isnan(x): ... in order to prevent triggering the ValueError on signalling NANs. -- messages: 196219 nosy: stevenjd priority: normal severity: normal status: open title: Add float.is_finite is_nan is_infinite to match Decimal methods type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18842 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Eli Bendersky added the comment: On Sun, Aug 25, 2013 at 10:40 PM, Stefan Behnel rep...@bugs.python.orgwrote: Stefan Behnel added the comment: Hmm, did you look at my last comment at all? It solves both the technical issues and the API issues very nicely and avoids any problems of potential future changes. Let me quickly explain why. The feature in question depends on two existing parts of the API: the event generation of the parser, and the return values of the parser target (e.g. a tree builder). So there are really only three places where this feature makes sense, both technically and API-wise. 1) in the target 2) in the parser 3) between parser and target Note how a separate class is ruled out right from the start by the fact that the feature lives somehwere between parser and target. It's an inherent part of the existing design already (and of the implementation, BTW), so I don't see how adding a separate thing to control it makes any sense. 1) is impossible because the target is user provided and we do not control it 2) works fine because the parser controls both the call to the target and its return value 3) would be nice (and was my original favourite) but is hard to do with the current implementation and requires further changes to the API of parser targets So 2) is the choice that remains. I think folding it all into XMLParser is a bad idea. XMLParser is a fairly simple API and I don't want to complicate it. But more importantly, XMLParser knows nothing about Elements, at least in the direct API of today. The one constructing Elements is the target. The read_events method proposed for the new class (currently IncrementalParser.events) already returns Elements, having used a TreeBuilder to build them. XMLParser emits start/end/data calls into the target, but these only carry tag names, attributes and chunks of data. The hierarchical element construction is done by TreeBuilder. What I actually think would be better for the long term is to add new target invocations in XMLParser - start-ns and end-ns. So XMLParser would just keep *parsing*, leaving the interpretation of the parsed data to the target. Today's TreeBuilder is free to ignore these calls. A custom EventCollectingTreeBuilder can collect an event list, having all the information at its disposal. Thus, XMLParser would remain what it is today (minus the _setevents hack) - a router for pyexpat events. These discussions of the future API are interesting, but what's more important today is to have an API for IncrementalParser (using this name before a new one is agreed upon) that doesn't block future implementation changes. And I believe the API proposed here fits the bill. The class will be named EventParser. Obviously because it's parsing Events, as opposed to the XMLParser, which parses XML, or the HTMLParser, which parses HTML, right? The name is not perfect, and proposals for a better one are welcome. FWIW, since it already lives in the xml.etree namespace, XML does not necessarily have to be part of the name. So, some alternatives: * EventStreamer - proposed by Nick. I have to admit I don't feel good with it, because I still want to be crystal clear it's a *parser* we're talking about. * EventBasedParser * EventCollectingParser * NonblockingParser * ... other ideas? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18836] Potential race condition in exceptions
Sworddragon added the comment: The problem is simple: It is not possible to catch every exception in an application. Even if you try to print a message and exit on an exception it is always possible that the user will see a traceback. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18836 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689
New submission from Martin Mokrejs: Hi, it happened to me that using faulthandler and python compiled with --with-pydebug and C*FLAGS=-ggdb I got this stacktrace (will attach longer version as a file): (gdb) where #0 0x7f0e3af8aacb in raise () from /lib64/libpthread.so.0 #1 0x7f0e3a0b05f6 in faulthandler_fatal_error (signum=6) at faulthandler.c:321 #2 signal handler called #3 0x7f0e3ac061f5 in raise () from /lib64/libc.so.6 #4 0x7f0e3ac0766b in abort () from /lib64/libc.so.6 #5 0x7f0e3b327828 in Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Python/pythonrun.c:1689 #6 0x7f0e3b257dc8 in _PyObject_DebugCheckAddressApi (api=111 'o', p=0x449e6900) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Objects/obmalloc.c:1591 #7 0x7f0e3b257a6c in _PyObject_DebugFreeApi (api=111 'o', p=0x449e6900) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Objects/obmalloc.c:1478 #8 0x7f0e3b257913 in _PyObject_DebugFree (p=0x449e6900) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Objects/obmalloc.c:1422 #9 0x7f0e3b34319a in PyObject_GC_Del (op=0x449e6920) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Modules/gcmodule.c:1561 #10 0x7f0e3b275ef7 in tupledealloc (op=0x449e6920) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Objects/tupleobject.c:235 #11 0x7f0e3b255bac in _Py_Dealloc (op=(True,)) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Objects/object.c:2262 #12 0x7f0e3b246d77 in dict_dealloc (mp=0x449b5d80) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Objects/dictobject.c:1010 #13 0x7f0e3b255bac in _Py_Dealloc (op= {'_label': unknown at remote 0x449dd4b8, '_facecolors_original': (float at remote 0xb65dd38, float at remote 0x5034630, float at remote 0xb3c6af8), '_transform': unknown at remote 0x449e6b50, 'figure': Figure(_label='', _transform=None, figure=None, _axobservers=[], images=[], texts=[], _hold=True, artists=[], _agg_filter=None, patch=Rectangle(_label='', _transform=BboxTransformTo(_invalid=2, _inverted=Affine2D(_invalid=0, _inverted=None, _mtx=numpy.ndarray at remote 0xd5bc6ec0, _shorthand_name='', _parents=WeakValueDictionary(_remove=function at remote 0xbf7d060, data={}) at remote 0x129fbdf8) at remote 0xd5bb0300, _boxout=TransformedBbox(_invalid=2, _transform=Affine2D(_invalid=2, _inverted=None, _mtx=numpy.ndarray at remote 0xd5bad540, _shorthand_name='', _parents=WeakValueDictionary(_remove=function at remote 0xc166450, data={741848704: KeyedRef at remote 0x40290a80, 405520480: KeyedRef at remote 0x29e86b10, 322803328: KeyedRef at remote 0x29e 86570, 3585872752: KeyedRef ...(truncated)) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Objects/object.c:2262 #14 0x7f0e3b27ad3d in subtype_dealloc ( self=PathCollection(_label=unknown at remote 0x449dd4b8, _facecolors_original=(float at remote 0xb65dd38, float at remote 0x5034630, float at remote 0xb3c6af8), _transform=unknown at remote 0x449e6b50, figure=Figure(_label='', _transform=None, figure=None, _axobservers=[], images=[], texts=[], _hold=True, artists=[], _agg_filter=None, patch=Rectangle(_label='', _transform=BboxTransformTo(_invalid=2, _inverted=Affine2D(_invalid=0, _inverted=None, _mtx=numpy.ndarray at remote 0xd5bc6ec0, _shorthand_name='', _parents=WeakValueDictionary(_remove=function at remote 0xbf7d060, data={}) at remote 0x129fbdf8) at remote 0xd5bb0300, _boxout=TransformedBbox(_invalid=2, _transform=Affine2D(_invalid=2, _inverted=None, _mtx=numpy.ndarray at remote 0xd5bad540, _shorthand_name='', _parents=WeakValueDictionary(_remove=function at remote 0xc166450, data={741848704: KeyedRef at remote 0x40290a80, 405520480: KeyedRef at remote 0x29e86b10, 322803328: KeyedRef at remo te 0x29e86570, 3585872752: KeyedR...(truncated)) at /mnt/1TB/var/tmp/portage/dev-lang/python-2.7.5-r2/work/Python-2.7.5/Objects/typeobject.c:1015 #15 0x7f0e3b255bac in _Py_Dealloc ( op=PathCollection(_label=unknown at remote 0x449dd4b8, _facecolors_original=(float at remote 0xb65dd38, float at remote 0x5034630, float at remote 0xb3c6af8), _transform=unknown at remote 0x449e6b50, figure=Figure(_label='', _transform=None, figure=None, _axobservers=[], images=[], texts=[], _hold=True, artists=[], _agg_filter=None, patch=Rectangle(_label='', _transform=BboxTransformTo(_invalid=2, _inverted=Affine2D(_invalid=0, _inverted=None, _mtx=numpy.ndarray at remote 0xd5bc6ec0, _shorthand_name='', _parents=WeakValueDictionary(_remove=function at remote 0xbf7d060, data={}) at remote 0x129fbdf8) at remote 0xd5bb0300, _boxout=TransformedBbox(_invalid=2, _transform=Affine2D(_invalid=2, _inverted=None, _mtx=numpy.ndarray at remote 0xd5bad540, _shorthand_name='',
[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689
Martin Mokrejs added the comment: Should have included from the head of gdb output: Program terminated with signal 6, Aborted. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4705] python3.0 -u: unbuffered stdout
Joe Borg added the comment: Can I confirm this is still in the trunk? I have 3.3.2 and am suffering from the fact that `-u` isn't setting stdin to unbuffered. I'm have to run a flush every command, which is awful. -- nosy: +Joe.Borg, georg.brandl versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18836] Potential race condition in exceptions
R. David Murray added the comment: I wonder if you could achieve what you want (which I always hope programs I use never do[*]) by writing your own signal handler. In any case, I don't believe there is a bug here. This is working as designed. [*] There are many times I have found myself leaning on ctl-C on autorepeat hoping that the ctl-c will happen at a point where the application isn't catching it, so that I can get the darn thing to abort. I realize you are proposing to do this only to then do the abort...but what if there is a bug in your code? I'd *much* rather see a traceback than have to fall back to 'kill'. At least with the traceback I know the interpreter has had a chance to clean up. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18836 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18840] Tutorial recommends pickle module without any warning of insecurity
Changes by Fred L. Drake, Jr. fdr...@gmail.com: -- nosy: -fdrake ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689
Amaury Forgeot d'Arc added the comment: This is a memory corruption. Please look at the memory before the freed address (0x449e6900), maybe there is an indication of some buffer overflow? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689
Martin Mokrejs added the comment: Would you please guide me what gdb commands I should issue for you? Thank you. BTW, I ran memtest86+ few days ago, although this is non-ECC memory I think HW is fine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689
Martin Mokrejs added the comment: Grr, forgot to look into a file where I recorded STDERR. Debug memory block at address p=0x449e6900: API 'o' 80 bytes originally requested The 7 pad bytes at p-7 are not all FORBIDDENBYTE (0xfb): at p-7: 0xfb at p-6: 0xfb at p-5: 0xfa *** OUCH at p-4: 0xfb at p-3: 0xfb at p-2: 0xfb at p-1: 0xfb Because memory is corrupted at the start, the count of bytes requested may be bogus, and checking the trailing pad bytes may segfault. The 8 pad bytes at tail=0x449e6950 are FORBIDDENBYTE, as expected. The block was made by call #8155854715 to debug malloc/realloc. Data at p: 00 00 00 00 00 00 00 00 ... 20 af 5b 3b 0e 7f 00 00 Fatal Python error: bad leading pad byte Fatal Python error: Aborted Current thread 0x7f0e3b7ec700: File /usr/lib64/python2.7/site-packages/matplotlib/axes.py, line 932 in cla File /usr/lib64/python2.7/site-packages/matplotlib/figure.py, line 906 in clf File /usr/lib64/python2.7/site-packages/matplotlib/figure.py, line 926 in clear File blah.py, line 12513 in draw_hist2d_plot In that function I call: del(_series) del(_ax1) _figure.clear() # 12513 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18844] allow weights in random.choice
New submission from Alan Isaac: The need for weighted random choices is so common that it is addressed as a common task in the docs: http://docs.python.org/dev/library/random.html This enhancement request is to add an optional argument to random.choice, which must be a sequence of non-negative numbers (the weights) having the same length as the main argument. -- messages: 196229 nosy: aisaac priority: normal severity: normal status: open title: allow weights in random.choice type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18844 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18828] urljoin behaves differently with custom and standard schemas
Madison May added the comment: From urllib.parse: uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap', 'wais', 'file', 'https', 'shttp', 'mms', 'prospero', 'rtsp', 'rtspu', '', 'sftp', 'svn', 'svn+ssh'] From urllib.parse.urljoin (scheme='redis' and url='/1' in your example): if scheme != bscheme or scheme not in uses_relative: return _coerce_result(url) Should the 'redis' scheme be added to uses_relative, perhaps? -- nosy: +madison.may ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Stefan Behnel added the comment: XMLParser knows nothing about Elements, at least in the direct API of today. The one constructing Elements is the target. Absolutely. And I'm 100% for keeping that distinction exactly as it is. The read_events method proposed for the new class (currently IncrementalParser.events) already returns Elements, having used a TreeBuilder to build them. More precisely, it only returns Elements *iff* the TreeBuilder builds them. If it does not, then it returns something else. By moving the desired functionality into the parser, we don't even need to change anything about the interface between the parser and the target object. We still can, though, if you want to extend the interface with start-ns and end-ns events (and I'm ok with that, but it's a different feature). We do not loose that option. But the cool thing is that we don't have to do this now, and that iterparse just keeps working as it is and can be fixed later. No deprecation needed. So we can easily agree on the goals of keeping the interface of the XMLParser simple and not teaching it about Elements. But we still disagree about the conclusions. My conclusion is that the API is substantially simpler if we do *not* add an entire new class that just duplicates existing APIs, but keep the parser as the thing that generates parse events. Be they in the form of callbacks or in the form of event tuples (that have the same name as the callbacks, BTW). The cool feature is that you can use either of the two interfaces or even hook into one to control the other (once the C parser is fixed), without having to learn the distinction between an XMLParser and a WhateverNewParser that also just parses XML. I still want to be crystal clear it's a *parser* we're talking about You have to decide what you want. IMHO, there is no use in putting a new parser next to the existing XMLParser if both are there for parsing XML. That is just unnecessarily confusing. If you want it to be a parser, use the XMLParser. I guess there's no other way to convince you than by coding up my proposal. It seems to be hard to properly explain it without seeing it at work. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18841] math.isfinite fails with Decimal sNAN
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +facundobatista, mark.dickinson, rhettinger, skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +facundobatista, mark.dickinson, rhettinger, skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18842 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18844] allow weights in random.choice
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Library (Lib) nosy: +mark.dickinson, rhettinger, serhiy.storchaka versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18844 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18830] Remove duplicates from a result of getclasstree()
Changes by Serhiy Storchaka storch...@gmail.com: -- versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18830 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689
Tim Peters added the comment: Python's debug-mode memory allocators add some magic values before and after each allocated chunk of memory, and check them when the chunk is freed to make sure nobody overwrote them. In this case, someone did overwrite the byte at p-5, where p is the address of the block originally returned to the requesting program code. It's also suspicious that it says this block was originally allocated by the 8,155,854,715th call to a debug allocation routine: is it plausible that you (for example) allocated over 8 billion objects? This serial number is also stored in bytes adjacent to (and after) the allocated block, so is also vulnerable to out-of-bounds stores by rogue code. So we have out-of-bounds stores here both before and after the requested memory. Sorry, but it's unlikely core Python is doing this - such errors are usually due to rogue extension modules. -- nosy: +tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689
Martin Mokrejs added the comment: Thank you for explanation what is going on. I called matplotlibs drawing function to include 49308 dots and corresponding legend items with their colors. That's all I can say. I am not a native English speaker so I don't know what 'rogue extension modules' means. Do you think it is a matplotlib or numpy issue which were in the stacktrace? Or a memory module error? I am running analyses which take weeks. Will python give me a clear warning/error when the object counter overflows? So what should I do now? I am clue-less right now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18844] allow weights in random.choice
Madison May added the comment: +1. I've found myself in need of this feature often enough to wonder why it's not part of the stdlib. -- nosy: +madison.may ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18844 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18844] allow weights in random.choice
Antoine Pitrou added the comment: Agreed with the feature request. The itertools dance won't be easy to understand, for many people. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18844 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18828] urljoin behaves differently with custom and standard schemas
Changes by Ned Deily n...@acm.org: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Stefan Behnel added the comment: Here is a proof-of-concept patch that integrates the functionality of the IncrementalParser into the XMLParser. I ended up reusing most of Antoines implementation and test suite. In case he'll look back into this ticket at some point, I'll put a thank you here. The patch certainly needs more cleanup, but it shows where things are going and passes all tests. -- Added file: http://bugs.python.org/file31475/integrate_IncrementalParser_into_XMLParser.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Stefan Behnel added the comment: (I still wonder why I'm the one writing all the patches here when Eli is the one who actually wants this feature ...) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18834] Add Clang to distutils to build C/C++ extensions
Changes by Ryan Gonzalez rym...@gmail.com: Added file: http://bugs.python.org/file31477/cygwinccompiler.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18834 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18834] Add Clang to distutils to build C/C++ extensions
Changes by Ryan Gonzalez rym...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file31476/ccompiler.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18834 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Stefan Behnel added the comment: BTW, maybe read_events() still isn't the ideal method name to put on a parser. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18845] 2.7.5-r2: Fatal Python error: Segmentation fault
New submission from Martin Mokrejs: While running my app testsuite I have another one which crashed. Fatal Python error: Segmentation fault Current thread 0x7fe8d3527700: File /usr/lib64/python2.7/site-packages/matplotlib/transforms.py, line 2370 in get_matrix File /usr/lib64/python2.7/site-packages/matplotlib/transforms.py, line 2203 in get_affine File /usr/lib64/python2.7/site-packages/matplotlib/transforms.py, line 2175 in transform_affine File /usr/lib64/python2.7/site-packages/matplotlib/transforms.py, line 1238 in transform File /usr/lib64/python2.7/site-packages/matplotlib/transforms.py, line 1030 in get_points File /usr/lib64/python2.7/site-packages/matplotlib/transforms.py, line 277 in __array__ File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py, line 110 in draw_path_collection File /usr/lib64/python2.7/site-packages/matplotlib/collections.py, line 259 in draw File /usr/lib64/python2.7/site-packages/matplotlib/artist.py, line 54 in draw_wrapper File /usr/lib64/python2.7/site-packages/matplotlib/collections.py, line 695 in draw File /usr/lib64/python2.7/site-packages/matplotlib/artist.py, line 54 in draw_wrapper File /usr/lib64/python2.7/site-packages/matplotlib/axes.py, line 2086 in draw File /usr/lib64/python2.7/site-packages/matplotlib/artist.py, line 54 in draw_wrapper File /usr/lib64/python2.7/site-packages/matplotlib/figure.py, line 1006 in draw File /usr/lib64/python2.7/site-packages/matplotlib/artist.py, line 54 in draw_wrapper File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py, line 440 in draw File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py, line 492 in print_png File /usr/lib64/python2.7/site-packages/matplotlib/backend_bases.py, line 2096 in print_figure File /usr/lib64/python2.7/site-packages/matplotlib/figure.py, line 1370 in savefig I wanted to draw 55620 dots in a scatter plot, each with a legend and its associated color. Actually only 100 color are used and multiple adjacent dots in the series have same color as necessary. Is this a matplotlib or a python error? -- files: matplotlib_crash_1676__SRR091640_shortened.txt messages: 196239 nosy: mmokrejs priority: normal severity: normal status: open title: 2.7.5-r2: Fatal Python error: Segmentation fault type: crash versions: Python 2.7 Added file: http://bugs.python.org/file31478/matplotlib_crash_1676__SRR091640_shortened.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Guido van Rossum added the comment: On Sat, Aug 24, 2013 at 5:04 AM, Charles-François Natali rep...@bugs.python.org wrote: Before I post it for final review, I have three more questions: 1) In the documentation, I don't know how to best refer to files object registered: is file descriptor OK, or is it too low-level? Otherwise I'd be tempted to use just file, but then this doesn't include sockets, pipes, etc. Or maybe file object/file-like object? What Antoine said. And, moreover, it should be mentioned that on Windows it only accepts socket FDs; and on UNIX it should probably qualify this in some way to exclude disk FDs (which are always considered ready by select and friends). I don't really know what the correct UNIX-flavor-neutral terminology is for this case -- perhaps we have to enumerate the possibilities? (I know of FIFOs, character special devices, and sockets.) 2) currently, the select() method returns a list of (file, event, data) But the opaque data object is optional, which means that many user might end up doing: for file, event, data in selector.select(): if event READ_EVENT: file.recv(1024) # don't use data i.e. have to unpack it for no reason. Would it make sense to return (key, event) instead? This way the user has all the interesting information, and can do: for key, event in selector.select(): if event READ_EVENT: key.file.recv(1024) or os.read(key.fd, 1024) I like this -- return the key plus the specific event. You must document SelectorKey, but that seems fine. (Looks like Antoine read too fast and didn't realize you proposed to return the key instead of the file and the data.) 3) Concerning get_info(): right now the signature is: get_info(): fileobj - (events, data) Wouldn't it be better to just return the whole key instead, which contains all the relevant information (events, data, fd and fileobj). Then we should probably also rename the method to get_key()? Yes, and yes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18720] Switch suitable constants in the socket module to IntEnum
Guido van Rossum added the comment: Looks good. Go ahead and convert the rest of the socket constants. Then we can consider other modules, e.g. select and os. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18720 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18845] 2.7.5-r2: Fatal Python error: Segmentation fault
Tim Peters added the comment: Impossible to know, but since everything in the traceback comes from matplotlib, the error is most likely in matplotlib. -- nosy: +tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689
Tim Peters added the comment: Memory corruption can be difficult to track down. Best thing you can do is strive to find a test case as small and fast as possible that shows the same kind of error. By rogue extension module I just mean 3rd-party C code (like, for example, matplotlib). I doubt it's a hardware problem. That's possible, of course, but these kinds of errors are almost always the result of errors in C code. The stacktrace probably isn't helpful. All we know is that memory got corrupted _sometime_ between someone asking for a block of memory and releasing it. The corruption may have happened a millisecond ago, or weeks ago (if the program ran that long) - there's no way to tell by the time the memory corruption is _detected_. About object counter overflows, I'm not sure what you're asking. Python doesn't have an object counter. The serial number in debug-mode allocators just counts the number of times a debug-mode malloc has been called. If that overflows, it would do no harm. Bottom line: no matter what's to blame here, the smaller faster a test program you can find, the more likely it is to get fixed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Eli Bendersky added the comment: (I still wonder why I'm the one writing all the patches here when Eli is the one who actually wants this feature ...) Well, obviously because you're the only real programmer around here and the rest of us are just a bunch of hand-wavy morons. Seriously, Stefan, lose the attitude. Your unpleasant approach to conducting a conversation completely obscures your technical contributions and capabilities. Antoine got fed up a while ago, and I'm also nearing that point. With that off my chest, I will look at this new patch, hopefully tomorrow. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11619] On Windows, don't encode filenames in the import machinery
Roundup Robot added the comment: New changeset df2fdd42b375 by Victor Stinner in branch 'default': Close #11619: The parser and the import machinery do not encode Unicode http://hg.python.org/cpython/rev/df2fdd42b375 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11619 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17588] runpy cannot run Unicode path on Windows
STINNER Victor added the comment: This issue has been fixed in issue #11619 by: New changeset df2fdd42b375 by Victor Stinner in branch 'default': Close #11619: The parser and the import machinery do not encode Unicode http://hg.python.org/cpython/rev/df2fdd42b375 Thanks for the report! (I don't plan to backport the fix to Python 3.3, it's a huge patch for a rare use case.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13758] compile() should not encode 'filename' (at least on Windows)
STINNER Victor added the comment: This issue has been fixed in issue #11619 by: New changeset df2fdd42b375 by Victor Stinner in branch 'default': Close #11619: The parser and the import machinery do not encode Unicode http://hg.python.org/cpython/rev/df2fdd42b375 Thanks for the report! (I don't plan to backport the fix to Python 3.3, it's a huge patch for a rare use case.) -- versions: +Python 3.4 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13758 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17588] runpy cannot run Unicode path on Windows
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18812] PyImport_Import redundant calls to find module
Rob Bairos added the comment: Okay, thanks for looking into it. Cheers -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689
Tim Peters added the comment: By the way, if memory serves, compiling with --with-pydebug changes the memory layout of Python objects, so a Python compiled this way _cannot_ be used successfully with extension modules that were compiled without the same options. Did you rebuild your extensions too? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Ethan Furman added the comment: Stefan Behnel wrote: ... I still wonder why I'm the one writing all the patches ... I imagine for the same reasons that I offered to write Enum: I had definite ideas about how it should be, it is sometimes easier to explain with working code than with prose, and I wanted to contribute to Python. I have to agree with Eli, though. Wading through the accusations to get to the ideas is not helping your cause. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689
Martin Mokrejs added the comment: Yes, I have rebuilt all python modules but even gdb exited on startup due to python ABI change. I am using Gentoo Linux (https://bugs.gentoo.org/show_bug.cgi?id=482348) and unless python-updater forgot to include some package in the listing of those needed to be recompiled, I am sane. And becuase gdb could not even start up I *hope* those no recompiled yet would NOT work AT ALL. Thanks for clarification, I thought that I might reach some internal number (the serial number as you say) in python and run out of some internal counters on objects. Actually, I hit these issues because I wondered why some of my application tests fail. Although all tests crunch a really lot of data they merely do the same in the end: draw charts using matplotlib which uses numpy. I have huge lists which I recently converted to generators (if possible) and now I even use imap(), izip(), ifilter() from itertools. One of the crashed tests has 153 levels in gdb stacktrace and few lines from the very top/outer already had the izip() objects. But the tests which crashed are not so huge like others, maybe take just 1/10 of the size of others, so I wonder why these failed. I think some crashes are related to me deleting explictly a huge list in my code even before leaving a function. Or maybe returning such lists between child/parent functions? Could valgring or something else help to find who is overwriting data of others? But I don't have experience with using it. I think this _figure.clear() crash could be manifestation of python deleting a wrong object/pointer. Some ugly for loops over lists took ... don't know how much but in total even 26GB of RAM was reserved by the process (most of it also as residual memory requirement). With itertools() I got down 10x. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18844] allow weights in random.choice
Madison May added the comment: I realize its probably quite early to begin putting a patch together, but here's some preliminary code for anyone interested. It builds off of the common task example in the docs and adds in validation for the weights list. There are a few design decisions I'd like to hash out. In particular: - Should negative weights cause a ValueError to be raised, or should they be converted to 0s? - Should passing a list full of zeros as the weights arg raise a ValueError or be treated as if no weights arg was passed? -- keywords: +patch Added file: http://bugs.python.org/file31479/weighted_choice.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18844 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18623] Factor out the _SuppressCoreFiles context manager
Valerie Lambert added the comment: I've added a new test that uses fork() and os.abort(), then asserts os.WCOREDUMP() is false. However, this test is currently failing. Is my test incorrect, or is this an issue with SuppressCoreFiles() itself? If its a problem with the test I'm guessing it might have to do with how os.WCOREDUMP() decides whether a process has dumped its core or not. Is there another way we could go about this test? -- Added file: http://bugs.python.org/file31480/issue-18623_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18623 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689
Tim Peters added the comment: Well, if you delete a giant list, and the list held the only references remaining to the objects the list contained, then the memory for those objects will be free'd, one object at a time. A debug build would then detect the memory corruption in those objects. But the corruption has nothing to do with deleting the list then - deleting the list would merely trigger the code that _detects_ the (pre-existing) corruption. I can just urge you again to try to find a failing test as small and fast as possible. You feel lost now precisely because you're wandering through a _mountain_ of code ;-) If you want to play with the debug serial numbers, you can set a breakpoint in function bumpserialno() (in Python's Objects/obmalloc.c). This is the entire function: static void bumpserialno(void) { ++serialno; } The function exists so you _can_ easily set a breakpoint whenever `serialno` is increased (this function is the only place serialno is changed). What I _expect_ you'll find is that serialno never gets anywhere near 8155854715. If so, that just says again that the copy of serialno made when the corrupted object was created got corrupted (overwritten) by some bad C (or C++) code. It can't tell us who overwrote it, or when. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18845] 2.7.5-r2: Fatal Python error: Segmentation fault
Tim Peters added the comment: Note that the same poster is also reporting memory corruption in issue 18843. I suggest ignoring this one unless/until the earlier bug is resolved (memory corruption can easily cause a segfault - or any other kind of error). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17902] Document that _elementtree C API cannot use custom TreeBuilder for iterparse or IncrementalParser
Eli Bendersky added the comment: Aaron - could you describe your use case of passing a custom parser into iterparse? We're currently considering deprecating the feature of passing a parser into iterparse in a future release (this is being discussed in issue 17741). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18846] python.exe stdout stderr issues again
New submission from SSmith: python.exe sends its output to stderr instead of stdout. Writing the following to the command line highlight the issue: [ in]python.exe --version 1 null #redirects stdout to null [out]Python 2.7.5 [ in]python.exe --version 2 null #redirects stderr to null [out] Python 3.3 has exactly the same issue. Python 3.4alpha now, although it gives the correct output with the --version switch...: [ in]python --version 1 null [out] [ in]python --version 2 null [out]Python 3.4.0a1 ...still invoking a simple pyton.exe (switchless), prints its default output to stderr: [ in]python 1 null [out]Python 3.4.0a1 (v3.4.0a1:46535f65e7f3, Aug 3 2013, 22:59:31) [MSC v.1600 32 bit (Intel)] on win32 [out]Type help, copyright, credits or license for more information. [out] [ in]python 2 null [out] Some notes/refs: Incomplete fix in 3.4a http://bugs.python.org/issue18338 -- components: Interpreter Core messages: 196257 nosy: SSmith priority: normal severity: normal status: open title: python.exe stdout stderr issues again type: behavior versions: Python 2.7, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18846 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18409] IDLE Improvements: Unit test for AutoComplete.py
Phil Webster added the comment: I've attached my work so far in order to get feedback before I head too far in the wrong direction. I'm not sure if my addition of mock events and AutoCompleteWindow is the right way to go and I'm open to any guidance. -- keywords: +patch Added file: http://bugs.python.org/file31481/18409test_autocomplete1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com