[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc [EMAIL PROTECTED]: Added file: http://bugs.python.org/file11305/baditer.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3720 ___

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11303/baditer.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3720 ___

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: New patches, with the suggested spelling. For 3.0 and 2.6. Added file: http://bugs.python.org/file11306/baditer-2.6.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3720

[issue3727] poplib module broken by str to unicode conversion

2008-08-29 Thread Dmitry Vasiliev
New submission from Dmitry Vasiliev [EMAIL PROTECTED]: Example: from poplib import POP3 p = POP3(localhost) p.user(user) Traceback (most recent call last): File stdin, line 1, in module File /py3k/Lib/poplib.py, line 179, in user return self._shortcmd('USER %s' % user) File

[issue3728] imaplib module broken by str to unicode conversion

2008-08-29 Thread Dmitry Vasiliev
New submission from Dmitry Vasiliev [EMAIL PROTECTED]: Example: from imaplib import IMAP4 m = IMAP4(localhost) Traceback (most recent call last): File stdin, line 1, in module File /py3k/Lib/imaplib.py, line 185, in __init__ self.welcome = self._get_response() File

[issue3728] imaplib module broken by str to unicode conversion

2008-08-29 Thread Raghuram Devarakonda
Raghuram Devarakonda [EMAIL PROTECTED] added the comment: This seems to be duplicate of #1210. -- nosy: +draghuram resolution: - duplicate status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3728

[issue3722] print followed by exception eats print with doctest

2008-08-29 Thread Tim Peters
Tim Peters [EMAIL PROTECTED] added the comment: As the doctest docs say, Examples containing both expected output and an exception are not supported. Trying to guess where one ends and the other begins is too error-prone, and that also makes for a confusing test. Since this is

[issue3729] SystemError on calling len() if __len__() doesn't return an int

2008-08-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: What about using PyNumber_AsSsize_t? it uses PyNumber_Index to accept integral-like types, and refuses floats. -- nosy: +amaury.forgeotdarc ___ Python tracker [EMAIL PROTECTED]

[issue3729] SystemError on calling len() if __len__() doesn't return an int

2008-08-29 Thread Hagen Fürstenau
Hagen Fürstenau [EMAIL PROTECTED] added the comment: Sounds ok, but then you get a more generic object cannot be interpreted as an integer at the point where len() is called, instead of the clearer __len__() should return an int. I'm not sure if this could be confusing.

[issue3730] Update BaseHTTPServer docs

2008-08-29 Thread Chris AtLee
New submission from Chris AtLee [EMAIL PROTECTED]: The BaseHTTPServer docs don't mention 'server' as an instance variable in the instance variable section for BaseHTTPRequestHandler. It is mentioned in passing a few paragraphs above in the BaseHTTPServer class description, but it's too easy to

[issue3729] SystemError on calling len() if __len__() doesn't return an int

2008-08-29 Thread Hagen Fürstenau
Hagen Fürstenau [EMAIL PROTECTED] added the comment: Of course we can do both: Accept integral-like types and reset the exception text. The new patch does this and adds a test for the new behaviour. Review carefully - I'm a newbie! ;-) Added file:

[issue3731] import warning in multiprocessing

2008-08-29 Thread Antoine Pitrou
New submission from Antoine Pitrou [EMAIL PROTECTED]: I get the following when running regrtest.py -uall under trunk: /home/antoine/cpython/__svn__/Lib/multiprocessing/__init__.py:82: ImportWarning: Not importing directory '/home/antoine/cpython/__svn__/Modules/_multiprocessing': missing

[issue3066] FD leak in urllib2

2008-08-29 Thread James Antill
James Antill [EMAIL PROTECTED] added the comment: So if I add a: class _WrapForRecv: def __init__(self, obj): self.__obj = obj def __getattr__(self, name): if name == recv: name = read return getattr(self.__obj, name) ...and then change: r.recv =

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: It would be a damned shame to slow down the entire language to save code that is intentionally shooting itself in the foot. EVERYONE will pay a cost -- NO ONE will benefit. My two cents. -- nosy: +rhettinger

[issue3668] s* argument parser marker leaks memory

2008-08-29 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Committed in r66057 and r66058. -- resolution: accepted - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3668 ___

[issue3660] reference leaks in 3.0

2008-08-29 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Amaury, I believe the first part of encode-leak.patch is wrong, you should Py_DECREF the bytearray after it has been converted to bytes, not before. Here is an alternate patch. Added file: http://bugs.python.org/file11309/encode-leak2.patch

[issue3729] SystemError on calling len() if __len__() doesn't return an int

2008-08-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Not bad! some remarks though: - It's better to avoid the expensive call to PyErr_Occurred() when possible. Here, an exception is set if (and only if) len==-1. For example, it is enough to add these lines after the __len__() should return

[issue3660] reference leaks in 3.0

2008-08-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Oops, you are right of course. I remove my patch so we don't get confused. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3660 ___

[issue3660] reference leaks in 3.0

2008-08-29 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11285/encode-leak.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3660 ___

[issue3678] Ignored LDFLAGS during linking libpython$(VERSION).so

2008-08-29 Thread Ali Polatel
Changes by Ali Polatel [EMAIL PROTECTED]: -- nosy: +hawking ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3678 ___ ___ Python-bugs-list mailing list

[issue3729] SystemError on calling len() if __len__() doesn't return an int

2008-08-29 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: That is *not* wanted. We had a discussion on the list about changing the return value of the sq_length slot to allow larger lengths to be reported, and while I don't recall why this wasn't done, I do recall that the consensus was that if

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Here are some timings, on winXP, vs2008 release build: # t.py def f(l=range(5000)): for x in l: pass # before the patch python -m timeit -s from t import f f() 1 loops, best of 3: 159 usec per loop # after the patch python

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-08-29 Thread Florian Mayer
Changes by Florian Mayer [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11302/log.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3724 ___ ___

[issue3678] Ignored LDFLAGS during linking libpython$(VERSION).so

2008-08-29 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis [EMAIL PROTECTED] added the comment: I'm confirming that the newer patch also fixes this bug. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3678 ___

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-08-29 Thread Florian Mayer
Changes by Florian Mayer [EMAIL PROTECTED]: Added file: http://bugs.python.org/file11310/log.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3724 ___ ___

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Go for it. There's really no question about fixing possible segfaulters. Was just voicing my displeasure at this sort of exercise. The code has been around since at least 2.2 and hasn't caused the slightest problem. It bugs me to put

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Armin Rigo
Armin Rigo [EMAIL PROTECTED] added the comment: The same approach can be used to segfault many more places. See http://svn.python.org/projects/python/trunk/Lib/test/crashers/iter.py . -- nosy: +arigo ___ Python tracker [EMAIL PROTECTED]

[issue3660] reference leaks in 3.0

2008-08-29 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Ok, after the two patches plus the patch in #3667, I get the following: test_asyncore leaked [84, -84] references, sum=0 test_distutils leaked [141, 142] references, sum=283 test_docxmlrpc leaked [-85, 0] references, sum=-85 test_logging

[issue3297] Python interpreter uses Unicode surrogate pairs only before the pyc is created

2008-08-29 Thread Terry J. Reedy
Terry J. Reedy [EMAIL PROTECTED] added the comment: Just to clarify: Python can be built as UCS2 or UCS4 build (not UTF-16 vs. UTF-32) I recently read most of the Unicode 5 standard and as near as I could tell it no longer uses the term UCS, if it ever did. Chapter 3 has only the following 3

[issue3732] bdist_msi gives a deprecation warning when run with Python 2.6

2008-08-29 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg [EMAIL PROTECTED]: d:\Python26\lib\msilib\__init__.py:5: DeprecationWarning: the sets module is deprecated import sets, os, string, re Should be easy to solve. -- components: Distutils, Library (Lib) keywords: easy messages: 72162 nosy: lemburg

[issue2548] Undetected error in exception handling

2008-08-29 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: The crashers which were deleted in rev58032 should at least have been turned into unittests... well. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2548

[issue3675] Python 2.6 can't read sets pickled with Python 3.0

2008-08-29 Thread Terry J. Reedy
Terry J. Reedy [EMAIL PROTECTED] added the comment: Was it really intended that 3.0 pickles unpickle on 2.6? What about other changes like moving something from one module to another (reduce from built-in to functools), changing all classes to new style (several examples), or adding methods to a

[issue3675] Python 2.6 can't read sets pickled with Python 3.0

2008-08-29 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Was it really intended that 3.0 pickles unpickle on 2.6? He used protocol 2, so he explicitly asked for something inpickleable with 2.6. If it's not the intended behaviour, then protocols 3 should be deprecated. -- nosy: +pitrou

[issue3679] pressing HOME key in IDLE editor ends IDLE

2008-08-29 Thread Terry J. Reedy
Terry J. Reedy [EMAIL PROTECTED] added the comment: Things like this tend to be system specific, and sometimes even machine specific, so please include platform/os with reports, even I you do not think it relevant. In this case, Home works as it should on my WinXP 3.0b2 (which is fortunate

[issue3733] Adding bin and Scripts folder into PATH

2008-08-29 Thread Tarek Ziadé
New submission from Tarek Ziadé [EMAIL PROTECTED]: The windows installer could add two entries in the PATH environment variable. This would make Python.exe and other binaries available from the command prompt without having to change PATH manually. -- components: Installation, Windows

[issue3734] subclassing complex

2008-08-29 Thread Blair
New submission from Blair [EMAIL PROTECTED]: The following is quoted from the Python docs (ref/numeric_types): Note: If the right operand's type is a subclass of the left operand's type and that subclass provides the reflected method for the operation, this method will be called before the left

[issue3735] allow multiple threads to efficiently send the same requests to a processing.Pool without incurring duplicate processing

2008-08-29 Thread David Decotigny
New submission from David Decotigny [EMAIL PROTECTED]: I posted a recipe on ASPN: http://code.activestate.com/recipes/576462/ and Jesse, cheerleader for the inclusion of (multi)processing into python-core, suggested that it could be interesting to add this feature to the next pythons. This

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: This patch fixes Armin's list of crashers for trunk. Looking for others like them. -- nosy: +ajaksu2 versions: +Python 2.6 Added file: http://bugs.python.org/file11311/itercrashers.diff ___ Python

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Daniel Diniz
Changes by Daniel Diniz [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11311/itercrashers.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3720 ___

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Hopefully the right patch this time :/ Added file: http://bugs.python.org/file11312/itercrashers.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3720

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Amaury, if you decide to go forward with this, please clean-up the patches to eliminate common subexpressions. Wonder if there is an alternate solution that keeps the next slot filled with something that raises an Attribute error.

[issue3736] super is a built-in type

2008-08-29 Thread Tarek Ziadé
New submission from Tarek Ziadé [EMAIL PROTECTED]: super is defined as a built-in function http://docs.python.org/dev/library/functions.html but it is a type, shouldn't it be replaced ? -- assignee: georg.brandl components: Documentation messages: 72174 nosy: georg.brandl, tarek

[issue836035] strftime month name is encoded somehow

2008-08-29 Thread Kevin Watters
Changes by Kevin Watters [EMAIL PROTECTED]: -- nosy: +kevinwatters ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue836035 ___ ___ Python-bugs-list

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Terry J. Reedy
Terry J. Reedy [EMAIL PROTECTED] added the comment: I share Raymond's annoyance. The ultimate solution for segfaults is for bad pointer references to be catchable (trappable) the same as math errors are are now. I remember when 1/0 was fatal, not EDOM. Then the interpreter could print a

[issue2548] Undetected error in exception handling

2008-08-29 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Ok, here is a patch which seems to cover all bases. It fixes the present bug, adds tests for the aforementioned ex-crashers, backports the somewhat smarter recursion checking from py3k, and improves the latter by fixing a nasty recursion bug

[issue2548] Undetected error in exception handling

2008-08-29 Thread Antoine Pitrou
Changes by Antoine Pitrou [EMAIL PROTECTED]: -- keywords: +needs review ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2548 ___ ___ Python-bugs-list

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Daniel Diniz
Daniel Diniz [EMAIL PROTECTED] added the comment: Raymond, I think a different solution would be great, as the performance penalty might become nasty in tight loops if we miss some detail. Regarding the possible impact, I hope we can get a better estimate since the other examples of

[issue3736] super is a built-in type

2008-08-29 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Am already working on the docs for super(). -- assignee: georg.brandl - rhettinger nosy: +rhettinger ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3736

[issue2548] Undetected error in exception handling

2008-08-29 Thread Antoine Pitrou
Changes by Antoine Pitrou [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11313/excrecurse.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2548 ___

[issue2548] Undetected error in exception handling

2008-08-29 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Ouch, there were a couple of useless lines in ceval.h. New patch. Added file: http://bugs.python.org/file11314/excrecurse.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2548

[issue3720] segfault in for loop with evil iterator

2008-08-29 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: It's not just performance -- the patch code is grotesque. Lots of code would need to be changed just before the release candidate (usually a bad idea). And the underlying problem doesn't seem to be one that has *ever* affected a real

[issue2548] Undetected error in exception handling

2008-08-29 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: After thinking about it a bit, I think the whole recursion checking thing has gone a bit mad. It probably deserves proper discussion on the mailing-list. In the meantime, I'm downgrading this bug to critical. -- priority: release

[issue3732] bdist_msi gives a deprecation warning when run with Python 2.6

2008-08-29 Thread Hirokazu Yamamoto
Hirokazu Yamamoto [EMAIL PROTECTED] added the comment: This patch will partialy backport r53335 -- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file11315/fix_deprecated_sets.patch ___ Python tracker [EMAIL PROTECTED]

[issue2384] [Py3k] line number is wrong after encoding declaration

2008-08-29 Thread Dwayne Litzenberger
Dwayne Litzenberger [EMAIL PROTECTED] added the comment: Could -*- coding: ascii -*- and other equivalent encodings be fixed, at least, before the release? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2384

<    1   2   3