[issue7846] Fnmatch cache is never cleared during usage

2010-02-17 Thread Andrew Clegg
Andrew Clegg a...@pml.ac.uk added the comment: If you give something an _, then it is not considered part of the public API and it (the internal API, not the value) is subject to change, which means you should *not* suggest that users change it. If they find it and want to change it anyway,

[issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True

2010-02-17 Thread Christoph Neuroth
New submission from Christoph Neuroth christoph.neur...@googlemail.com: Currently, the documentation of subprocess only says Calling the program through the shell is usually not required.. IMHO there should be a real warning (like, in its own box with a couple of big exclamation marks ;))

[issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True

2010-02-17 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: This was just discussed in issue 6760. -- nosy: +eric.smith resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - patch to subprocess docs to better explain Popen's 'args' argument

[issue7942] Inconsistent error types/messages for __len__ between old and new-style classes

2010-02-17 Thread Paul Boddie
Paul Boddie p...@boddie.org.uk added the comment: I don't disagree that OverflowError describes what's happening, but the need to convert to an int in the first place is a detail of the machine - you'd have to know that this is a limitation of whatever internal protocol CPython implements -

[issue7942] Inconsistent error types/messages for __len__ between old and new-style classes

2010-02-17 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Interestingly, this (len returning something larger than ssize_t) has not been fixed in python3. On the other hand, I still think the new-style message is better. Yes, it is an implementation detail of CPython, but that is exactly the

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-17 Thread Alex Willmer
Alex Willmer a...@moreati.org.uk added the comment: I've packaged this latest revision and uploaded to PyPI http://pypi.python.org/pypi/regex -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636

[issue7593] Computed-goto patch for RE engine

2010-02-17 Thread A.M. Kuchling
A.M. Kuchling li...@amk.ca added the comment: I finally got around to benchmarking this change, and unfortunately the results are not good. I used the regex tests in the Unladen Swallow test suite, regex_effbot and regex_v8. The tests are written for Python 2.x, but the fixes for 3.x are

[issue3132] implement PEP 3118 struct changes

2010-02-17 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: And under what conditions would a ctype long double be used vs. a Decimal object. Well, I'm guessing that this was really just an open question for the PEP, and that the PEP authors hadn't decided which of these two options was more

[issue7593] Computed-goto patch for RE engine

2010-02-17 Thread A.M. Kuchling
A.M. Kuchling li...@amk.ca added the comment: Actually, I really want someone to verify that measurement. As a control, I tried running the call_method benchmark (after a few more xrange fixes). The Python 3.x trunk version with my patch is measured as 1.0227x slower, even though the patch

[issue3132] implement PEP 3118 struct changes

2010-02-17 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I'm looking for previous discussions of this PEP. There's a python-dev thread in April 2007: http://mail.python.org/pipermail/python-dev/2007-April/072537.html Are there other discussions that I'm missing? --

[issue7633] decimal.py: type conversion in context methods

2010-02-17 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: The latest patch looks fine. I've attached a slightly tweaked version: - Add conversions for number_class; without this, number_class is inconsistent with the various is_*** methods. c.is_normal(3) should be equivalent to

[issue7299] setup.py install doesn't honor PYTHONUSERBASE

2010-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Hello It seems to me that your patch doesn’t fix a bug but adds a feature. PEP 370 says that “distutils.command.install (setup.py install) gets a new argument --user to install packages in the user site directory”, not that the presence of the

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: We could try not to release the GIL when socket methods are called on a non-blocking socket. Regardless, I've re-run the tests under the Linux machine, with two spinning threads: * python 2.7: 25.580 seconds (409914.612 bytes/sec) * python

[issue7593] Computed-goto patch for RE engine

2010-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: You should disassemble the output (or produce assembler from gcc) and check that the various indirect jumps at the end of each case block don't get merged into a single shared indirect jump. Or perhaps it's simply that regular expression

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-17 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: The main text at http://pypi.python.org/pypi/regex appears to have lost its backslashes, for example: The Unicode escapes u and U are supported. instead of: The Unicode escapes \u and \U are

[issue7904] urlparse.urlsplit mishandles novel schemes

2010-02-17 Thread mARK
mARK python.mblo...@xoxy.net added the comment: Doing a fallback test for // would look like if scheme in uses_netloc and url[:2] == '//' or url[:2] == '//': but this is equivalent to if url[:2] == '//': i.e., an authority appears if and only if there is a // after the scheme. This still

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-17 Thread Vlastimil Brom
Vlastimil Brom vlastimil.b...@gmail.com added the comment: I just tested the fix for unicode tracebacks and found some possibly weird results (not sure how/whether it should be fixed, as these inputs are indeed rather artificial...). (win XPp SP3 Czech, Python 2.6.4) Using the cmd console,

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-02-17 Thread Eric Smith
New submission from Eric Smith e...@trueblade.com: It surprised me that this doesn't work: {0[-1]}.format('fox') Traceback (most recent call last): File stdin, line 1, in module TypeError: string indices must be integers I was expecting it to be equivalent to: {0[2]}.format('fox') 'x' I

[issue7952] fileobject.c can switch between fread and fwrite without an intervening flush or seek, invoking undefined behaviour

2010-02-17 Thread David-Sarah Hopwood
New submission from David-Sarah Hopwood david-sa...@jacaranda.org: The C standard (any version, or POSIX), says in the description of fopen that: {{{ When a file is opened with update mode ( '+' as the second or third character in the mode argument), both input and output may be performed on

[issue7953] RawIOBase.read fails with an AttributeError

2010-02-17 Thread Andrew McNabb
New submission from Andrew McNabb amcn...@mcnabbs.org: I was trying to open stdin in binary mode and ran the following: RawIOBase(sys.stdin.fileno()).read() Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'RawIOBase' object has no attribute 'readinto' I

[issue7953] RawIOBase.read fails with an AttributeError

2010-02-17 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: If you want the actual raw sys.stdin stream, use sys.stdin.buffer.raw. -- nosy: +benjamin.peterson resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org

[issue7953] RawIOBase.read fails with an AttributeError

2010-02-17 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Also note that RawIOBase is not intended to be a concrete class, it is intended to be subclassed (thus the 'Base' in the name). -- nosy: +r.david.murray priority: - normal ___ Python tracker

[issue7954] detach method has no docstring

2010-02-17 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2010/2/17 Andrew McNabb rep...@bugs.python.org: Andrew McNabb amcn...@mcnabbs.org added the comment: Oops.  I had run pydoc instead of pydoc3, so I was getting the 2.6 version of the io docstrings instead of the 3.1 version. By the

[issue7952] fileobject.c can switch between fread and fwrite without an intervening flush or seek, invoking undefined behaviour

2010-02-17 Thread David-Sarah Hopwood
David-Sarah Hopwood david-sa...@jacaranda.org added the comment: Correction: when input is followed by output, the call needed to avoid undefined behaviour has to be to a file positioning function (fseek, fsetpos, or rewind, but not fflush). Since fileobject.c does not use wide I/O

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-17 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: issue2636-20100218.zip is a new version of the regex module. I've added '.' to the permitted characters when parsing the name of a property. The name itself is no longer reported in the error message. I've also corrected the

[issue7955] TextIOWrapper Buffering Inconsistent Between _io and _pyio

2010-02-17 Thread Andrew McNabb
New submission from Andrew McNabb amcn...@mcnabbs.org: The following snippet behaves differently in the C IO implementation than in the Python IO implementation: import sys sys.stdout.write('unicode ') sys.stdout.buffer.write(b'bytes ') To test this, I have created two scripts,