[issue19005] PyIter_Next crashes if passed a non-iterator

2013-09-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue14894] distutils.LooseVersion fails to compare number and a word

2013-09-12 Thread Sam Lai
Sam Lai added the comment: I have a more realistic example of this bug. In the docstring for distutils.LooseVersion, it says '1.5.1' and '3.2.p10' are both valid version numbers. If instead of '3.2.p10', we use '1.5.p10', the following occurs - >>> v1 = LooseVersion('1.5.1') >>> v2 = LooseVers

[issue18981] Typo in the ctypes tests

2013-09-12 Thread Anoop Thomas Mathew
Changes by Anoop Thomas Mathew : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge ___ Python tracker ___ ___ Python-bugs-list mai

[issue18986] Add a case-insensitive case-preserving dict

2013-09-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Serhiy, any benchmarks for your implementation? Does it slow down regular dicts? -- ___ Python tracker ___ _

[issue18683] Core dumps on CentOS

2013-09-12 Thread Marc Schlaich
Marc Schlaich added the comment: Yes, I could reproduce segfaults on Python 2.7 (looks like it is even worse than on 2.6 where it appeared only randomly). I was not quite accurate in my initial comment. I don't use any custom C extensions but I'm using pygtk/gobject so it might be a bug there.

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-12 Thread Lars Buitinck
Changes by Lars Buitinck : -- nosy: +jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-12 Thread Lars Buitinck
Lars Buitinck added the comment: I don't really see the benefit of a context manager over an argument. It's a power user feature anyway, and context managers (at least to me) signal cleanup actions, rather than construction options. -- ___ Python tr

[issue18683] Core dumps on CentOS

2013-09-12 Thread STINNER Victor
STINNER Victor added the comment: > I'll try that patch and keep you posted. Cool, thanks. -- ___ Python tracker ___ ___ Python-bugs-

[issue14432] Bug in generator if the generator in created in a C thread

2013-09-12 Thread STINNER Victor
STINNER Victor added the comment: ping? (for myself :-)) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue18683] Core dumps on CentOS

2013-09-12 Thread Marc Schlaich
Marc Schlaich added the comment: The generator.patch from #14432 didn't help. The other couldn't be applied to 2.7. I have a core dump, should I upload it? -- ___ Python tracker __

[issue18683] Core dumps on CentOS

2013-09-12 Thread STINNER Victor
STINNER Victor added the comment: > I have a core dump, should I upload it? The coredump is not useful if we cannot analyze it. Please open it in gdb, type "thread all apply where" and copy/paste in a file and attach the file. You may use "set pagination off" for easier copy/paste. --

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: By "context" I did not really mean a context manager. I just meant an object (possibly a singleton or module) which implements the same interface as multiprocessing. (However, it may be a good idea to also make it a context manager whose __enter__() method

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-12 Thread Olivier Grisel
Olivier Grisel added the comment: The process pool executor [1] from the concurrent futures API would be suitable to explicitly start and stop the helper process for the `forkserver` mode. [1] http://docs.python.org/3.4/library/concurrent.futures.html#concurrent.futures.ProcessPoolExecutor Th

[issue18986] Add a case-insensitive case-preserving dict

2013-09-12 Thread Ethan Furman
Ethan Furman added the comment: On 09/11/2013 02:39 PM, Tim Delaney wrote on PyDev: > > I would think that retrieving the keys from the dict would return the > transformed keys (I'd > call them canonical keys). The more I think about this the more I agree. A canonicaldict with a key functio

[issue18986] Add a case-insensitive case-preserving dict

2013-09-12 Thread Ethan Furman
Ethan Furman added the comment: True, but how big a deal is that? For one, it seems questionable to have the presentation portion of the data be part of the key. For two, when presentation is important a separate list must be kept anyway to preseed the dict; so just use that list to cycle thr

[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2013-09-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hello, > To discover a 32-bit interpreter running on a 64-bit system, we could > use > platform.architecture(), which returns > >>> platform.architecture() > ('32bit', 'ELF') Just use (sys.maxsize < 2**32). > What then, though? How do you turn '32bit'

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2013-09-12 Thread Lukas Wunner
Lukas Wunner added the comment: *ping* Anybody, please consider applying the patch I've submitted August 8th so that this issue gets fixed in Python 2.7's urllib.py. Thanks so much. -- ___ Python tracker _

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-12 Thread Olivier Grisel
Olivier Grisel added the comment: Richard Oudkerk: thanks for the clarification, that makes sense. I don't have the time either in the coming month, maybe later. -- ___ Python tracker _

[issue18986] Add a case-insensitive case-preserving dict

2013-09-12 Thread R. David Murray
R. David Murray added the comment: It would be simpler, but it would also be useless for the actual use case for which this issue was opened. -- ___ Python tracker ___ _

[issue18986] Add a case-insensitive case-preserving dict

2013-09-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > R. David Murray added the comment: > > You are conceptualizing this very differently. In our view, this > data structure is for cases where the original key is the most > important piece of information (about the keys). The transformation > in the lookup pro

[issue18990] Remove unnecessary API inconsistency from ElementTree.XMLPullParser.close()

2013-09-12 Thread Stefan Behnel
Stefan Behnel added the comment: ping - I would like to see this fixed for alpha3, which is due in two weeks. -- ___ Python tracker ___ __

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-09-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > 2. _PyVerify_fd(fd) is always true. Given the current definition: > #define _PyVerify_fd(fd) (_get_osfhandle(fd) >= 0) > for those values of fd _get_osfhandle(fd) >= 0, always. Hum, are you sure this is the selected implementation? - this code is only in

[issue18986] Add a case-insensitive case-preserving dict

2013-09-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ethan, please don't post the same message *both* on the tracker and on the mailing-list. I'm sure most people here also read the ML thread. -- ___ Python tracker __

[issue19007] precise time.time() under Windows 8

2013-09-12 Thread STINNER Victor
STINNER Victor added the comment: time.time() is sometimes used in performance critical code. Is GetSystemTimePreciseAsFileTime() as fast as GetSystemTimeAsFileTime()? Linux has the opposite: CLOCK_REALTIME_COARSE. This clock is less accurate but may be faster. http://lwn.net/Articles/342018/

[issue19007] precise time.time() under Windows 8

2013-09-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: "GetSystemTimePreciseAsFileTime() has very little overhead; the new function is even a little faster than GetSystemTimeAsFileTime(), a call takes a few ten nanoseconds." from http://www.windowstimestamp.com/description#C_2 --

[issue18844] allow weights in random.choice

2013-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Neil. It is interesting. Vose's alias method has followed disadvantages (in comparison with the roulette wheel selection proposed above): 1. It operates with probabilities and uses floats, therefore it can be a little less accurate. 2. It consume

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-12 Thread Michael Foord
Michael Foord added the comment: Although I'm not certain the first test is "invalid". It's testing a different case than the second test. So if the first test passes it should be renamed rather than removed. If it *fails* then I'd like to look at the behaviour and specify (test) that. --

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-12 Thread Michael Foord
Michael Foord added the comment: Good catch - thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2013-09-12 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue8713] multiprocessing needs option to eschew fork() under Linux

2013-09-12 Thread Piotr Dobrogost
Changes by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue13107] Text width in optparse.py can become negative

2013-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is less ugly patch (for argparse and optparse). Instead of prohibiting wrapping at all for small width, it limits minimal width of formatted text. It try first decrease the indent for help. -- stage: test needed -> patch review Added file: http:

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: There are lots of things that behave differently depending on the currently set start method: Lock(), Semaphore(), Queue(), Value(), ... It is not just when creating a Process or Pool that you need to know the start method. Passing a context or start_method

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ezio.melotti, michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue19007] precise time.time() under Windows 8

2013-09-12 Thread Antoine Pitrou
New submission from Antoine Pitrou: For whoever is interested: Windows 8 apparently has a new API named GetSystemTimePreciseAsFileTime which returns the system API with a much better resolution than GetSystemTimeAsFileTime does ("The GetSystemTimePreciseAsFileTime function retrieves the curren

[issue18986] Add a case-insensitive case-preserving dict

2013-09-12 Thread R. David Murray
R. David Murray added the comment: You are conceptualizing this very differently. In our view, this data structure is for cases where the original key is the most important piece of information (about the keys). The transformation in the lookup process is entirely in the service of looking u

[issue18986] Add a case-insensitive case-preserving dict

2013-09-12 Thread Ethan Furman
Ethan Furman added the comment: Right, sorry. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue18993] There is an overshadowed and invalid test in testmock.py

2013-09-12 Thread Vajrasky Kok
Vajrasky Kok added the comment: The first test fails. I already tested it. I think they test the same thing, what happens to the attribute of mock instance if you delete it. -- ___ Python tracker

[issue17087] Improve the repr for regular expression match objects

2013-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about such output? >>> re.search('p((a)|(b))(c)?', 'unpack') Or may be ('p', [['a'], []], ['c']) if you prefer legal Python expression. -- ___ Python tracker

[issue18744] pathological performance using tarfile

2013-09-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: -serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue18682] [PATCH] remove bogus codepath from pprint._safe_repr

2013-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Antoine, what you say? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue18784] minor uuid.py loading optimization

2013-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> serhiy.storchaka stage: -> commit review versions: +Python 3.3, Python 3.4 ___ Python tracker ___

[issue18784] minor uuid.py loading optimization

2013-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7aaba721ebc0 by Serhiy Storchaka in branch '3.3': Issue #18784: The uuid module no more attempts to load libc via ctypes.CDLL, http://hg.python.org/cpython/rev/7aaba721ebc0 New changeset 66ec8431032d by Serhiy Storchaka in branch 'default': Issue #1

[issue18784] minor uuid.py loading optimization

2013-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Evgeny. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker

[issue14678] Update zipimport to support importlib.invalidate_caches()

2013-09-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: Brett wrote a pure python zipimporter in http://bugs.python.org/issue17630 :) FWIW, the zipimport.c implementation (in 2.7) causes us serious pain when we've got the stdlib in a .zip file and need to update that while there are running python processes (whic

[issue18902] Make ElementTree event handling more modular to allow custom targets for the non-blocking parser

2013-09-12 Thread Stefan Behnel
Stefan Behnel added the comment: The way the XMLPullParser is implemented in lxml.etree now is that it simply inherits from XMLParser. This would also make sense for ElementTree, even before supporting arbitrary targets. The patch in ticket #18990 makes this simple to do. For reference, here

[issue17741] event-driven XML parser

2013-09-12 Thread Stefan Behnel
Stefan Behnel added the comment: The way the XMLPullParser is implemented in lxml.etree now is that it simply inherits from XMLParser. This would also make sense for ElementTree, even before supporting arbitrary targets. The patch in ticket #18990 makes this simple to do. For reference, here

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2013-09-12 Thread Senthil Kumaran
Senthil Kumaran added the comment: I have a slight fear that this patch could be considered as a feature addition in 2.7 urllib.py, I would like to quell that and ensure that behaviour expectation is consistent when using urllib or urllib2 and latest urllib/request.py modules. Also, tests + d