[issue1159051] Handle corrupted gzip files with unexpected EOF

2011-09-08 Thread Yoav Weiss
Yoav Weiss 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, an indication on

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

2011-09-08 Thread Ezio Melotti
Ezio Melotti 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); 4) values in range

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

2011-09-08 Thread Sébastien Sablé
Sébastien Sablé 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 until I added in setup.py:

[issue12935] Typo in findertools.py

2011-09-08 Thread Karsten Wolf
New submission from Karsten Wolf : 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 object_alias = object.F

[issue12936] armv5tejl: random segfaults in getaddrinfo()

2011-09-08 Thread Stefan Krah
New submission from Stefan Krah : 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 running the tests separately.

[issue1492704] distinct error type from shutil.move()

2011-09-08 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: My fault. I tested it only partially, relying on the documentation that says """ On Windows, if dst already exists, OSError will be raised even if it is a file """ Actually it does not (at least at my Windows 7): (Pdb) os.path.isfile(src) True (Pdb) p os.renam

[issue12928] exec not woking in unittest

2011-09-08 Thread Ezio Melotti
Ezio Melotti 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): File "",

[issue5845] rlcompleter should be enabled automatically

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

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

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue12913] Add a debugging howto

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue12902] help("modules") executes module code

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue12915] Add inspect.locate and inspect.resolve

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue12890] cgitb displays tags when executed in text mode

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue12928] exec not woking in unittest

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

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

2011-09-08 Thread Stefan Krah
Changes by Stefan Krah : Added file: http://bugs.python.org/file23119/51cedae5acfc.diff ___ Python tracker ___ ___ Python-bugs-list mailing li

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

2011-09-08 Thread Stefan Krah
Stefan Krah 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]. memoryview is tested against the str

[issue10227] Improve performance of MemoryView slicing

2011-09-08 Thread Stefan Krah
Stefan Krah 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: Slicing --- 1) ./python -

[issue5231] Change format of a memoryview

2011-09-08 Thread Stefan Krah
Stefan Krah 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 _

[issue10227] Improve performance of MemoryView slicing

2011-09-08 Thread Stefan Krah
Changes by Stefan Krah : -- dependencies: +Problems with Py_buffer management in memoryobject.c (and elsewhere?) ___ Python tracker ___ _

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

2011-09-08 Thread Stefan Krah
Stefan Krah added the comment: > is over 1000x slower that the optimized versions of memoryview. Oh dear, scratch that. Lets make that 15x. ;) -- ___ Python tracker ___ ___

[issue10227] Improve performance of MemoryView slicing

2011-09-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson 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 and I am unable to gi

[issue10227] Improve performance of MemoryView slicing

2011-09-08 Thread Stefan Krah
Stefan Krah 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\PCbuild>amd64\python.exe -m timeit -n 1000 -s "x = ((b'x'*1))" "x[:1

[issue12915] Add inspect.locate and inspect.resolve

2011-09-08 Thread Andreas Stührk
Changes by Andreas Stührk : -- nosy: +Trundle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue10227] Improve performance of MemoryView slicing

2011-09-08 Thread Stefan Krah
Stefan Krah 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 Linux, that's quite a nice spee

[issue12844] Support more than 255 arguments

2011-09-08 Thread Sebastian Ramacher
Changes by Sebastian Ramacher : -- nosy: +sebastinas ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue12937] Support install options as found in distutils

2011-09-08 Thread Brett Cannon
New submission from Brett Cannon : 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 components: Distutils2 me

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

2011-09-08 Thread Terry J. Reedy
Terry J. Reedy 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 ones>10; >2) values in range 0..10; >3) values in range 0..10 except

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

2011-09-08 Thread zvin
New submission from zvin : 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 True, this func

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

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, sandro.tosi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2011-09-08 Thread zvin
Changes by zvin : -- title: html.escape does not mention single quotes (') -> html.escape docstring does not mention single quotes (') ___ Python tracker ___ ___

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

2011-09-08 Thread zvin
zvin 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, use html.escape instead" --

[issue12937] Support install options as found in distutils

2011-09-08 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue11457] Expose nanosecond precision from system calls

2011-09-08 Thread STINNER Victor
STINNER Victor 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 this tuple to a high level obj

[issue11457] Expose nanosecond precision from system calls

2011-09-08 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis 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 tracker

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

2011-09-08 Thread STINNER Victor
STINNER Victor added the comment: See also issue #12760 (Add create mode to open). -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue12760] Add create mode to open()

2011-09-08 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

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

2011-09-08 Thread STINNER Victor
New submission from STINNER Victor : 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 Windows file handlers to get a

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

2011-09-08 Thread STINNER Victor
STINNER Victor 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 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 _

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-08 Thread STINNER Victor
STINNER Victor 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 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: +haypo ___

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

2011-09-08 Thread Tim Chase
New submission from Tim Chase : 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 exists in most 3.x documentation.

[issue12941] add random.pop()

2011-09-08 Thread John Feuerstein
New submission from John Feuerstein : 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 (Lib) files: ran

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

2011-09-08 Thread Tim Chase
Tim Chase added the comment: (duh, sorry, that's the "do_left" method, not the "left" method) -- ___ Python tracker ___ ___ Python-bu

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

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, sandro.tosi stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue12941] add random.pop()

2011-09-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, rhettinger stage: -> patch review versions: +Python 3.3 -Python 3.4 ___ Python tracker ___

[issue12942] Shebang line fixer for 2to3

2011-09-08 Thread Aaron Meurer
New submission from Aaron Meurer : 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 #! /usr/bin/env python3

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

2011-09-08 Thread Roundup Robot
Roundup Robot 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 ___ Pytho

[issue1172711] long long support for array module

2011-09-08 Thread Meador Inge
Changes by Meador Inge : Added file: http://bugs.python.org/file23121/issue-1172711.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue1172711] long long support for array module

2011-09-08 Thread Meador Inge
Meador Inge added the comment: Victor, I like the decorator approach much better. Thanks. Attached is a new patch with that update. -- ___ Python tracker ___ __

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

2011-09-08 Thread Meador Inge
New submission from Meador Inge : 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 3.x, however, th

[issue12941] add random.pop()

2011-09-08 Thread Julian Berman
Julian Berman 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 : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue12944] setup.py upload to pypi needs to work with specified files

2011-09-08 Thread Rene Dudfield
New submission from Rene Dudfield : We need to specify files to upload to pypi. Otherwise we have to use the web interface. 'Regarding the "setup.py upload" command, this isn't very helpful because it will not upload a package that was already built - for example, a Windows package built on

[issue12905] multiple errors in test_socket on OpenBSD

2011-09-08 Thread Charles-François Natali
Charles-François Natali 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. Agreed.

[issue6715] xz compressor support

2011-09-08 Thread Nam Nguyen
Nam Nguyen added the comment: In uint32_converter, I'm not sure the if statement comparing val and UINT32_MAX makes sense. val was defined to be unsigned long, which is 32bit on 32-bit compiler. -- nosy: +Nam.Nguyen ___ Python tracker