[issue1159051] Handle corrupted gzip files with unexpected EOF

2011-09-08 Thread Yoav Weiss
Yoav Weiss yee...@gmail.com added the comment: What is the reason that the currently submitted patch is not good enough and current stage is needs patch? The current patch seem to solve this issue, which is a very common one when dealing with gzip files coming from the Internet. In any case,

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-09-08 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: So to summarize a bit, there are different possible level of strictness: 1) all the possible encodable values, including the ones 10; 2) values in range 0..10; 3) values in range 0..10 except surrogates (aka scalar values);

[issue4431] Distutils MSVC doesn't create manifest file (with fix)

2011-09-08 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: I encountered the same problem while compiling the psutil package. I used Python 3.2.2 that I compiled myself using Visual Studio 2010 SP1 in Debug mode by following the PCBuild/readme.txt documentation. I could not compile psutil

[issue12935] Typo in findertools.py

2011-09-08 Thread Karsten Wolf
New submission from Karsten Wolf karste...@web.de: In the current Python-2.7.2.tar.bz2 archive ./Lib/plat-mac/findertools.py in function comment on line 131 the call to FSNewAliasMinimal is misstyped. current version: object_alias = object.FSNewAliasMonimal() corrected version

[issue12936] armv5tejl: random segfaults in getaddrinfo()

2011-09-08 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: I'm getting random segfaults in `make buildbottest` on qemu-debian-arm: Linux-2.6.26-2-versatile-armv5tejl-with-debian-5.0.8 little-endian The segfaults occurred in test_robotparser and test_nntplib and couldn't be reproduced when

[issue12928] exec not woking in unittest

2011-09-08 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This doesn't seem related to unittest: class MyTest: ... def test_a(self): ... b = 1 ... exec(compile(a = b + 1, '', 'single')) ... assert a == 2 ... t = MyTest() t.test_a() Traceback (most recent call last):

[issue5845] rlcompleter should be enabled automatically

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list

[issue12910] urrlib.quote quotes too many chars, e.g., '()'

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12910 ___ ___

[issue12913] Add a debugging howto

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12913 ___ ___

[issue12902] help(modules) executes module code

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12902 ___ ___

[issue12915] Add inspect.locate and inspect.resolve

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___ ___

[issue12890] cgitb displays p tags when executed in text mode

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12890 ___ ___

[issue12928] exec not woking in unittest

2011-09-08 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: You're invoking undefined behavior by modifying function locals in exec(). -- nosy: +benjamin.peterson resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-09-08 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: Added file: http://bugs.python.org/file23119/51cedae5acfc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-09-08 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Here's a completely restructured memoryview implementation that I believe is quite robust. Both memoryobject.c (the parts I worked on, which is 91%) and _testbuffer.c have 100% code coverage, including all error conditions [1].

[issue10227] Improve performance of MemoryView slicing

2011-09-08 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Kristján, could you check out the new implementation over at #10181? I have trouble reproducing a big speed difference between bytearray and memoryview (Linux, 64-bit). Here are the timings I get for the current and the new version:

[issue5231] Change format of a memoryview

2011-09-08 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: The cast method is completely implemented over at #10181. -- dependencies: +Problems with Py_buffer management in memoryobject.c (and elsewhere?) ___ Python tracker rep...@bugs.python.org

[issue10227] Improve performance of MemoryView slicing

2011-09-08 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- dependencies: +Problems with Py_buffer management in memoryobject.c (and elsewhere?) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10227

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-09-08 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: is over 1000x slower that the optimized versions of memoryview. Oh dear, scratch that. Lets make that 15x. ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181

[issue10227] Improve performance of MemoryView slicing

2011-09-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: I'm afraid I had put this matter _far_ out of my head :) Seeing the amount of discussion on that other defect (stuff I had already come across and scrathced my head over) I think there is a lot of catching up that I'd need to do

[issue10227] Improve performance of MemoryView slicing

2011-09-08 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I see. I thought this was mainly about memoryview performance, so I did not specifically look at bytearray. The poor performance seems to be Windows specific: C:\Users\stefan\hg\pep-3118\PCbuildamd64\python.exe -m timeit -n 1000 -s

[issue12915] Add inspect.locate and inspect.resolve

2011-09-08 Thread Andreas Stührk
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___ ___

[issue10227] Improve performance of MemoryView slicing

2011-09-08 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: With Stefan Behnel's slice-object-cache.patch, I get this (PEP-3118 branch): Linux: bytes: 0.097 usec bytearray: 0.127 usec memoryview: 0.12 usec Windows: bytes: 0.11 usec bytearray: 0,184 usec memoryview: 0.139 usec On

[issue12844] Support more than 255 arguments

2011-09-08 Thread Sebastian Ramacher
Changes by Sebastian Ramacher sebasti...@users.sourceforge.net: -- nosy: +sebastinas ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12844 ___ ___

[issue12937] Support install options as found in distutils

2011-09-08 Thread Brett Cannon
New submission from Brett Cannon br...@python.org: Distutils2/packaging does not support all the flags provided in distutils (e.g., --user, --prefix, etc.). It would be good to provide the same level of install control (or at least support the --user flag). -- assignee: tarek

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-09-08 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: On 9/8/2011 4:32 AM, Ezio Melotti wrote: So to summarize a bit, there are different possible level of strictness: 1) all the possible encodable values, including the ones10; 2) values in range 0..10; 3) values in range

[issue12938] html.escape does not mention single quotes (')

2011-09-08 Thread zvin
New submission from zvin svinartchouk.ale...@free.fr: The html.escape docstring says: Replace special characters , and to HTML-safe sequences. If the optional flag quote is true (the default), the quotation mark character () is also translated. But if you set the optional flag quote to

[issue12938] html.escape does not mention single quotes (')

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, sandro.tosi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12938 ___ ___

[issue12938] html.escape docstring does not mention single quotes (')

2011-09-08 Thread zvin
Changes by zvin svinartchouk.ale...@free.fr: -- title: html.escape does not mention single quotes (') - html.escape docstring does not mention single quotes (') ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12938

[issue12938] html.escape docstring does not mention single quotes (')

2011-09-08 Thread zvin
zvin svinartchouk.ale...@free.fr added the comment: Or maybe instead of updating the docstring, we should remove the single quote (') from _escape_map_full. cgi.escape did not escaped the single quotes (') and if you use it now, it says: PendingDeprecationWarning: cgi.escape is deprecated,

[issue12937] Support install options as found in distutils

2011-09-08 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12937 ___

[issue11457] Expose nanosecond precision from system calls

2011-09-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: timespec is just a structure of two integers, so we should expose it as a simple and efficient Python tuple: (int, int). We can simply expose this type in os.stat, or we can do better by providing an optional callback to convert

[issue11457] Expose nanosecond precision from system calls

2011-09-08 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: I suggest to have low-level, POSIX-compatible, (int, int)-based interface in os module and add high-level, decimal.Decimal-based interface in shutil module. -- ___ Python

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-09-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also issue #12760 (Add create mode to open). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105 ___

[issue12760] Add create mode to open()

2011-09-08 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12760 ___

[issue12939] Add new io.FileIO using the native Windows API

2011-09-08 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: On Windows, Python uses the POSIX API (file descriptors), instead of the native API (file handles). Some features cannot be used using the POSIX API, like setting security attributes. It would be nice to have a io.FileIO using

[issue12939] Add new io.FileIO using the native Windows API

2011-09-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also issue #1602: a prototype of a console object has been proposed to use the native Windows console API, instead of the POSIX API (read from fd 0, write to fd 1 or 2). The prototype is implemented in Python using ctypes.

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-09-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Why not to use CreateFile() on Windows platform? Good idea! Please open a separate issue for it. Done, issue #12939. -- ___ Python tracker rep...@bugs.python.org

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: It looks like Python cannot do much to workaround OpenBSD issues. IMO the best fix is just to skip these tests on OpenBSD, until OpenBSD handles correctly signals in programs linked to pthread. The same fix can be used for #12903.

[issue1172711] long long support for array module

2011-09-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: +if have_long_long: +class LongLongTest(SignedNumberTest): +... It is maybe better to use @unittest.skipIf(not have_long_long, 'need long long support'). Except of this nit, the patch looks correct. -- nosy:

[issue12940] Cmd example using turtle left vs. right doc-bug

2011-09-08 Thread Tim Chase
New submission from Tim Chase python.l...@tim.thechases.com: The Turtle example for the cmd module as documented at http://docs.python.org/py3k/library/cmd.html#cmd-example In the left() method, it calls turtle.right() instead of turtle.left(). Easy fix: /def left/+2s/left/right/ Likely

[issue12941] add random.pop()

2011-09-08 Thread John Feuerstein
New submission from John Feuerstein j...@feurix.com: This patch against current hg tip (72314:92842e347d98) adds random.pop(): pop(self, seq) method of Random instance Remove and return a random element from a non-empty sequence. Includes test case. -- components: Library

[issue12940] Cmd example using turtle left vs. right doc-bug

2011-09-08 Thread Tim Chase
Tim Chase python.l...@tim.thechases.com added the comment: (duh, sorry, that's the do_left method, not the left method) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12940 ___

[issue12940] Cmd example using turtle left vs. right doc-bug

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, sandro.tosi stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12940 ___

[issue12941] add random.pop()

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, rhettinger stage: - patch review versions: +Python 3.3 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12941

[issue12942] Shebang line fixer for 2to3

2011-09-08 Thread Aaron Meurer
New submission from Aaron Meurer asmeu...@gmail.com: As suggested in this thread in the Python porting list (http://mail.python.org/pipermail/python-porting/2011-September/000231.html), it would be nice if 2to3 had a fixer that translated shebang lines from #! /usr/bin/env python to #!

[issue12904] Change os.utime c functions to use nanosecond precision where possible

2011-09-08 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1de6619733d9 by Larry Hastings in branch 'default': Issue #12904: os.utime, os.futimes, os.lutimes, and os.futimesat now write http://hg.python.org/cpython/rev/1de6619733d9 -- nosy: +python-dev

[issue1172711] long long support for array module

2011-09-08 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: Added file: http://bugs.python.org/file23121/issue-1172711.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1172711 ___

[issue1172711] long long support for array module

2011-09-08 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Victor, I like the decorator approach much better. Thanks. Attached is a new patch with that update. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1172711

[issue12943] tokenize: add python -m tokenize support back

2011-09-08 Thread Meador Inge
New submission from Meador Inge mead...@gmail.com: In 2.x, 'python -m tokenize' worked great: [meadori@motherbrain cpython]$ python2.7 -m tokenize test.py 1,0-1,5:NAME'print' 1,6-1,21: STRING 'Hello, World!' 1,21-1,22: NEWLINE '\n' 2,0-2,0:ENDMARKER '' In

[issue12941] add random.pop()

2011-09-08 Thread Julian Berman
Julian Berman julian+python@grayvines.com added the comment: Considering this is pretty easily written more or less as r = range(20) r.pop(random.randrange(0, len(r))) is it really worth adding? -- nosy: +Julian ___ Python tracker

[issue12942] Shebang line fixer for 2to3

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12942 ___ ___