[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Ditching the statistics only sped up regex_compile by 2%. Does explicit compiling even go through the cache? Regardless, the issue here is with performance of cache hits, not cache misses. By construction, you cache something which is costly to compute, so the

[issue16218] Python launcher does not support non ascii characters

2012-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Serhiy, your original example from msg173373 still fails on > FreeBSD: Thank you for a report. I have not any ideas what happened (note that error on encoding, not decoding). Can you please show me the results of sys.getdefaultencoding(), sys.getfilesystemen

[issue16353] add function to os module for getting path to default shell

2012-11-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Is it the "system default shell" or the user's default shell that we want here? That is, shouldn't we look up `pwd.getpwuid(os.getuid()).pw_shell` ? (but only when os.getuid() == os.geteuid()?) -- nosy: +gregory.p.smith, neologix, pitrou __

[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-02 Thread Brett Cannon
Brett Cannon added the comment: re.compile() calls _compile() which has the lru_cache decorator so it will trigger it. But you make a good point, Antoine, that it's the hit overhead here that we care about as long as misses don't get worse as the calculation of is to be cached should overwhelm

[issue16218] Python launcher does not support non ascii characters

2012-11-02 Thread Stefan Krah
Stefan Krah added the comment: This is it: >>> >>> sys.getdefaultencoding() 'utf-8' >>> sys.getfilesystemencoding() 'ascii' >>> locale.getpreferredencoding(True) 'US-ASCII' >>> locale.getpreferredencoding(False) 'US-ASCII' >>> $ locale LANG= LC_CTYPE="C" LC_COLLATE="C" LC_TIME="C" LC_NUMERIC=

[issue16353] add function to os module for getting path to default shell

2012-11-02 Thread Chris Jerdonek
Chris Jerdonek added the comment: The system default shell is what I had in mind when filing this issue (i.e. what Popen() uses by default or, in the case of Android, what Popen() should use). -- ___ Python tracker

[issue16218] Python launcher does not support non ascii characters

2012-11-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: Perhaps we have to skip tests if filesystem encoding doesn't support wide characters. Not sure about the way: should we skip if sys.getfilesystemencoding() is not utf8 or better to try encode path and skip if it fails? I think the later is better. --

[issue16353] add function to os module for getting path to default shell

2012-11-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The system default shell is what I had in mind when filing this issue > (i.e. what Popen() uses by default or, in the case of Android, what > Popen() should use). Well, the question then becomes whether Popen() shouldn't use the user's default shell instead? :

[issue1207589] IDLE: Right Click Context Menu

2012-11-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: On pydev, I explained why I think the bug-enhancement policy does not necessarily apply to IDLE, starting the the fact that IDLE was treated as exceptional and not considered bound to normal policy when it was considered for deletion and ending with the fact t

[issue16353] add function to os module for getting path to default shell

2012-11-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: I guess to return sh if supported, cmd.exe for Windows. The reason is: other shells can have different calling agreements (I mean rules to process command line). subprocess intended to use by library writers, so we need solid well known basis. There are anothe

[issue16218] Python launcher does not support non ascii characters

2012-11-02 Thread Stefan Krah
Stefan Krah added the comment: On FreeBSD both Serhiy's original test case as well as the unit test work if the locale is ISO8859-15: >>> sys.getdefaultencoding() 'utf-8' >>> sys.getfilesystemencoding() 'iso8859-15' >>> locale.getpreferredencoding(True) 'ISO8859-15' >>> locale.getpreferredencodi

[issue16353] add function to os module for getting path to default shell

2012-11-02 Thread Tim Golden
Tim Golden added the comment: On 02/11/2012 21:00, Andrew Svetlov wrote: > I guess to return sh if supported, cmd.exe for Windows. FWIW the canonical approach on Windows is to return whatever %COMSPEC% points to. -- nosy: +tim.golden ___ Python trac

[issue16335] Integer overflow in unicode-escape decoder

2012-11-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: I don't know what to make of this, but... Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)] on win32 Win7 pro, 24 gb mem >>> x=(b'\\N{WHITE SMILING FACE' + b'x' * 2**32 + b'}') >>> len(x) 4294967318 >>> y=x.decode('unicode-es

[issue16353] add function to os module for getting path to default shell

2012-11-02 Thread Chris Jerdonek
Chris Jerdonek added the comment: > Well, the question then becomes whether Popen() shouldn't use the user's > default shell instead? :) That's a good question, too. :) I was thinking just in terms of supporting the status quo. Maybe two functions would be useful? (as suggested also by Andre

[issue16218] Python launcher does not support non ascii characters

2012-11-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: Looking on the last message from Stefan I think we have to check cmdpath to be encoded via sys.getfilesystemencoding() first and skip test if fails. -- ___ Python tracker

[issue16353] add function to os module for getting path to default shell

2012-11-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: > That is, shouldn't we look up `pwd.getpwuid(os.getuid()).pw_shell` ? > (but only when os.getuid() == os.geteuid()?) No, you can't use the users shell from the pwd module. That can be any crazy program. Not a functional /bin/sh for use in making commands wh

[issue16353] add function to os module for getting path to default shell

2012-11-02 Thread R. David Murray
R. David Murray added the comment: The "system default shell" (which should always be a /bin/sh workalike, I think) should always be the default. Any other shell should be something that has to be specified explicitly. At least, that's the way most posix programs work, I think. As Chris sai

[issue16349] Document whether it's safe to use bytes for struct format string

2012-11-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: For 3.3, I verified that adding b prefix to first three doc examples gives same output as without, but also discovered that example outputs are wrong, at least on windows, because of byte ordering issues. >>> pack('hhl', 1, 2, 3) b'\x01\x00\x02\x00\x03\x00\x00

[issue16335] Integer overflow in unicode-escape decoder

2012-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Wow! Do we need a test for this case? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue16353] add function to os module for getting path to default shell

2012-11-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: BTW, according to PEP 11 (http://www.python.org/dev/peps/pep-0011/) Python 3.4 will remove code for "Windows systems where COMSPEC points to command.com". There are only winner: cmd.exe as well known shell good as default, command.com is gone. cmd.exe can be

[issue16218] Python launcher does not support non ascii characters

2012-11-02 Thread Stefan Krah
Stefan Krah added the comment: That sounds good for Unix. For Windows I'm getting a more informative error message than from the buildbot output if I run the test via an ssh client: == FA

[issue16218] Python launcher does not support non ascii characters

2012-11-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: I will fix it tomorrow at Kiev Python sprint. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue16354] Remember python version choice on docs.python.org

2012-11-02 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue16354] Remember python version choice on docs.python.org

2012-11-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: It may be possible, but will not happen. A modern browser should displays your personal history options as you type. If I type 'docs' in Firefox, it gives me choices for the rest of the url, though there are a lot of obsolete entries to delete. Typing and sele

[issue16218] Python launcher does not support non ascii characters

2012-11-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > For Windows I'm getting a more informative error message than from the > buildbot output if I run the test via an ssh client: Try with my last patch (pythonrun_filename_decoding_test.patch). It fixes also fail on Linux with 8-bit locale. $ LC_ALL=en_US.ISO-

[issue16384] import.c doesn't handle EOFError from PyMarshal_Read*

2012-11-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: The import machinery was changed in 3.3.0. I suggest checking if it gives you *exactly* the same behavior. -- nosy: +terry.reedy ___ Python tracker ___

[issue1207589] IDLE: Right Click Context Menu

2012-11-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: I guess the schema: keep the current state a while. Please test context menu for all configurations you have. If you will have any problem — commits will be reverted. If anybody will report about backward incompatibility problems — I'll revert changes. Modifyi

[issue16385] evaluating literal dict with repeated keys gives no warnings/errors

2012-11-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: (Benjamin, did you mean 'silently accepting duplicates'?) Without more use cases and support (from discussion on python-ideas), I think this should be rejected. Being able to re-write keys is fundamental to Python dicts and why they can be used for Python's mu

[issue16391] terminator argument for logging.FileHandlers

2012-11-02 Thread Nikolay Bryskin
New submission from Nikolay Bryskin: "terminator" argument has appeared in logging.StreamHandler since 3.2, but it also may be useful for FileHandler classes. -- components: Library (Lib) messages: 174594 nosy: nikicat priority: normal severity: normal status: open title: terminator arg

[issue16218] Python launcher does not support non ascii characters

2012-11-02 Thread Stefan Krah
Stefan Krah added the comment: Serhiy Storchaka wrote: > Try with my last patch (pythonrun_filename_decoding_test.patch). It > fixes also fail on Linux with 8-bit locale. Unfortunately your last patch does not work on Windows. -- I'm too lazy to step through the domain specific language of test

[issue16385] evaluating literal dict with repeated keys gives no warnings/errors

2012-11-02 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13238] Add shell command helpers to subprocess module

2012-11-02 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue8604] Adding an atomic FS write API

2012-11-02 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue7317] Display full tracebacks when an error occurs asynchronously

2012-11-02 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue1207589] IDLE: Right Click Context Menu

2012-11-02 Thread Ned Deily
Ned Deily added the comment: "Leaving that aside, the right-click context menu is not mentioned in the brief Library manual chapter on IDLE." FTR, as I pointed out on python-dev, this is no longer true. The IDLE section of the Standard Library documentation, as well as the IDLE help file, wer

[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-02 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue16335] Integer overflow in unicode-escape decoder

2012-11-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: >>> x=(b'\\N{WHITE SMILING FACE' + b'x' * 2**16 + b'}') >>> y=x.decode('unicode-escape') Traceback (most recent call last): File "", line 1, in y=x.decode('unicode-escape') UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 0-65557:

[issue16390] re compilation slow in Python 3.3 due to functools.lru_cache overhead

2012-11-02 Thread Nick Coghlan
Changes by Nick Coghlan : -- superseder: -> re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench ___ Python tracker ___ __

[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-02 Thread Nick Coghlan
Nick Coghlan added the comment: Did you try moving the existing single-argument fast path to before the main if statement in _make_key? That is: if not kwds and len(args) == 1: key = args[0] key_type = type(key) if key_type in fasttypes: if typed:

[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-02 Thread Ezio Melotti
Ezio Melotti added the comment: > re.compile() calls _compile() which has the lru_cache decorator so it > will trigger it. What's the point of using the lru_cache for compiled regexes? Unless I'm missing something, re.compile() should just return the compiled regex without going though lru_cach

[issue16354] Remember python version choice on docs.python.org

2012-11-02 Thread Ezio Melotti
Ezio Melotti added the comment: Maybe the OP wanted to get redirected when he reaches a doc page through e.g. Google or a direct link, rather than a bookmark/history/manually-entered URL. I usually get to the docs via Google, and either pick whatever version comes up, or edit the URL manually

[issue1207589] IDLE: Right Click Context Menu

2012-11-02 Thread Roger Serwy
Roger Serwy added the comment: On IDLE Extensions: The public ecosystem of IDLE extensions is small, and even smaller are those that modify rmenu_specs. Changing it is trivial. However, existing users of the Squeezer extension under 2.7 will experience bugs, like triggering issue13582 on Windo

<    1   2