[issue16202] sys.path[0] security issues

2012-10-13 Thread Nick Coghlan
Nick Coghlan added the comment: Also, what's up with that weird fallback code in distutils? When is tempfile.mkdtemp ever missing? -- ___ Python tracker ___

[issue16216] Arithmetic operations with NULL

2012-10-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The Standard is not guarantee that result of converting null pointer to integer is zero or even it is a even number. I remember the ancient C implementation, where it was not so (but Python is not supports these platform). Of course, such a method of obtaini

[issue16201] socket.gethostbyname incorrectly parses ip

2012-10-13 Thread Michele Orrù
Michele Orrù added the comment: > >> Buggy due to the use of scanf at Modueles/socketmodule.c:868 > > I don't think so. The following test fails because sscanf() returns 5 > instead of 4: You are right, sorry for didn't notice. > If you consider that '192.168.1.1 ' is an invalid name, you sho

[issue16201] socket.gethostbyname incorrectly parses ip

2012-10-13 Thread Michele Orrù
Michele Orrù added the comment: Reviewed with Ezio. -- Added file: http://bugs.python.org/file27550/issue16201.2.patch ___ Python tracker ___

[issue15936] Add link from os.urandom to random.SystemRandom

2012-10-13 Thread Mike Hoy
Changes by Mike Hoy : -- nosy: +mikehoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue16202] sys.path[0] security issues

2012-10-13 Thread Volker Braun
Volker Braun added the comment: > When is tempfile.mkdtemp ever missing It was added in Python 2.3, in the dark ages before that there was only tempfile.mktemp. Though I guess we can remove the fallback now... -- ___ Python tracker

[issue16206] dict() docs should display multiple signatures

2012-10-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset ed6da2a8361c by Chris Jerdonek in branch '3.2': Issue #16206: Improve the documentation of the dict constructor. http://hg.python.org/cpython/rev/ed6da2a8361c New changeset 02de13d69149 by Chris Jerdonek in branch '3.3': Issue #16206: Merge dict doc

[issue16206] dict() docs should display multiple signatures

2012-10-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5fc6f47974db by Chris Jerdonek in branch '2.7': Issue #16206: Backport dict documentation improvements from 3.2. http://hg.python.org/cpython/rev/5fc6f47974db -- ___ Python tracker

[issue16206] dict() docs should display multiple signatures

2012-10-13 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ P

[issue16215] Possible double memory free in str.replace

2012-10-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue16217] Tracebacks are unnecessarily verbose when using 'python -m'

2012-10-13 Thread Matthew Woodcraft
New submission from Matthew Woodcraft: If I run my code using 'python -m' and there is an unhandled exception, the tracebacks include lines from runpy.py (and now sometimes from importlib._bootstrap) which don't provide useful information, and tend to overwhelm the valuable part of the traceba

[issue16217] Tracebacks are unnecessarily verbose when using 'python -m'

2012-10-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16061] performance regression in string replace for 3.3

2012-10-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue16218] Python launcher does not support non ascii characters

2012-10-13 Thread Turn
New submission from Turn: If there are non ASCII character in the py.exe arguments, the execution will fail. The script file name or path may contain non ASCII characters. -- components: Windows messages: 172807 nosy: turncc priority: normal severity: normal status: open title: Python l

[issue16218] Python launcher does not support non ascii characters

2012-10-13 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue16217] Tracebacks are unnecessarily verbose when using 'python -m'

2012-10-13 Thread Nick Coghlan
Nick Coghlan added the comment: Agreed. We do have a mechanism in place to deal with this specifically for importlib in 3.3 (which is why the first traceback is cleaner, although it's not triggering in the SyntaxError case for some reason), but it makes sense to hide the noise from runpy as we

[issue16106] antigravity tests

2012-10-13 Thread Ramchandra Apte
Ramchandra Apte added the comment: @Antoine Aw.. no funny bone in you.. -- nosy: +ramchandra.apte ___ Python tracker ___ ___ Python-bu

[issue8402] glob returns empty list with "[" character in the folder name

2012-10-13 Thread Michele Orrù
Michele Orrù added the comment: The attached patch adds support for '\\' escaping to fnmatch, and consequently to glob. -- keywords: +patch nosy: +maker versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file27551/issue8402.patch __

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-10-13 Thread Trent Nelson
Changes by Trent Nelson : -- nosy: +trent ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue16145] Abort in _csv module

2012-10-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: LGTM -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue16202] sys.path[0] security issues

2012-10-13 Thread Eric Snow
Eric Snow added the comment: > For 3.4, I plan to have a look at the organically-grown-over-time mess > that is CPython's current interpreter initialisation system and see if I > can figure out something a bit more sane and easier to configure/control > (especially when embedding Python in a larg

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-10-13 Thread Trent Nelson
Trent Nelson added the comment: The previous 'alt_sysconfigdata.patch' didn't apply cleanly to 3.3/3.x. I've attached an updated patch that does. Any objections to applying this to 3.3 -> 3.x now that the freeze is over? -- versions: +Python 3.4 Added file: http://bugs.python.org/file

[issue14774] _sysconfigdata.py doesn't support multiple build configurations

2012-10-13 Thread Trent Nelson
Trent Nelson added the comment: I'm pretty sure this is a duplicate of http://bugs.python.org/issue15298 (which should be fixed shortly). Feel free to re-open if I'm wrong. -- nosy: +trent resolution: -> duplicate status: open -> closed ___ Python

[issue16219] segfault when using xml.etree.ElementTree.XMLTreeBuilder

2012-10-13 Thread Scott Maxwell
New submission from Scott Maxwell: I upgraded the meld3 module (used by Supervisord) to work on Py3K and discovered this segfault. It happens every time. I have seen this on the pre-built Mac 3.3.0 and a source-built 3.3.0 on Linux. It does not occur in 3.2.2. It appears to happen in native co

[issue16203] Proposal: add re.fullmatch() method

2012-10-13 Thread Matthew Barnett
Matthew Barnett added the comment: Tim, my point is that if the MULTILINE flag happens to be turned on, '$' won't just match at the end of the string (or slice), it'll also match at a newline, so wrapping the pattern in (?:...)$ in that case could give the wrong answer, but wrapping it in (?:.

[issue15833] most failures to write byte-compiled file no longer suppressed

2012-10-13 Thread Trent Nelson
Trent Nelson added the comment: FWIW, I just ran into the following on Solaris 10: % dbx python For information about new features see `help changes' To remove this message, put `dbxenv suppress_startup_message 7.9' in your .dbxrc Reading python Reading ld.so.1 Reading libsocket.so.1 Reading lib

[issue16219] segfault when using xml.etree.ElementTree.XMLTreeBuilder

2012-10-13 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your report.It's a know issue and has already been fixed in HG. #16089 contains a patch if you like to give it a shot. -- nosy: +christian.heimes resolution: -> duplicate stage: -> committed/rejected status: open -> pending _

[issue16203] Proposal: add re.fullmatch() method

2012-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Tim, my point is that if the MULTILINE flag happens to be turned on, > '$' won't just match at the end of the string (or slice), it'll also > match at a newline, so wrapping the pattern in (?:...)$ in that case > could give the wrong answer, but wrapping it in

[issue15833] most failures to write byte-compiled file no longer suppressed

2012-10-13 Thread Trent Nelson
Trent Nelson added the comment: That... didn't work. Also applied rpetrov's patch and that made no difference: % ./python Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: Py_Initialize: Unable to get the locale encoding Traceback (most recent

[issue16061] performance regression in string replace for 3.3

2012-10-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: After much experimentation, I suggest the new patch. Benchmark results (time of replacing 1 of n character (ch1 to ch2) in 10- char string). Py3.2Py3.3patch n ch1 ch2 fill 231 (-13%) 3025 (-93%) 2001 'a' 'b' 'c' 626 (-18%) 2035

[issue16203] Proposal: add re.fullmatch() method

2012-10-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Definitely this is not easy issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue15833] most failures to write byte-compiled file no longer suppressed

2012-10-13 Thread Trent Nelson
Trent Nelson added the comment: Charles: your patch is fine. +1. My Solaris failures can be traced back to http://bugs.python.org/issue15819. Sorry for the noise. -- ___ Python tracker _

[issue15958] bytes.join() should allow arbitrary buffer objects

2012-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch with tests. -- Added file: http://bugs.python.org/file27554/bytes_join_buffers.patch ___ Python tracker ___

[issue16201] socket.gethostbyname incorrectly parses ip

2012-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think uint32_t exists everywhere, you should use "unsigned int" instead. -- nosy: +pitrou ___ Python tracker ___ ___

[issue16212] mmap() dumps core upon resizing the underlying file

2012-10-13 Thread Vladimir Ushakov
Vladimir Ushakov added the comment: I know how to avoid the problem in my case, the bug does not really affect me. I posted it because I thought that the possibility to crash the interpreter is something to be avoided at all costs. I've found a few examples of handling non-restartable signals

[issue16160] subclassing types.SimpleNamespace does not work

2012-10-13 Thread Eric Snow
Eric Snow added the comment: Am I good to commit this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue15958] bytes.join() should allow arbitrary buffer objects

2012-10-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch LGTM, however... $ ./python -m timeit -s "a=[b'a']*10" "b','.join(a)" Vanilla: 3.69 msec per loop Patched: 11.6 msec per loop -- ___ Python tracker _

[issue15958] bytes.join() should allow arbitrary buffer objects

2012-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Patch LGTM, however... > > $ ./python -m timeit -s "a=[b'a']*10" "b','.join(a)" > > Vanilla: 3.69 msec per loop > Patched: 11.6 msec per loop True. It is a bit of a pathological case, though. -- ___ Python t

[issue16220] wsgiref does not call close() on iterable response when client

2012-10-13 Thread Brent Tubbs
New submission from Brent Tubbs: When a WSGI application returns an iterable that has a .close() method, the server is supposed to call that method once the request has finished. The wsgiref server does not do this when a client disconnects from a streaming response. The attached script allo

[issue16220] wsgiref does not call close() on iterable response

2012-10-13 Thread Brent Tubbs
Changes by Brent Tubbs : -- title: wsgiref does not call close() on iterable response when client -> wsgiref does not call close() on iterable response ___ Python tracker ___ __

[issue16220] wsgiref does not call close() on iterable response

2012-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: This sounds like a reasonable expectation. Do you want to provide a patch? -- nosy: +pitrou, pje stage: -> needs patch type: -> behavior versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python tracker

[issue13538] Improve doc for str(bytesobject)

2012-10-13 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching a proposed patch along the lines suggested by Éric. -- keywords: +patch versions: +Python 3.4 Added file: http://bugs.python.org/file27556/issue-13538-1-default.patch ___ Python tracker

[issue14214] test_concurrent_futures hangs

2012-10-13 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- resolution: -> works for me stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue14120] ARM Ubuntu 3.x buildbot failing test_dbm

2012-10-13 Thread Nadeem Vawda
Nadeem Vawda added the comment: No sign of these failures any more; looks like that fixed it. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue15958] bytes.join() should allow arbitrary buffer objects

2012-10-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch with restored performance. Is not it too complicated? -- Added file: http://bugs.python.org/file27557/bytes_join_buffers_2.patch ___ Python tracker __

[issue16212] mmap() dumps core upon resizing the underlying file

2012-10-13 Thread Charles-François Natali
Charles-François Natali added the comment: > I know how to avoid the problem in my case, the bug does not really affect > me. I posted it because I thought that the possibility to crash the > interpreter is something to be avoided at all costs. I fully agree with you. However, that's a problem

[issue15958] bytes.join() should allow arbitrary buffer objects

2012-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: The problem with your approach is that the sequence could be mutated while another thread is running (_getbuffer() may release the GIL). Then the pre-computed size gets wrong. -- ___ Python tracker

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-10-13 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- resolution: -> rejected stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue16212] mmap() dumps core upon resizing the underlying file

2012-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: A pity Posix isn't smart enough to refuse truncate()ing when there's a mmap open on the affected pages. Python 3's buffer API is superior in that respect :-) -- nosy: +pitrou ___ Python tracker

[issue15958] bytes.join() should allow arbitrary buffer objects

2012-10-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The problem with your approach is that the sequence could be mutated while > another thread is running (_getbuffer() may release the GIL). Then the > pre-computed size gets wrong. Well, then I withdraw my patch. But what if the sequence will be mutated and

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-10-13 Thread Trent Nelson
Changes by Trent Nelson : Removed file: http://bugs.python.org/file27552/issue15298-alt_sysconfigdata2.patch ___ Python tracker ___ ___ Pytho

[issue15958] bytes.join() should allow arbitrary buffer objects

2012-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > But what if the sequence will be mutated and PySequence_Size(seq) will become > less seqlen? Then using PySequence_Fast_GET_ITEM() will be incorrect. Perhaps we should detect that case and raise, then. -- ___ Pyth

[issue15936] Add link from os.urandom to random.SystemRandom

2012-10-13 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2012-10-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue16201] socket.gethostbyname incorrectly parses ip

2012-10-13 Thread Michele Orrù
Michele Orrù added the comment: Updated && tested on GNU/Linux (gcc). -- Added file: http://bugs.python.org/file27558/issue16201.3.patch ___ Python tracker ___ __

[issue15958] bytes.join() should allow arbitrary buffer objects

2012-10-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27557/bytes_join_buffers_2.patch ___ Python tracker ___ ___ Python-bugs

[issue16220] wsgiref does not call close() on iterable response

2012-10-13 Thread Phillip J. Eby
Phillip J. Eby added the comment: FYI, this looks like a bug in wsgiref.handlers.BaseHandler.finish_response(), which should probably be using a try/finally to ensure .close() gets called. (Which would catch a failed write() to the client.) I'm kind of amazed this has gone undetected this lon

[issue16212] mmap() dumps core upon resizing the underlying file

2012-10-13 Thread Vladimir Ushakov
Vladimir Ushakov added the comment: > You can't use longjmp from signal handlers. Well, you can, but 99% of the > code that does it is broken, because you can only call async-safe functions > from within a signal handler, and certainly can't run the intepreter. I don't see the reason to run th

[issue10050] urllib.request still has old 2.x urllib primitives

2012-10-13 Thread Nadeem Vawda
Nadeem Vawda added the comment: Are we still planning on removing URLopener and FancyURLopener in 3.4? The documentation for 3.3 does not list these classes as deprecated. -- ___ Python tracker ___

[issue16203] Proposal: add re.fullmatch() method

2012-10-13 Thread Tim Peters
Tim Peters added the comment: Serhiy, I expect this is easy to implement _inside_ the regexp engine. The complications come from trying to do it outside the engine. But even there, wrapping the original regexp in (?:)\Z is at worst very close. The only insecurity with that I've thought of

[issue16203] Proposal: add re.fullmatch() method

2012-10-13 Thread Matthew Barnett
Matthew Barnett added the comment: It certainly appears to ignore the whitespace, even if the "(?x)" is at the end of the pattern or in the middle of a group. Another point we need to consider is that the user might want to use a pre-compiled pattern. -- _

[issue10050] urllib.request still has old 2.x urllib primitives

2012-10-13 Thread Senthil Kumaran
Senthil Kumaran added the comment: Only the classes which are marked as deprecated are allowed removed in the next release. So the ones which we marked as deprecated in 3.3 can safely go in 3.4. URLopener and FancyURLopener AFAIR had some dependency/ usage, deprecating those may require some refa

[issue12486] tokenize module should have a unicode API

2012-10-13 Thread Eric Snow
Changes by Eric Snow : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bug

[issue15936] Add link from os.urandom to random.SystemRandom

2012-10-13 Thread Ramchandra Apte
Ramchandra Apte added the comment: It should also mention that os.urandom is a low-level interface. -- nosy: +ramchandra.apte ___ Python tracker ___ _

[issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator

2012-10-13 Thread Eric Snow
New submission from Eric Snow: While traversing the passed iterable, untokenize() will go to "compatibility mode" one it hits a 2-tuple instead of a 5-tuple (coming from the iterable). That token will not go through the normal steps that other tokens do. Most critically, if that token is the

[issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator

2012-10-13 Thread Eric Snow
Changes by Eric Snow : -- keywords: +patch stage: test needed -> patch review Added file: http://bugs.python.org/file27559/untokenize_compat.diff ___ Python tracker ___ _

[issue16222] "server-side clone" not found by devguide's search box

2012-10-13 Thread Chris Jerdonek
New submission from Chris Jerdonek: Neither searching for "server-side" nor "clone" in the devguide "Quick Search" box pulls up the mention of server-side clones: http://docs.python.org/devguide/committing.html#long-term-development-of-features -- components: Devguide messages: 172849

[issue16223] untokenize returns a string if no encoding token is recognized

2012-10-13 Thread Eric Snow
New submission from Eric Snow: If you pass an iterable of tokens and none of them are an ENCODING token, tokenize.untokenize() returns a string. This is contrary to what the docs say: It returns bytes, encoded using the ENCODING token, which is the first token sequence output by tokenize

[issue16224] tokenize.untokenize() misbehaves when moved to "compatiblity mode"

2012-10-13 Thread Eric Snow
New submission from Eric Snow: When tokenize.untokenize() encounters a 2-tuple, it moves to compatibility mode, where only the token type and string are used from that point forward. There are two closely related problems: * when the iterable is a sequence, the portion of the sequence prior t

[issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator

2012-10-13 Thread Eric Snow
Eric Snow added the comment: issue16224 _may_ supercede this ticket. -- components: +Library (Lib) ___ Python tracker ___ ___ Python-b

[issue16224] tokenize.untokenize() misbehaves when moved to "compatiblity mode"

2012-10-13 Thread Eric Snow
Eric Snow added the comment: Actually, here's a patch with the first option. It preserves iterators as iterators, rather than dumping them into a list. I've also rolled the tests from issue16221 into this patch. Consequently, if the patch is suitable, that issue can be closed. -- k

[issue16221] tokenize.untokenize() "compat" mode misses the encoding when using an iterator

2012-10-13 Thread Eric Snow
Eric Snow added the comment: The patch that I have in #16224 takes care of this issue. If that issue goes in another direction however... -- status: open -> pending superseder: -> tokenize.untokenize() misbehaves when moved to "compatiblity mode"