[issue15427] Describe use of args parameter of argparse.ArgumentParser.parse_args

2013-04-03 Thread paul j3
paul j3 added the comment: I changed the reference to the optparse allow_interspersed_args attribute to the disable_interspersed_args() method. -- Added file: http://bugs.python.org/file29662/remainder.patch ___ Python tracker

[issue17622] Python sets wrong pid in window properties

2013-04-03 Thread Yuri
New submission from Yuri: When I click on "Close Window" button for the unresponsive python-based app 'meld', message from window manager shows up offering to kill the non-existent pid. It looks like python libs set wrong pid for windows when python multithreading is in use by this app. Here

[issue8913] Document that datetime.__format__ is datetime.strftime

2013-04-03 Thread Heikki Partanen
Heikki Partanen added the comment: Improved the datetime example to have time part -- Added file: http://bugs.python.org/file29663/issue8913-4.patch ___ Python tracker ___ ___

[issue6743] Add function compatible with print to pprint module

2013-04-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > But it can't work. pprint() uses all the width for a single object. > How are you supposed to print multiple objects? On multiple lines? -- ___ Python tracker _

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Drekin
Drekin added the comment: I have Windows Vista Business SP2, 64-bit, (6.0.6002). If I start Python any way (from console, from shortcut, via py.exe or not) the same behavior occurs. -- ___ Python tracker _

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Drekin
Drekin added the comment: However it raises the exception correctly in IDLE. The same behavior occured on Windows 7 Home Premium SP1, 64-bit, (6.1.7601). -- ___ Python tracker _

[issue17623] Typo in Doc/whatsnew/3.3.rst

2013-04-03 Thread Thomas Heller
New submission from Thomas Heller: Typo: trucate instead of truncate -- assignee: docs@python components: Documentation files: work.patch keywords: patch messages: 185901 nosy: docs@python, theller priority: normal severity: normal status: open title: Typo in Doc/whatsnew/3.3.rst Added

[issue6743] Add function compatible with print to pprint module

2013-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Amaury Forgeot d'Arc added the comment: > > > But it can't work. pprint() uses all the width for a single object. > > How are you supposed to print multiple objects? > > On multiple lines? But then, it doesn't have anything similar to print() except that it

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Tim Golden
Tim Golden added the comment: That's because IDLE uses a completely different input loop from the console interpreter. I'll try to get to this but I'm chock-a-block with other work at the moment. If anyone else wants to dig, please do so. if the worst came to the worst we could back out my previ

[issue17588] runpy cannot run Unicode path on Windows

2013-04-03 Thread Drekin
Drekin added the comment: I have no specific use case. I just thought that runpy.run_path should work similarily as if the file was run directly (which works). File ∫.py can be created, displayed and run by Python with no problem in Windows. -- ___

[issue17622] Python sets wrong pid in window properties

2013-04-03 Thread R. David Murray
R. David Murray added the comment: Python doesn't know anything about X windows or window properties. (Well, it might in tkinter, but meld appears to use GTK). This is a bug in the meld application or one of the libraries it depends on, not Python or its stdlib. -- nosy: +r.david.mur

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Drekin
Drekin added the comment: There is related weird behavior: >>> try: ... input() ... except KeyboardInterrupt: ... print("exception occured") ... # Ctrl-C hit Traceback (most recent call last): File "", line 2, in KeyboardInterrupt During handling of the above exception, another excep

[issue17623] Typo in Doc/whatsnew/3.3.rst

2013-04-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5dc976ce1b50 by R David Murray in branch '3.3': #17623: fix whatsnew typo http://hg.python.org/cpython/rev/5dc976ce1b50 New changeset 3c7a9c31001c by R David Murray in branch 'default': Merge #17623: fix whatsnew typo http://hg.python.org/cpython/re

[issue17623] Typo in Doc/whatsnew/3.3.rst

2013-04-03 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker ___ _

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Maybe this is related to http://bugs.python.org/issue13673 which causes PyTraceback_Print() to fail if a signal is received but PyErr_CheckSignals() has not been called. Note that wrapping in "try: ... except: raise" makes a traceback appear: >>> try: i

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2013-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Simplifying the eval loop is a rather good thing. Could you post examples of bytecode disassembly before and after the patch? -- nosy: +pitrou ___ Python tracker _

[issue16208] getaddrinfo returns wrong results if IPv6 is disabled

2013-04-03 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue13673] PyTraceBack_Print() fails if signal received but PyErr_CheckSignals() not called

2013-04-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Adding PyErr_CheckSignals() after PyOS_Readline() in builtin_input() seems to fix the problem. -- Added file: http://bugs.python.org/file29665/input-ctrlc.patch ___ Python tracker

[issue13673] PyTraceBack_Print() fails if signal received but PyErr_CheckSignals() not called

2013-04-03 Thread Richard Oudkerk
Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file29665/input-ctrlc.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue13673] PyTraceBack_Print() fails if signal received but PyErr_CheckSignals() not called

2013-04-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Sorry, last message was for another issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Adding PyErr_CheckSignals() after PyOS_Readline() in builtin_input() seems to fix the problem. -- keywords: +patch Added file: http://bugs.python.org/file29666/input-ctrlc.patch ___ Python tracker

[issue17624] Confusing TypeError in urllib.urlopen

2013-04-03 Thread Stefan Bucur
New submission from Stefan Bucur: When calling urllib.urlopen with a string containing the NULL ('\x00') character, a TypeError exception is thrown, as in the following example: urllib.urlopen('\x00\x00\x00') [...] File "/home/bucur/onion/python-bin/lib/python2.7/urllib.py", line 86, in url

[issue8913] Document that datetime.__format__ is datetime.strftime

2013-04-03 Thread Eric V. Smith
Eric V. Smith added the comment: That looks great. Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue17624] Confusing TypeError in urllib.urlopen

2013-04-03 Thread R. David Murray
R. David Murray added the comment: In Python3 the equivalent urllib.request.urlopen call produces: ValueError: unknown url type: So this is effectively already fixed (although that error message should be doing a repr on the value, so I fixed that). We don't in general document every exce

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2013-04-03 Thread Stefan Krah
Stefan Krah added the comment: The change seems to slow down the pi float benchmark. Run this and hit Ctrl-C after the first decimal result appears: ./python Modules/_decimal/tests/bench.py I've run the benchmark seven times and the average for float is something like 8-10% slower (64-bit Linu

[issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear

2013-04-03 Thread Raymond Hettinger
New submission from Raymond Hettinger: In an editor window, select Edit-Replace and click ReplaceAll. The dialog window stays open. Formerly, it cleared immediately which was useful. The new behavior is confusing and less useful. -- assignee: roger.serwy components: IDLE messages:

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Tim Golden
Tim Golden added the comment: +1 Richard - are you in a position to commit / push? -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue17561] Add socket.create_server_sock() convenience function

2013-04-03 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Here's a patch for Tulip: https://codereview.appspot.com/8307045 Will ping Tulip's ml as well. -- ___ Python tracker ___

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 241cd716bf5f by Richard Oudkerk in branch '3.3': Issue #17619: Make input() check for Ctrl-C correctly on Windows. http://hg.python.org/cpython/rev/241cd716bf5f -- nosy: +python-dev ___ Python tracker

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Richard - are you in a position to commit / push? Done. -- ___ Python tracker ___ ___ Python-bug

[issue12964] Two improvements for the locale aliasing engine

2013-04-03 Thread Mark Lawrence
Mark Lawrence added the comment: >From msg143902 "Both of the two calls *do not work* since Windows does not recognize strings such as 'en_US.ISO8859-1'." so how can this be an enhancement? But anyway #10466 talks about the same thing, could this be closed as a duplicate? -- nosy: +Br

[issue12964] Two improvements for the locale aliasing engine

2013-04-03 Thread R. David Murray
R. David Murray added the comment: I believe Martin is working on a proposal that will solve the windows issue, but it may be quite some time before that happens. Yes, the windows issue is essentially a dup, but the linux issue is different. As for your question, fixing the Windows issue is de

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear

2013-04-03 Thread Roger Serwy
Roger Serwy added the comment: That behavior was introduced as part of the patch I wrote a long time ago for #13052. In retrospect that extra functionality went beyond the scope of that issue and should not have been included. Does anyone else think that the new behavior ought to be reverted?

[issue1634774] locale 1251 does not convert to upper case properly

2013-04-03 Thread Mark Lawrence
Mark Lawrence added the comment: Am I correct in saying that fixing this wouldn't help much as there are known issues with locales on Windows, e.g. #10466 ? -- ___ Python tracker

[issue1634774] locale 1251 does not convert to upper case properly

2013-04-03 Thread R. David Murray
R. David Murray added the comment: No, the issues with locale on Windows have to do with the locale names. Locale otherwise works fine on windows. -- nosy: +r.david.murray ___ Python tracker ___

[issue12558] Locale-dependent exception for float width argument to Tkinter widget constructor

2013-04-03 Thread Mark Lawrence
Mark Lawrence added the comment: FWIW this can be reproduced on Windows Vista with Python 3.3.1rc1. -- nosy: +BreamoreBoy ___ Python tracker ___ _

[issue14143] test_ntpath failure on Windows

2013-04-03 Thread Mark Lawrence
Mark Lawrence added the comment: I'm guessing this is a one off. As nobody is screaming or shouting can it be closed? -- nosy: +BreamoreBoy ___ Python tracker ___ _

[issue8639] Allow callable objects in inspect.getfullargspec

2013-04-03 Thread Mark Lawrence
Mark Lawrence added the comment: Would someone please review the patch file as it's out of my league. -- nosy: +BreamoreBoy ___ Python tracker ___

[issue12327] in HTTPConnection the are len(body) and TypeError catch exception to detect if body is file like object, this hack do work with StringIO object

2013-04-03 Thread Mark Lawrence
Mark Lawrence added the comment: @harobed if you still have a problem please provide more data as requested in msg138692. -- nosy: +BreamoreBoy ___ Python tracker ___ __

[issue14143] test_ntpath failure on Windows

2013-04-03 Thread R. David Murray
R. David Murray added the comment: Possibly. However, it's an intermittent buildbot failure, so it is a bit difficult to know if it fixed or not. We really need a way to track intermittent failures so we can figure out when they have gone away :) -- nosy: +r.david.murray ___

[issue1634774] locale 1251 does not convert to upper case properly

2013-04-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: With Python3 .upper() is locale-independent for unicode and bytes strings. For serious work with non-ascii text Python3 is strongly recommended anyway, so I suggest to close this issue. -- resolution: -> wont fix status: open -> pending

[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2013-04-03 Thread Phil Connell
Changes by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2013-04-03 Thread Martin Morrison
Changes by Martin Morrison : -- nosy: +isoschiz ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue17615] String comparison performance regression

2013-04-03 Thread Georg Brandl
Georg Brandl added the comment: Reopening for consideration of using wmemcmp(). -- nosy: +georg.brandl status: closed -> open ___ Python tracker ___ _

[issue16895] Batch file to mimic 'make' on Windows

2013-04-03 Thread Zachary Ware
Zachary Ware added the comment: I was rather off about kill_python, wasn't I? Anyway, I've finally gotten another version put together that I'd like to get comments on. Major differences between this patch and the previous one, in no particular order: - Add a 'configure.bat' script to increa

[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2013-04-03 Thread Mark Lawrence
Mark Lawrence added the comment: Can someone please review the latest patch and commit if appropriate. -- nosy: +BreamoreBoy ___ Python tracker ___ __

[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2013-04-03 Thread Phil Connell
Phil Connell added the comment: The problem appears to be more general. zipimport fails for deeper hierarchies, even with directory entries. With the supplied patch (zipimport-issue14905-2.patch) I see the following: $ unzip -l foo.zip Archive: foo.zip Length DateTimeName -

[issue15940] Time module: effect of locale

2013-04-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset ee5add45bf9d by Terry Jan Reedy in branch '3.3': Issue #15940: Specify effect of locale on time functions. http://hg.python.org/cpython/rev/ee5add45bf9d New changeset 5ffb808683e1 by Terry Jan Reedy in branch '2.7': Issue #15940: Specify effect of l

[issue17484] add tests for getpass

2013-04-03 Thread Thomas Fenzl
Thomas Fenzl added the comment: I signed the contributor agreement during pycon, with the pdf sent to me on March 19th, 15:25 PDT -- ___ Python tracker ___ _

[issue5609] Create Unit Tests for nturl2path module

2013-04-03 Thread Thomas Fenzl
Thomas Fenzl added the comment: The authoritative implementation of this functionality would be Microsoft's PathCreateFromUrl (http://msdn.microsoft.com/en-us/library/windows/desktop/bb773581%28v=vs.85%29.aspx) and UrlCreateFromPath (http://msdn.microsoft.com/en-us/library/windows/desktop/bb7

[issue15940] Time module: effect of locale

2013-04-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3daa20ce817e by Terry Jan Reedy in branch '3.3': Issue #15940: NEWS entry http://hg.python.org/cpython/rev/3daa20ce817e New changeset be9273375b61 by Terry Jan Reedy in branch '2.7': Issue #15940: NEWS entry http://hg.python.org/cpython/rev/be927337

[issue15940] Time module: effect of locale

2013-04-03 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker ___ ___

[issue17626] set's __isub__ doesn't support non-sets.

2013-04-03 Thread Roy Wellington
New submission from Roy Wellington: The following: s = set(range(10)) s -= (1, 2, 3) raises a TypeError. Yet the following, which is more verbose and equivalent, succeeds: s.difference_update((1, 2, 3)) Under the hood, __isub__ calls difference_update to do its work. Unfortunately, __isub_

[issue17626] set's __isub__ doesn't support non-sets.

2013-04-03 Thread Georg Brandl
Georg Brandl added the comment: Assigning to Raymond for confirmation, but IIRC this is by design. -- assignee: -> rhettinger nosy: +georg.brandl, rhettinger status: open -> pending ___ Python tracker

[issue17627] Datetime and time doesn't update timezone in a running Win app

2013-04-03 Thread CM
New submission from CM: On Windows (tested on XP), the datetime module (and, as reported online in [1], time module) apparently gets the timezone only when a Python instance first starts, but then never updates the timezone during the life of that Python instance. So, if the user changes the

[issue17615] String comparison performance regression

2013-04-03 Thread STINNER Victor
STINNER Victor added the comment: "wmemcmp is widely available but is based on wchar_t so is for different widths on Windows and Unix. On Windows it would handle the 2:2 case." I don't know if wmemcmp() can be used if wchar_t type is signed. Is there an OS with signed wchar_t? If yes, we need

[issue5609] Create Unit Tests for nturl2path module

2013-04-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the patch and test coverage. LGTM. I shall verify further and commit it. -- assignee: -> orsenthil nosy: +orsenthil ___ Python tracker

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2013-04-03 Thread Mark Shannon
Mark Shannon added the comment: Stefan, I tried running your pi_bench (increasing the numer of iterations by x10 to reduce jitter). The run to run variation exceed the difference between the two versions. Here are the fastest of 7 runs on my machine. i3-2370M CPU @ 2.40GHz × 4. linux 64bit. W

[issue16061] performance regression in string replace for 3.3

2013-04-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: My experiments last September, before this was filed, showed that str.find (index) had most of the relative slowdown of str.replace. I assumed at that time that .replace used .find or .index to find substrings to replace, so that the fix for .replace would in

[issue17483] Can not tell urlopen not to check the hostname for https connections.

2013-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: IMO, there's not much point backporting such a simple cleanup, so I'm simply closing the issue. -- stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue17483] Can not tell urlopen not to check the hostname for https connections.

2013-04-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: I shall do it. Just for keeping it clean and it may help when future patches can be merged across branches cleanly. There is no loss IMO. -- ___ Python tracker __

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2013-04-03 Thread Mark Shannon
Mark Shannon added the comment: Antoine, Two bytecode examples. For the following function: >>> def f(x): ... try: ... return x ... except: ... pass Without the patch: 2 0 SETUP_EXCEPT 8 (to 11) 3 3 LOAD_FAST0 (x)

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2013-04-03 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2013-04-03 Thread Stefan Krah
Stefan Krah added the comment: I'm surprised, too, but after a couple of retries the results stay the same. On an i7 there's also a difference, but not quite as large. I'm using b16527f84774.diff, which applies cleanly apart from importlib.h (which I just regenerated). With an increased loop cou

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2013-04-03 Thread Stefan Krah
Stefan Krah added the comment: BTW, there's no general slowdown on the Core2 Duo: In the patched version, the telco benchmark is consistently 4% faster. -- ___ Python tracker ___

[issue17470] random.choice should accept a set as input

2013-04-03 Thread Mark Dickinson
Mark Dickinson added the comment: See also issue #7522 (with an identical title!) for previous discussion. -- nosy: +mark.dickinson ___ Python tracker ___ ___

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2013-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > BTW, there's no general slowdown on the Core2 Duo: In the patched version, > the telco benchmark is consistently 4% faster. It's customary for even innocent changes in ceval to produce small changes in some benchmarks. It's only really important to consider th

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2013-04-03 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue17263] crash when tp_dealloc allows other threads

2013-04-03 Thread Chris Kaynor
Changes by Chris Kaynor : -- nosy: +DragonFireCK ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue17094] sys._current_frames() reports too many/wrong stack frames

2013-04-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> patch review versions: -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2013-04-03 Thread Stefan Krah
Stefan Krah added the comment: Antoine Pitrou wrote: > It's customary for even innocent changes in ceval to produce small > changes in some benchmarks. It's only really important to consider the > global average. Yes, the float benchmark appears to be particularly sensitive. In the 3.3.0 releas

[issue17628] str==str: compare the first and last character before calling memcmp()

2013-04-03 Thread STINNER Victor
New submission from STINNER Victor: In Python 3.4, str==str is implemented by calling memcmp(). unicode_eq() function, used by dict and set types, checks the first byte before calling memcmp(). bytes==bytes uses the same check. Py_UNICODE_MATCH macro checks the first *and* last character befor

[issue17628] str==str: compare the first and last character before calling memcmp()

2013-04-03 Thread STINNER Victor
STINNER Victor added the comment: According to my benchmark, performances are almost the same with the patch. The major difference is on comparing two strings longer than 10 characters, of the same length, with a common prefix but a different suffix. See attached benchmark for the result. ---

[issue17568] re: Infinite loop with repeated empty alternative

2013-04-03 Thread Ezio Melotti
Ezio Melotti added the comment: I can reproduce on 3.2.3, but otherwise this work fine in the upcoming 3.2.4 and on 3.3+. -- resolution: -> out of date stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue17627] Datetime and time doesn't update timezone in a running Win app

2013-04-03 Thread Brian Curtin
Changes by Brian Curtin : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue17627] Datetime and time doesn't update timezone in a running Win app

2013-04-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am not sure this is a bug, as I don't think it reasonable to expect every time function call to re-initialize the timezone setting. I think you should change this to a request to see if time.tzset can now be made to work on Windows and not unix-only (as docu

[issue17615] String comparison performance regression

2013-04-03 Thread Neil Hodgson
Neil Hodgson added the comment: For 32-bits whether wchar_t is signed shouldn't matter as Unicode is only 21-bits so no character will be seen as negative. On Windows, wchar_t is unsigned. C11 has char16_t and char32_t which are both unsigned but it doesn't include comparison functions.

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2013-04-03 Thread Trent Nelson
Changes by Trent Nelson : -- nosy: +trent ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue17627] Datetime and time doesn't update timezone in a running Win app

2013-04-03 Thread R. David Murray
R. David Murray added the comment: On linux, if you call time.ctime() before and after changing the system /etc/localtime file, the time will be updated without restarting Python. The same applies to datetime.now(). -- nosy: +r.david.murray stage: needs patch ->

[issue17554] Compact output for regrtest

2013-04-03 Thread Ezio Melotti
Ezio Melotti added the comment: Attached patch shows the "Fetching ..." only in verbose mode. -- Added file: http://bugs.python.org/file29670/issue17554-urlfetch.diff ___ Python tracker ___

[issue17629] Expose string width to Python

2013-04-03 Thread Chris Angelico
New submission from Chris Angelico: As of PEP 393, a string's width is recorded in its header - effectively, a marker that says whether the highest codepoint in the string is >0x, >0xFF, or <=0xFF. This is, on some occasions, useful to know; for instance, when testing string performance, i

[issue17629] Expose string width to Python

2013-04-03 Thread Chris Angelico
Chris Angelico added the comment: And of course, I make a copy/paste error in a trivial piece of example code. def str_width(s): width=1 for ch in map(ord,s): if ch > 0x: return 4 if ch > 0xFF: width=2 return width -- ___ Python tra

[issue17628] str==str: compare the first and last character before calling memcmp()

2013-04-03 Thread STINNER Victor
STINNER Victor added the comment: Attach the benchmark script. -- Added file: http://bugs.python.org/file29671/bench_unicode_eq.py ___ Python tracker ___

[issue17629] Expose string width to Python

2013-04-03 Thread Ezio Melotti
Ezio Melotti added the comment: Not sure this is a good idea. The fact that CPython knows the width is an implementation detail. The method you suggested might not be too fast but it works, so we would be adding a new function/method just to optimize a fairly uncommon operation that depends

[issue17630] Create a pure Python zipfile importer

2013-04-03 Thread Brett Cannon
New submission from Brett Cannon: I'm going to write an importer using zipfile and importlib in pure Python. I'm doing this so that (a) there is an importer that relies on zipfile and thus what features it adds over time, (b) to have good example code to point people to when they need to imple

[issue17630] Create a pure Python zipfile importer

2013-04-03 Thread Brett Cannon
Brett Cannon added the comment: I should mention I have an old implementation at https://code.google.com/p/importers/. -- ___ Python tracker ___

[issue17629] Expose string width to Python

2013-04-03 Thread STINNER Victor
STINNER Victor added the comment: "This is, on some occasions, useful to know; for instance, when testing string performance, it's handy to be able to very quickly throw something down that, without scanning the contents of all the strings used, can identify the width spread." When you test s

[issue17628] str==str: compare the first and last character before calling memcmp()

2013-04-03 Thread STINNER Victor
STINNER Victor added the comment: benchmark2: Results on a slower computer. Comparing equal strings is much faster with the patch. Example: equal, 'A', 100 | 945 us (*) | 1.25 ms (+32%) I don't understand why the patch makes the comparaison much slower, since most time is suppos

[issue16321] Move eq.h out of stringlib

2013-04-03 Thread STINNER Victor
STINNER Victor added the comment: Issue #17628 proposes a patch which reuses unicode_eq() in PyUnicode_RichCompare. -- ___ Python tracker ___ ___

[issue17630] Create a pure Python zipfile importer

2013-04-03 Thread Phil Connell
Changes by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17629] Expose string width to Python

2013-04-03 Thread Chris Angelico
Chris Angelico added the comment: CPython also knows the length of a string, which means that len(s) is a fast operation. I wouldn't expect anyone to rewrite len() as: def get_string_length(s): length=0 for ch in s: length+=1 return length even though that works. No, we have a built-

[issue17630] Create a pure Python zipfile importer

2013-04-03 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17629] Expose string width to Python

2013-04-03 Thread Ezio Melotti
Ezio Melotti added the comment: max(map(ord, s)) or your str_width(s) are not much more complicated than s.width(), just slower, so it's just a problem of performance. len() is a much more common operation so it makes sense to have a fast built-in function. -- ___

[issue17615] String comparison performance regression

2013-04-03 Thread Neil Hodgson
Neil Hodgson added the comment: For 32-bit Windows, the code generated for unicode_compare is quite slow. There are either 1 or 2 kind checks in each call to PyUnicode_READ and 2 calls to PyUnicode_READ inside the loop. A compiler may decide to move the kind checks out of the loop and spec

[issue1222585] C++ compilation support for distutils

2013-04-03 Thread Danek Duvall
Changes by Danek Duvall : -- nosy: +dhduvall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue17631] inspect getsource does not display full text of lambda

2013-04-03 Thread Alexey Spiridonov
New submission from Alexey Spiridonov: This happens because the block search algorithm seems not to be handling lambda arguments correctly. $ cat x.py import inspect def a(y): print inspect.getsource(y) print inspect.getsourcelines(y) a( lambda x: x * 3 ) $ p

[issue17572] strptime exception context

2013-04-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3203e083aa7b by Ezio Melotti in branch '3.3': #17572: Avoid chained exceptions while passing bad directives to time.strptime(). Initial patch by Claudiu Popa. http://hg.python.org/cpython/rev/3203e083aa7b New changeset d408c9bd4bf7 by Ezio Melotti

[issue17572] strptime exception context

2013-04-03 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report and the patch! -- assignee: -> ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker _

[issue15331] Codecs docs should explain that the bytes-bytes shorthand aliases are missing

2013-04-03 Thread Ezio Melotti
Ezio Melotti added the comment: Should they just be removed from the table then? -- versions: +Python 3.4 -Python 3.2 ___ Python tracker ___ _

  1   2   >