[issue19442] Python crashs when a warning is emitted during shutdown

2013-10-29 Thread STINNER Victor
New submission from STINNER Victor: Because of a bug, warnings were not emitted during Python shutdown. I fixed the bug in issue #19424, and now Python crashs when a warning is emitted during shutdown. See also issue #19421: "FileIO destructor imports indirectly the io module at exit". The w

[issue19442] Python crashes when a warning is emitted during shutdown

2013-10-29 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever title: Python crashs when a warning is emitted during shutdown -> Python crashes when a warning is emitted during shutdown ___ Python tracker ___

[issue19442] Python crashes when a warning is emitted during shutdown

2013-10-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1787277915e9 by Victor Stinner in branch 'default': Issue #19442: Fix warnings emitted during Python shutdown http://hg.python.org/cpython/rev/1787277915e9 -- nosy: +python-dev ___ Python tracker

[issue19424] _warnings: patch to avoid conversions from/to UTF-8

2013-10-29 Thread STINNER Victor
STINNER Victor added the comment: Oops, while fixing this issue, I found a new issue related to warnings: I opened issue #19442 "Python crashes when a warning is emitted during shutdown". This issue can now be fixed. -- resolution: -> fixed status: open -> closed

[issue19424] _warnings: patch to avoid conversions from/to UTF-8

2013-10-29 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- stage: -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-29 Thread STINNER Victor
STINNER Victor added the comment: Trying to reimport the io module is not the only issue of emitting warnings during Python shutdown. I just found a new issue after fixing an unrelated bug in the warnings module (issue #19424): issue #19442 "Python crashes when a warning is emitted during shut

[issue19442] Python crashes when a warning is emitted during shutdown

2013-10-29 Thread STINNER Victor
STINNER Victor added the comment: The changeset 1787277915e9 is closer to a workaround than a real fix: +if (module != Py_None) { +res = warn_explicit(category, message, filename, lineno, module, registry, +NULL); +} +else { +/* FIXME: emi

[issue19442] Python crashes when a warning is emitted during shutdown

2013-10-29 Thread STINNER Victor
STINNER Victor added the comment: warn_shutdown.py: example of script emitting warning at shutdown. Depending on the timing, the warning is shown or not (replace "if 0:" with "if 1:" to always display the warning). This example is a simplified example of the original crasher: test_threading.te

[issue19172] selectors: add keys() method

2013-10-29 Thread Guido van Rossum
Guido van Rossum added the comment: I added some comments to the code review. Please take a look. -- ___ Python tracker ___ ___ Python

[issue19438] Where is NoneType in Python 3?

2013-10-29 Thread mpb
mpb added the comment: Regarding http://www.python.org/dev/peps/pep-0294/ ... Complete removal of the types module makes more sense to me than letting types continue, but removing NoneType from it! If type(None) is the one_true_way, then the docs should say that, possibly in multiple location

[issue19424] _warnings: patch to avoid conversions from/to UTF-8

2013-10-29 Thread Vajrasky Kok
Vajrasky Kok added the comment: Victor, I found out that this commit http://hg.python.org/cpython/rev/34e166d60f37 gives me compiler warning. Objects/unicodeobject.c: In function ‘PyUnicode_CompareWithASCIIString’: Objects/unicodeobject.c:10583:22: warning: pointer targets in initialization di

[issue19413] Reload semantics changed unexpectedly in Python 3.3

2013-10-29 Thread Nick Coghlan
Nick Coghlan added the comment: Just had a thought on a possible functional test case: - write a module file - load it - check for expected attributes - move it from name.py to name/__init__.py - reload it - check for new expected attributes -- ___ Py

[issue19443] add to dict fails after 1,000,000 items on py 2.7.5

2013-10-29 Thread Milton Mobley
New submission from Milton Mobley: d, i = {}, 0 while (i < 1000): n = i + 1 d[n] = n i += 1 On Py 2.7.5 (windows7, x64, 4GB ram) this program slowed down obviously after passing 1,000,000 adds and never completed or raised an exception. Windows performance monitor showed it was

[issue19443] add to dict fails after 1,000,000 items on py 2.7.5

2013-10-29 Thread Elizabeth Myers
Elizabeth Myers added the comment: Your test case, nor the one I wrote, trigger Python 2.7.5 nor 3.3.2 on Linux 64-bit: try: xrange except: xrange = range d = {} r = 1000 ctr = 0 for n in xrange(r): d[n] = n ctr += 1 assert len(d) == r assert ctr == r -- nosy: +Elizacat __

[issue19443] add to dict fails after 1,000,000 items on py 2.7.5

2013-10-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Works for me -- on 64-bit OS X 10.9 running Python 2.7.5 -- nosy: +rhettinger ___ Python tracker ___

[issue19441] itertools.tee improve documentation

2013-10-29 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list ma

[issue19443] add to dict fails after 1,000,000 items on py 2.7.5

2013-10-29 Thread Tim Peters
Tim Peters added the comment: Just another data point: runs fine on Vista, 32-bit box, Python 2.7.5. Python is consuming about 320MB when the dict is done building. -- nosy: +tim.peters ___ Python tracker __

[issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC

2013-10-29 Thread Robert Merrill
New submission from Robert Merrill: Same code but different problem as this issue: http://bugs.python.org/issue10897 The above-linked issue was closed as WONTFIX, but there is a secondary problem: the file descriptor that mmap.mmap() allocates is not set to close-on-exec. This means that any p

[issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC

2013-10-29 Thread Robert Merrill
Robert Merrill added the comment: I should add a caveat: the fd that is created by mmap /will/ be set to close-on-exec if the fd you passed in was. But even if it's not, I see no reason why mmap should not be setting it anyway. At the very least, the documentation should bring the user's atten

[issue19407] PEP 453: update the "Installing Python Modules" documentation

2013-10-29 Thread Nick Coghlan
Nick Coghlan added the comment: Marcus Smith (aka @qwcode) has made good strides this week in getting the Python Packaging User Guide to a presentable state using the current Python docs theme. Bootstrapping: https://python-packaging-user-guide.readthedocs.org/en/latest/setup.html Usage: htt

[issue19445] heapq.heapify is n log(n), not linear

2013-10-29 Thread Blaise Gassend
New submission from Blaise Gassend: The documentation for heapq.heapify indicates that it runs in linear time. I believe that this is incorrect, and that it runs in worst case n * log(n) time. I checked the implementation, and there are indeed n _siftup operations, which each appear to be wors

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-10-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Graham, do we have a contributor agreement from you? -- ___ Python tracker ___ ___ Python-bugs-li

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-10-29 Thread Graham Dumpleton
Graham Dumpleton added the comment: I don't believe so. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

<    1   2