[issue14609] can't modify sys.modules during import with importlib

2012-04-18 Thread Eric Snow
Eric Snow added the comment: that's a pretty sneaky hack, but I can see the (weak) point of it. So, to keep backward compatibility, importlib._bootstrap._find_and_load() would have to return sys.modules[fullname] instead of the module returned by loader.load_module(fullname). My inclination

[issue12947] Examples in library/doctest.html lack the flags

2012-04-18 Thread Éric Araujo
Éric Araujo added the comment: Thank you. I think it’s clear that for the docs of the doctest flags we need to display snippets with the flags. -- resolution: invalid -> stage: committed/rejected -> test needed status: closed -> open ___ Python tr

[issue14611] inspect.getargs fails on some anonymous tuples

2012-04-18 Thread Stefano Taschini
Stefano Taschini added the comment: I'll give it a try. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue14612] Crash after modifying f_lineno

2012-04-18 Thread Peter Otten
Peter Otten <__pete...@web.de> added the comment: frame_setlineno() doesn't keep track of with blocks. Here's a patch. -- keywords: +patch nosy: +potten Added file: http://bugs.python.org/file25258/frame_setlineno.patch ___ Python tracker

[issue14371] Add support for bzip2 compression to the zipfile module

2012-04-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > `buf += data` is noticeably faster `b''.join()` in CPython. Perhaps because your system's memory allocator is extremely good (or buf is always very small), but b''.join() is far more robust. Another alternative is accumulating in a bytearray, since it uses

[issue14613] time.time can return None or NaN

2012-04-18 Thread Mark Dickinson
Mark Dickinson added the comment: > It is possible that it returns NaN How is that possible? I can't see any way that the Python 2.7 implementation of floattime could return a NaN. In each case, floattime appears to be extracting integer fields from some suitable struct, and then combining

[issue14613] time.time can return None or NaN

2012-04-18 Thread Michael Foord
Michael Foord added the comment: So NaN is a possible result from time.time()? Perhaps that should be mentioned in the docs. Is returning NaN preferable to failing with an exception? -- ___ Python tracker ___

[issue14612] Crash after modifying f_lineno

2012-04-18 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> benjamin.peterson nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list

[issue14613] time.time can return None or NaN

2012-04-18 Thread STINNER Victor
STINNER Victor added the comment: > time.time() can return None, or sometimes NaN It is possible that it returns NaN, but it cannot return None. time.time() implementation of Python 2.7: static PyObject * time_time(PyObject *self, PyObject *unused) { double secs; secs = floattime();

[issue14609] can't modify sys.modules during import with importlib

2012-04-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is a really important usecase for many packages including py.test and twisted, though. -- ___ Python tracker ___ _

[issue14612] Crash after modifying f_lineno

2012-04-18 Thread R. David Murray
R. David Murray added the comment: For reference, here is the crash: rdmurray@hey:~/python/p33>./python -m pdb script.py > /home/rdmurray/python/p33/script.py(1)() -> with open('test') as f: (Pdb) j 3 python: Objects/frameobject.c:207: frame_setlineno: Assertion `blockstack_top > 0' failed. z

[issue14590] ConfigParser doesn't strip inline comment when delimiter occurs earlier without preceding space.

2012-04-18 Thread Łukasz Langa
Łukasz Langa added the comment: While this bug is real, I'm hesitant to fix it for 2.7 and 3.2. I can imagine someone using the current behaviour unintentionally, and getting burned by the fix. This would be a real PITA to debug. Is it fine by you if I just fix it for 3.3 and update the backp

[issue14613] time.time can return None or NaN

2012-04-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: What exact version of Python was used? What's the complete list of patches that was applied to this Python version? As discussed in #14028, this behavior doesn't correspond to the code at all. So hardware error, compiler error, and downstream patches are lik

[issue14611] inspect.getargs fails on some anonymous tuples

2012-04-18 Thread R. David Murray
R. David Murray added the comment: Formal parameter tuple unpacking was removed in Python3, so this is a Python2-only issue. Would you like to submit a patch for Python2? -- nosy: +r.david.murray priority: normal -> low stage: -> needs patch ___ P

[issue14613] time.time can return None or NaN

2012-04-18 Thread Roman
Changes by Roman : -- nosy: +rye ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman

[issue14613] time.time can return None or NaN

2012-04-18 Thread Mark Dickinson
Mark Dickinson added the comment: Issue 14028 is related. -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailin

[issue14613] time.time can return None or NaN

2012-04-18 Thread Michael Foord
Changes by Michael Foord : -- versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue14613] time.time can return None or NaN

2012-04-18 Thread Michael Foord
Changes by Michael Foord : -- stage: -> test needed type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue14613] time.time can return None or NaN

2012-04-18 Thread Michael Foord
New submission from Michael Foord : time.time() can return None, or sometimes NaN. If it can't get a "proper" value from the OS then I would expect it to throw an exception. The docs don't mention anything about error conditions. This was originally reported to Ubuntu One and there has been di

[issue14428] Implementation of the PEP 418

2012-04-18 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Please leave the pybench default timers unchanged in case the new APIs are not available. The perf_counter_process_time.patch currently changes them, even though the new APIs are not available on older Python releases, thus breaking pybench for e.g. Python

[issue14385] Support other types than dict for __builtins__

2012-04-18 Thread STINNER Victor
STINNER Victor added the comment: -assert(!builtins || PyDict_Check(builtins)); +assert(!builtins); Oops, the assert must be replaced with assert(builtins != NULL) -> fixed in patch version 4. -- Added file: http://bugs.python.org/file25257/builtins-4.p

[issue14606] Memory leak subprocess on Windows

2012-04-18 Thread STINNER Victor
STINNER Victor added the comment: > 20kb exactly, I can confirm it is only on Windows. I'm currently running some > tests to make sure it isn't a general Windows problem. I'll post an update as > soon as done. Oh, that's a lot. Can you please also try with Python 3.2? -- ___

[issue14606] Memory leak subprocess on Windows

2012-04-18 Thread Roland
Roland added the comment: 20kb exactly, I can confirm it is only on Windows. I'm currently running some tests to make sure it isn't a general Windows problem. I'll post an update as soon as done. -- ___ Python tracker

[issue14612] Crash after modifying f_lineno

2012-04-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue14612] Crash after modifying f_lineno

2012-04-18 Thread Massimiliano Tomassoli
Changes by Massimiliano Tomassoli : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue14612] Crash after modifying f_lineno

2012-04-18 Thread Massimiliano Tomassoli
New submission from Massimiliano Tomassoli : Debugging script.py and jumping to line 3 makes Python crash. For instance: python -m pdb script.py (Pdb) j 3 -- components: Interpreter Core files: script.py messages: 158603 nosy: mtomassoli priority: normal severity: normal status: open ti

[issue14591] Value returned by random.random() out of valid range

2012-04-18 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue14606] Memory leak subprocess on Windows

2012-04-18 Thread STINNER Victor
STINNER Victor added the comment: I don't see any leak on Linux with Python 2.7 or Python 3.3. How much KB does subprocess leak per process? -- nosy: +haypo title: Memory leak subprocess -> Memory leak subprocess on Windows ___ Python tracker

[issue14598] _cursesmodule.c fails with ncurses-5.9 on Linux

2012-04-18 Thread STINNER Victor
STINNER Victor added the comment: You should remove the old code instead of comment it. +/* NOTE configure check if ncurses require such definition #define NCURSES_OPAQUE 0 +*/ +/* NOTE configure check for existence of flags + * Also flags are visible only if WINDOW structure is not opaque #

[issue14611] inspect.getargs fails on some anonymous tuples

2012-04-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +michael.foord, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue14610] configure script hangs on pthread verification and PTHREAD_SCOPE_SYSTEM verification on Ubuntu

2012-04-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue12947] Examples in library/doctest.html lack the flags

2012-04-18 Thread Stefano Taschini
Stefano Taschini added the comment: Concrete examples can be seen in the section http://docs.python.org/library/doctest.html#option-flags-and-directives For instance at http://docs.python.org/library/doctest.html#doctest.IGNORE_EXCEPTION_DETAIL The doctest flags present in the sources in h

[issue14611] inspect.getargs fails on some anonymous tuples

2012-04-18 Thread Stefano Taschini
New submission from Stefano Taschini : How to reproduce Take the following two functions: >>> def f(l, (x, y)): ...sup = max(u*x + v*y for u, v in l) ...return ((u, v) for u, v in l if u*x + v*y == sup) >>> def g((x, y)): ...def h(): ...

[issue14608] Python 2.7.3 x86 msi - msvcr90.dll version mismatch

2012-04-18 Thread Eduard
Eduard added the comment: > Any version should be fine. This is all I need to know. It's just one less place to check in case of troubles. Thank you for your time and patience. -- resolution: -> invalid status: open -> closed ___ Python tracker

[issue14610] configure script hangs on pthread verification and PTHREAD_SCOPE_SYSTEM verification on Ubuntu

2012-04-18 Thread Raphael Cruzeiro
New submission from Raphael Cruzeiro : While installing Python 2.7.3 on my Ubuntu server the configure script hanged on the verification for pthread, I then proceded to alter the script to aways return true for pthread and it hanged again checking for PTHREAD_SCOPE_SYSTEM, which I also bypasse

[issue14608] Python 2.7.3 x86 msi - msvcr90.dll version mismatch

2012-04-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: Eduard: is all this causing *actual* problems? Any version should be fine. -- ___ Python tracker ___ _

<    1   2