[issue8745] zipimport is a bit slow

2010-05-18 Thread Goplat
New submission from Goplat mrnobo1...@yahoo.com: Reading the list of files in a .zip takes a while because several seeks are done for each entry, which (on Windows at least) flushes stdio's buffer and forces a system call on the next read. For large .zips the effect on startup speed is

[issue3132] implement PEP 3118 struct changes

2010-05-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks for this. Any chance you could upload the patch to Rietveld (http://codereview.appspot.com/) for ease of review? -- ___ Python tracker rep...@bugs.python.org

[issue3051] heapq change breaking compatibility

2010-05-18 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: All six of the rich comparisons need to be implemented or the result is undefined. This module never made guarantees for objects defining only one of the six. We could change the pure python code to handle both __lt__ and

[issue8746] *chflags detection broken on FreeBSD 9-CURRENT

2010-05-18 Thread Garrett Cooper
New submission from Garrett Cooper yaneg...@gmail.com: os.chflags isn't `available' even though chflags support is available on the system: filter(lambda x: x.startswith('chflags'), dir(os)) [] platform.uname() ('FreeBSD', 'bayonetta.local', '9.0-CURRENT', 'FreeBSD 9.0-CURRENT #0 r206173M:

[issue8747] Autoconf tests in python not portably correct

2010-05-18 Thread Garrett Cooper
New submission from Garrett Cooper yaneg...@gmail.com: A number of features are being blindly enabled on python that aren't correct from a porting standpoint; a handful in configure.in I noticed are: # The later defininition of _XOPEN_SOURCE disables certain features # on Linux, so we need

[issue8732] Should urrllib2.urlopen send an Accept-Encoding header?

2010-05-18 Thread Dave Abrahams
Dave Abrahams d...@boostpro.com added the comment: How many tests did you run? My two tests were minutes apart. I have the feeling that this has something to do with cacheing behavior on the server. -- ___ Python tracker rep...@bugs.python.org

[issue8745] zipimport is a bit slow

2010-05-18 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: When I perform some test on debian-5.0, I see the timing results almost the same before and after apply your patch(I modified the patch to against the trunk). Could you give some test result on windows? I can't see the speedups on debian-5.0.

[issue8640] subprocess: canonicalize env to bytes on Unix (Python3)

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: os.exeve() and os.exevpe() should also canonicalize env to bytes. os.exeve() and os.exevpe(), but not os._exevpe() to avoid doing it twice (once in subprocess, once in os._exevpe). Patch os._exevpe() is not enough because

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Hum, os.get_exec_path() has no test for the new features (support b'PATH' key and bytes value). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-18 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: I've just discovered that integer-to-complex comparisons are broken, in all versions of Python that I've tested. It looks as though the integer is first converted to a complex number, and then the two complex numbers are compared.

[issue8741] 2.7 regression in tarfile: IOError: link could not be created

2010-05-18 Thread Lars Gustäbel
Changes by Lars Gustäbel l...@gustaebel.de: -- assignee: - lars.gustaebel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8741 ___ ___

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Right thread, wrong message. That should have been: http://www.mail-archive.com/sage-de...@googlegroups.com/msg20839.html -- ___ Python tracker rep...@bugs.python.org

[issue8727] test_import failure

2010-05-18 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: Thanks, Antoine filled me in on IRC just before my 'net connection went down for many hours. The good news is that I have a fix for this and will commit it in a little while. -- ___ Python

[issue2281] Enhanced cPython profiler with high-resolution timer

2010-05-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Nir, would you be interested in looking at this? -- nosy: +nirai versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2281

[issue8745] zipimport is a bit slow

2010-05-18 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - brett.cannon nosy: +brett.cannon stage: - patch review versions: +Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8745

[issue8749] Cruft in object.c: PyObject_GenericGetAttr

2010-05-18 Thread Yaniv Aknin
New submission from Yaniv Aknin yaniv.ak...@gmail.com: While reading the source I saw that recent py3k has this in Objects/object.c (reasonably recent trunk has it as well): #if 0 /* XXX this is not quite _PyType_Lookup anymore */ /* Inline _PyType_Lookup */ { ... removed ... }

[issue8749] Cruft in object.c: PyObject_GenericGetAttr

2010-05-18 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8749 ___ ___ Python-bugs-list

[issue8749] Cruft in object.c: PyObject_GenericGetAttr

2010-05-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Looks like r59944 to me. Amaury, any objections to removing this '#if 0' code? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8749

[issue8749] Cruft in object.c: PyObject_GenericGetAttr

2010-05-18 Thread Yaniv Aknin
Yaniv Aknin yaniv.ak...@gmail.com added the comment: Oops, of course I meant r59944, off by one. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8749 ___

[issue3132] implement PEP 3118 struct changes

2010-05-18 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Sure - http://codereview.appspot.com/1258041 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3132 ___

[issue2281] Enhanced cPython profiler with high-resolution timer

2010-05-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Regarding the calibrating loop when using ASM timestamp counters, there's one problem if the thread gets preempted in the middle of the loop: the calibration will return incorrect results. Perhaps a way of avoiding this would be to call

[issue2281] Enhanced cPython profiler with high-resolution timer

2010-05-18 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2281 ___ ___

[issue2281] Enhanced cPython profiler with high-resolution timer

2010-05-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Sorry, the calibration loop actually looks correct in case of preemption, since it simply divides the TSC delta by the elapsed physical time (and both continue increasing monotonously when another thread runs). It is still vulnerable to the

[issue8667] Link to PEP 3147 from importlib docs

2010-05-18 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Ashley Sands wrote: Is this the right approach? Follow the process mentioned here: http://www.python.org/dev/faq/ And create a patch against Docs/library/importlib.rst with the reference to PEP 3147 included. That is it. Look for other

[issue8750] Many of MutableSet's methods assume that the other parameter is not self

2010-05-18 Thread Daniel Stutzbach
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: For example, here is one of MutableSet's methods: def __isub__(self, it): for value in it: self.discard(value) return self However, if I do x -= x, then it mutates my set-like object during

[issue8742] broken asdl link in Parser/asdl.py

2010-05-18 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Here is the proper link: http://www.cs.princeton.edu/research/techreps/TR-554-97 Fixed those references in the code too. -- nosy: +orsenthil resolution: - fixed status: open - closed ___ Python

[issue5753] CVE-2008-5983 python: untrusted python modules search path

2010-05-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, I will try to write better documentation. -- versions: +Python 3.2 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5753 ___

[issue2281] Enhanced cPython profiler with high-resolution timer

2010-05-18 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: Nir, would you be interested in looking at this? yes, I'll take a look, but will take me a few days. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2281

[issue8727] test_import failure

2010-05-18 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: r81290 -- assignee: brett.cannon - barry resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8727 ___

[issue8741] 2.7 regression in tarfile: IOError: link could not be created

2010-05-18 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: This is a platform specific bug. It is happening only on windows. BTW, makelink should not have been called for this file, because it is not a link or symlink, but a regular file. -- nosy: +orsenthil

[issue5753] CVE-2008-5983 python: untrusted python modules search path

2010-05-18 Thread Tomas Hoger
Tomas Hoger tho...@redhat.com added the comment: My reading of PySys_SetArgv is that if argv is NULL, then char *argv0 = argv[0]; will read through NULL and thus will segfault on a typical platform. Right. I favor Antoine's approach in http://bugs.python.org/file13860/setargvex.patch of

[issue8751] Threading and KeyError: 51

2010-05-18 Thread Vignesh
New submission from Vignesh vigne...@mail.med.upenn.edu: I have a python script which runs a particular script large number of times (for monte carlo purpose) and the way I have scripted it is that, I queue up the script the desired number of times it should be run then I spawn threads and

[issue8741] 2.7 regression in tarfile: IOError: link could not be created

2010-05-18 Thread Lars Gustäbel
Lars Gustäbel l...@gustaebel.de added the comment: @senthil: Yes, this is a platform-specific problem. The code that is failing is in fact supposed to somehow emulate symlink and hardlink extraction on platforms that don't support these, e.g. Windows. What tarfile is trying to do here is to

[issue8752] set_contains, etc. should check for collections.Set in addition to PySet_Check

2010-05-18 Thread Daniel Stutzbach
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: For operations that test membership in a set, Python coerces sets and subclasses of set into a temporary frozenset before testing membership. For example, this works: set() in set([frozenset()]) True Although the set() is

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-18 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: More fun arising from the current complex comparison implementation: usually you can put a complex number and an integer into the same set: {1, 2j} # (Python 3 code) {1, 2j} s = {10**1000, 2j} # huge integers no problem But if you

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

2010-05-18 Thread Peter Portante
Changes by Peter Portante peter.a.porta...@gmail.com: -- nosy: +portante ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7946 ___ ___

[issue8751] Threading and KeyError: 51

2010-05-18 Thread Mattias Nilsson
Mattias Nilsson mattias.o.nils...@gmail.com added the comment: Correct me if I'm wrong, but you seem to be creating a new lock object for each iteration in the loop? If other threads should be blocked, they must be using the same lock object and you can't create new ones for each time you want

[issue8751] Threading and KeyError: 51

2010-05-18 Thread Raghuram Devarakonda
Raghuram Devarakonda draghu...@gmail.com added the comment: As suggested, please post in c.l.py or other forums. Open a bug here only if you are sure that there is a bug in Python. -- nosy: +draghuram resolution: - invalid status: open - closed ___

[issue8753] Py_ReprEnter and Py_ReprLeave are undocumented

2010-05-18 Thread Daniel Stutzbach
Changes by Daniel Stutzbach dan...@stutzbachenterprises.com: -- assignee: stutzbach components: Documentation nosy: stutzbach priority: normal severity: normal stage: needs patch status: open title: Py_ReprEnter and Py_ReprLeave are undocumented versions: Python 2.7, Python 3.2

[issue8741] 2.7 regression in tarfile: IOError: link could not be created

2010-05-18 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: Thanks - just a suggestion: it may be a good idea to add a test case for this makelink emulation code. Also, any thoughts on raising (a derived class of) TarError instead of IOError? --

[issue8754] ImportError: quote bad module name in message

2010-05-18 Thread Terry J. Reedy
New submission from Terry J. Reedy tjre...@udel.edu: ImportError messages should quote the name it cannot import since the actual problem may be whitespace in the name that is currently invisible in the message. In other words, display ImportError: no module named 'bad name\r' instead of

[issue3051] heapq change breaking compatibility

2010-05-18 Thread Maciek Fijalkowski
Maciek Fijalkowski fi...@genesilico.pl added the comment: I cannot honestly make much sense from what you said. My concern is whether python and C version behaves the same or not. It seems that in current version they intentionally behave differently, for simplicity and it's against policy of

[issue6419] Broken test_kqueue.py on OpenBSD

2010-05-18 Thread Henry Precheur
Henry Precheur he...@precheur.org added the comment: The patch works well with on amd64/OpenBSD-current (CVS from May 14 or 15). I don't have access to a 4.7-stable right now. On Fri, May 14, 2010 at 05:58:10PM +, Stefan Krah wrote: Stefan Krah stefan-use...@bytereef.org added the

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Fixed by r81291 + r81292 (py3k). The final commit contains much more tests ;-) I will watch the buildbot next hours and block the commit in 3.1. -- resolution: - fixed status: open - closed

[issue7753] newgil backport

2010-05-18 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7753 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7753] newgil backport

2010-05-18 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: Sorry for the nosy. There is something going wrong with my Firefox caching. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7753 ___

[issue8667] Link to PEP 3147 from importlib docs

2010-05-18 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Thanks for wanting to help, Ashley! And Senthil hit all the right points. If you need any help with the code checkout you can read http://www.python.org/dev/setup/ (and in general dev questions are hopefully answered by something linked from

[issue8754] ImportError: quote bad module name in message

2010-05-18 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: I guess it's a question of readability. Does:: ImportError: No module named mod read better than:: ImportError: No module named 'mod' In my eyes it doesn't by much, so switching to using repr() seems reasonable. This can't be changed in

[issue8754] ImportError: quote bad module name in message

2010-05-18 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8754 ___ ___ Python-bugs-list mailing

[issue8335] distutils test_build_ext's test_get_outputs fails in bootstrap environment

2010-05-18 Thread Dylan Canfield
Dylan Canfield fire.phr...@gmail.com added the comment: I am having the exact same problem with test_distutils failing on a clean env. Did reverting the changes in r72637 fix your problem? -- nosy: +Canfield ___ Python tracker rep...@bugs.python.org

[issue8755] idle crash UnicodeDecodeError utf-8 codec

2010-05-18 Thread Andy Harrington
New submission from Andy Harrington ahar...@luc.edu: I was editing in idle in python 3.1, typing away. I had been doing it for hours. I do not think I had jumped to the shell window. Suddenly idle crashed, with this error message in the the ubuntu 9,10 terminal window: Traceback (most

[issue8756] Multiprocessing and UUID bug on Mac OSX

2010-05-18 Thread Gavin Roy
New submission from Gavin Roy g...@myyearbook.com: import multiprocessing import uuid def test(): print str(uuid.uuid4()) p = multiprocessing.Pool(processes=4) for x in xrange(0, 4): p.apply_async(test) In MacOS: Gavin-M-Roys-Office-iMac:kvpbench gmr$ python Python 2.6.1 (r261:67515,

[issue8756] Multiprocessing and UUID bug on Mac OSX

2010-05-18 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - uuid.uuid4() generates non-unique values on OSX ___ Python tracker rep...@bugs.python.org

[issue8573] Buggy _strerror in asyncore

2010-05-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I’ve just checked the diff and the current trunk version of the file, and the change from “os.strerror(err)” to “strerror(err)” seems buggy to me. -- assignee: giampaolo.rodola - nosy: -giampaolo.rodola, josiahcarlson resolution: fixed

[issue8573] Buggy _strerror in asyncore

2010-05-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Hopefully fixing yet another lovely browser or roundup forms friggin bug. Sorry. -- assignee: - giampaolo.rodola nosy: +giampaolo.rodola, josiahcarlson type: crash - behavior versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

[issue8573] Buggy _strerror in asyncore

2010-05-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8573 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-18 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Backport to 2.6 and 3.1? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8729 ___

[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Yes, I think this is a good candidate for backport. The ABCs are new and their APIs shouldn't contain any obvious bugs such as this. -- nosy: +pitrou versions: +Python 2.6, Python 3.1 ___ Python

[issue8573] Buggy _strerror in asyncore

2010-05-18 Thread Longpoke
Longpoke longp...@gmail.com added the comment: Yes, it should definately be os.sterror. Dunno how I ended up omitting that, sorry. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8573 ___

[issue3051] heapq change breaking compatibility

2010-05-18 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Am closing this. It would make no sense to change simple, pure python code to support objects implementing only one of the rich comparison methods. People implementing rich comparisons need to implement all six if they

[issue8752] set_contains, etc. should check for collections.Set in addition to PySet_Check

2010-05-18 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I don't think the set methods can make assumptions about whether instances of the Set API can be made frozen. It is okay to restrict this to just instances of set where we know its internal structure and know that its

[issue8573] Buggy _strerror in asyncore

2010-05-18 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: It slipped under my radar as well. Thanks. Fixed in r81294 (trunk), r81298 (2.6), r81299 (3.2) and r81300 (3.1) which also add tests and include NameError in the list of possible exceptions in case os.strerror() is not supported on the

[issue8573] Buggy _strerror in asyncore

2010-05-18 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8573 ___

[issue8640] subprocess: canonicalize env to bytes on Unix (Python3)

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: My patch to fix #8513 does also fix the examples of this issue and so I think that the canonicalization is no more needed. I will only reopen the issue if I find a good reason to apply the patch :-) -- resolution: - fixed

[issue8757] Race condition when checking for set in set

2010-05-18 Thread Daniel Stutzbach
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: some_set in some_set_of_sets contains a race condition that can lead to odd behavior. To perform the test, the set_contains() function in setobject.c creates a temporary frozenset object (t), swaps the bodies of some_set

[issue8758] BUILD_LIST followed by BINARY_SUBSCR can be optimized to a BUILD_TUPLE if all members of the list are constants

2010-05-18 Thread Alex
New submission from Alex alex.gay...@gmail.com: We do the same thing for a BUILD_LIST followed by a COMPARE_OP (in). -- components: Interpreter Core messages: 106008 nosy: alex priority: normal severity: normal status: open title: BUILD_LIST followed by BINARY_SUBSCR can be optimized to

[issue8759] 2.7: wrong user site directory on Linux; totally missing on OSX

2010-05-18 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar sridh...@activestate.com: sridh...@triple:~$ /opt/ActivePython-2.7/bin/python -c import sys; print sys.path; import cmdln ['', '/opt/ActivePython-2.7/lib/python27.zip', '/opt/ActivePython-2.7/lib/python2.7',

[issue8589] test_warnings.CEnvironmentVariableTests.test_nonascii fails under an ascii terminal

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The test was introduced by r80066 (issue #7301). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8589 ___

[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-18 Thread Orlando Irrazabal
New submission from Orlando Irrazabal oirr...@mendoza.gov.ar: Build of Python 2.6.5 on AIX 5.3 fails with the below error message. The configure line is: ./configure [...] building '_multiprocessing' extension cc_r -qlanglvl=extc89 -DNDEBUG -O -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1

[issue8589] test_warnings.CEnvironmentVariableTests.test_nonascii fails under an ascii terminal

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: os.environ is decoded with sys.getfilesystemencoding(), whereas PYTHONWARNINGS is decoded with the locale encoding (locale.getpreferredencoding()) :-/ -- ___ Python tracker

[issue8589] test_warnings.CEnvironmentVariableTests.test_nonascii fails under an ascii terminal

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Attached patch creates PySys_AddWarnOptionUnicode() function and decodes PYTHONWARNINGS variable with the file system encoding (as it is done for os.environ, to be consistent) instead of the locale encoding. The patch only

[issue7447] Sum() doc and behavior mismatch

2010-05-18 Thread Leonhard Vogt
Leonhard Vogt leonhard.v...@gmx.ch added the comment: I changed the documentation regarding string not allowed as start argument and performance I included the list concatenation with itertools.chain from http://groups.google.com/group/comp.lang.python/msg/33e764d0ac41826a patch is based on

[issue8761] PyUnicode_CompareWithASCIIString name is not mangled (UCS2, UCS4)

2010-05-18 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: In unicodeobject.h, you can see: # define PyUnicode_CompareWithASCII PyUnicodeUCS2_CompareASCII ... # define PyUnicode_CompareWithASCII PyUnicodeUCS4_CompareWithASCII ... PyAPI_FUNC(int) PyUnicode_CompareWithASCIIString(

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r81314 fixes 2 calls in _PyModule_Clear(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6697 ___

[issue8729] The Mapping ABC's __eq__ method should return NotImplemented if the other type is not a Mapping

2010-05-18 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Here's a patch that adds test cases. It exercises all of the following special methods on Set and Mapping to ensure that they return NotImplemented if they don't recognize the other type. lt, gt, le, ge, eq, ne, or, and,

[issue8762] default value in constructor not unique across objects

2010-05-18 Thread andrew
New submission from andrew atc...@gmail.com: After debugging for a while I finally released that I stumbled across a Python bug (at least I believe it is). Here is a proof of concept that produces the issue: !/usr/bin/python class blah: def __init__(self, items=[]): self.items =

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r81320 fixes a call in vgetargskeywords() (PyArg_ParseTupleAndKeywords). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6697

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r81321 fixes 2 calls in builtin_input() (if sys.stdin or sys.stdout encoding contain a surrogate: this is *very* unlikely :-)). -- ___ Python tracker rep...@bugs.python.org

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r81322 fixes 2 calls in textio.c. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6697 ___

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r81323 fixes 4 calls in _sqlite. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6697 ___

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r81324 fixes 2 calls in typeobject.c -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6697 ___

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-05-18 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file16461/pythonrun-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6697 ___

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Remove pyunicode_asstringordefault.patch and pythonrun-py3k.patch because the new _PyUnicode_AsStringOrDefault() function was rejected (and it's easy to avoid it). -- ___ Python tracker

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-05-18 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file16458/pyunicode_asstringordefault.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6697 ___

[issue8754] ImportError: quote bad module name in message

2010-05-18 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I refinement would be to only quote when there is whitespace in the name, but I do not know how well that works with unicode versus ascii. -- ___ Python tracker rep...@bugs.python.org

[issue8754] ImportError: quote bad module name in message

2010-05-18 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8754 ___ ___ Python-bugs-list mailing list

[issue8754] ImportError: quote bad module name in message

2010-05-18 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: A refinement would be to only quote when there is whitespace in the name, but I do not know how well that works with unicode versus ascii. -- ___ Python tracker rep...@bugs.python.org

[issue8762] default value in constructor not unique across objects

2010-05-18 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: This is not a bug, it's how Python works. Default values are computed at function definition time, so there's only one list across all the function invocations. -- nosy: +r.david.murray resolution: - invalid stage: -

[issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: tlesher If you don't have time to update the patch, let me know and I'll put one together. I would be happy if you write a new patch :-) -- ___ Python tracker rep...@bugs.python.org

[issue8762] default value in constructor not unique across objects

2010-05-18 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: Here is the explanation from Python Language Reference 7.6: Function Definitions When one or more top-level parameters have the form parameter = expression, the function is said to have ``default parameter values.'' For a parameter with a default

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

2010-05-18 Thread Michele
Michele vo.s...@gmail.com added the comment: Attached ccbench-osx.log made today on OSX on latest svn checkout. Hope it helps -- nosy: +Michele Added file: http://bugs.python.org/file17393/ccbench-osx.log ___ Python tracker rep...@bugs.python.org

[issue7245] better Ctrl-C support in pdb (program can be resumed) (issue216067)

2010-05-18 Thread Ilya Sandler
Ilya Sandler ilya.sand...@gmail.com added the comment: I tried to understand the cause of failures and I don't see how test_pdb2 could have caused them ;-). Here is the relevant part of buildbot timeline: http://www.python.org/dev/buildbot/trunk/?last_time=1273368351show_time=7400 The only

[issue8707] Duplicated document in telnetlib.

2010-05-18 Thread Evelyn Mitchell
Evelyn Mitchell efm-pythonb...@tummy.com added the comment: Fixed for 3.2 branch. -- keywords: +patch nosy: +efm Added file: http://bugs.python.org/file17394/telnetlib3.2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8707

[issue8707] Duplicated document in telnetlib.

2010-05-18 Thread Evelyn Mitchell
Evelyn Mitchell efm-pythonb...@tummy.com added the comment: Fixed for 2.6 branch -- Added file: http://bugs.python.org/file17395/telnetlib2.6.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8707

[issue8707] Duplicated document in telnetlib.

2010-05-18 Thread Evelyn Mitchell
Evelyn Mitchell efm-pythonb...@tummy.com added the comment: Fixed for 2.7 branch -- Added file: http://bugs.python.org/file17396/telnetlib2.7.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8707

[issue8707] Duplicated document in telnetlib.

2010-05-18 Thread Evelyn Mitchell
Evelyn Mitchell efm-pythonb...@tummy.com added the comment: Fixed for 3.1 branch -- Added file: http://bugs.python.org/file17397/telnetlib3.1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8707

[issue8754] ImportError: quote bad module name in message

2010-05-18 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: It wouldn't matter (at least in Python 3) as str is unicode-aware. It's more about whether it's worth special-casing the output. I say no and just go with using the repr. -- ___ Python tracker

[issue8750] Many of MutableSet's methods assume that the other parameter is not self

2010-05-18 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Here's a possible fix: def __isub__(self, it): if it is self: self.clear() else: for value in it: self.discard(value) return self -- nosy: +rhettinger versions: +Python 2.6,