[issue3021] Lexical exception handlers

2008-06-06 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: I agree, the argument for a syntax error is weak. It's more instinct than anything else. I don't think I'd be able to convince you unless Guido had the same instinct I do. ;) ___ Python tracker <[EMAIL PROTEC

[issue3021] Lexical exception handlers

2008-06-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Ok, it makes sense to have the same behaviour for except and finally blocks then. As for the syntax error, I'm still not convinced. The point of Py3k is to change semantics: people should expect some incompatible changes. Also the previous beh

[issue2912] let platform.uname try harder

2008-06-06 Thread James Thomas
James Thomas <[EMAIL PROTECTED]> added the comment: much handling code already seems to exist under the line except AttributeError: in platform.py (function uname(), lines 1101-1161 platform.py) i'm not too familiar with the Python codebase (i just began developing with Python a few days back) _

[issue2912] let platform.uname try harder

2008-06-06 Thread James Thomas
James Thomas <[EMAIL PROTECTED]> added the comment: i'm looking at the source and there doesn't appear to be a function uname within os.py. are we just considering the uname function in platform.py? ___ Python tracker <[EMAIL PROTECTED]>

[issue2848] Remove mimetools usage from the stdlib

2008-06-06 Thread Humberto Diogenes
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Raymond, thanks for the parser solution! It worked -- just broke some tests because of the nature of FeedParser. While rfc822.Message can read the file and stop at some point in the middle (meaning that self.fp can still be read), FeedPa

[issue2912] let platform.uname try harder

2008-06-06 Thread James Thomas
James Thomas <[EMAIL PROTECTED]> added the comment: I can work on this task. -- nosy: +jjt009 ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3021] Lexical exception handlers

2008-06-06 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: PEP 3134 gives reason to change it. __context__ should be set from whatever exception is "active" from the try/finally, thus it should be the inner block, not the outer except block. This flipping of behaviour, and the general ambiguity, is why

[issue2848] Remove mimetools usage from the stdlib

2008-06-06 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: -1 on the get_header() change. I would like this patch to be as minimal as possible. The new spelling is a bit awkward and it introduces an unnecessary change that could break code. ___ Python tracke

[issue2848] Remove mimetools usage from the stdlib

2008-06-06 Thread Humberto Diogenes
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: As we're moving away from using .getheader() everywhere (file 10538), I think it's a good time to make HTTPResponse conform to PEP8 and define .get_header (with underscore) instead. Added file: http://bugs.python.org/file10541/rename_HT

[issue3056] Simplify the Integral ABC

2008-06-06 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10540/pep2.diff ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3056] Simplify the Integral ABC

2008-06-06 Thread Raymond Hettinger
New submission from Raymond Hettinger <[EMAIL PROTECTED]>: * Reduce Integral to just a single additional abstract method. * Supply the binary operations as mixins instead of abstract methods. * Three argument __pow__ is now optional. * Convert with __int__ instead of __long__. -- assigne

[issue2848] Remove mimetools usage from the stdlib

2008-06-06 Thread Humberto Diogenes
Humberto Diogenes <[EMAIL PROTECTED]> added the comment: Attached a patch to rename all calls to the mimetools-specific .getheader() to .get(), which works on both libraries (mimetools and email.Message). That eases transition without breaking any tests. Added file: http://bugs.python.org/file

[issue2848] Remove mimetools usage from the stdlib

2008-06-06 Thread Humberto Diogenes
Changes by Humberto Diogenes <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10537/email.parser-small_fix.patch ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3021] Lexical exception handlers

2008-06-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: (an unexpected side effect of my patch is that the interpreter has become 5-10% faster under Linux, witnessed with pystone and pybench. I don't know the explanation) ___ Python tracker <[EMAIL PROTECTED]> <

[issue2065] trunk version does not compile with vs8 and vc6

2008-06-06 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10536/ocean.zip ___ Python tracker <[EMAIL PROTECTED]> ___

[issue2065] trunk version does not compile with vs8 and vc6

2008-06-06 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10475/ocean.zip ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3021] Lexical exception handlers

2008-06-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: With or without my patch, bare "raise" inside a "finally" statement raises a "RuntimeError: no active exception to re-raise". (except, of course, when the try/finally is itself enclosed in an except block) That's because a finally block is not

[issue3051] heapq change breaking compatibility

2008-06-06 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Fixed in r63998. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3054] test_disutils fails

2008-06-06 Thread Ronald Oussoren
Changes by Ronald Oussoren <[EMAIL PROTECTED]>: -- components: +Tests -Distutils type: -> behavior ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue1619130] 64-bit Universal Binary build broken

2008-06-06 Thread Ronald Oussoren
Ronald Oussoren <[EMAIL PROTECTED]> added the comment: This should be fixed on the trunk, I've introduced a new configure option that makes it possible to build a 4-way universal build on OSX 10.5 Note that the default build will still be a 2-way universal build that runs on 10.3.9 and later.

[issue3055] test_list on 64-bit platforms

2008-06-06 Thread Ronald Oussoren
New submission from Ronald Oussoren <[EMAIL PROTECTED]>: test_list, and possible other tests, use a lot of memory when Python is build in 64-bit mode. This causes heavy swapping when the machine doesn't have a huge amount of memory. I've filed this bug because an OSX box with 3 GBytes of RAM g

[issue3054] test_disutils fails

2008-06-06 Thread Ronald Oussoren
New submission from Ronald Oussoren <[EMAIL PROTECTED]>: test_distutils fails when you're not building in the root of the source tree. That is: mkdir build cd build ../configure make make check This fails like this: test test_distutils failed -- Traceback (most recent call last):

[issue3052] Mac Modules failing to compile

2008-06-06 Thread Ronald Oussoren
Ronald Oussoren <[EMAIL PROTECTED]> added the comment: This should be fixed in revision 63997. -- resolution: accepted -> fixed status: open -> pending ___ Python tracker <[EMAIL PROTECTED]> _

[issue3049] Some 3k sizeof tests fail

2008-06-06 Thread Martin v. Löwis
Changes by Martin v. Löwis <[EMAIL PROTECTED]>: -- resolution: -> fixed ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list

[issue3051] heapq change breaking compatibility

2008-06-06 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I'll fix this to accommodate both cases, __lt__ and __le__. After trying xx with x=x with x<=y, and may swap the arguments of x==y and x!=y." -- PEP 207 -- priority: -> high ___ Python tracke

[issue3021] Lexical exception handlers

2008-06-06 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: PEP 3134's implicit exception chaining (if accepted) would require your semantic, and your semantic is simpler anyway (even if the implementation is non-trivial), so consider my objections to be dropped. PEP 3134 also proposes implicit chaining d

[issue3051] heapq change breaking compatibility

2008-06-06 Thread Jean-Paul Calderone
Jean-Paul Calderone <[EMAIL PROTECTED]> added the comment: The heapq documentation isn't very clear about its requirements. It does explicitly say that "Heaps are arrays for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k, counting elements from zero." (this in the module refer

[issue3051] heapq change breaking compatibility

2008-06-06 Thread Thomas Herve
Thomas Herve <[EMAIL PROTECTED]> added the comment: Okay then. At least the issue is recorded somewhere, if someone has the same problem. ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3051] heapq change breaking compatibility

2008-06-06 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: It would be better if the Twisted code changed to define all of the rich comparisons instead of relying on an accidental and erroneous implementation detail. The heapq change because other people's code that used __lt__ was breaking. T

[issue3046] Locking should be removed from the new buffer protocol

2008-06-06 Thread Travis Oliphant
Travis Oliphant <[EMAIL PROTECTED]> added the comment: Greg Ewing's comment in the thread that read/write locking is orthogonal to memory-buffer moving is to me the most convincing argument that the locking portion of the getbuffer function call should be removed and potentially placed in a separ

[issue1785] "inspect" gets broken by some descriptors

2008-06-06 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Really don't know why this was assigned to me... -- assignee: facundobatista -> ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3053] test_shutil fails under AIX

2008-06-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Apparently it dates back to this commit: http://hg.pitrou.net/public/cpython/trunk/rev/56254b99fb78 Perhaps someone should ask the original author. But indeed I'm not sure why it's testing such implementation details. The only requirement abo

[issue3026] mmap broken with large files on 64bit system

2008-06-06 Thread Ralf Schmitt
Ralf Schmitt <[EMAIL PROTECTED]> added the comment: the same bug also occurs when computing the md5 of a string larger than 2**32 ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3053] test_shutil fails under AIX

2008-06-06 Thread Raghuram Devarakonda
Raghuram Devarakonda <[EMAIL PROTECTED]> added the comment: Is there any particular reason to assert for failed function at all? This test seems to be for 'onerror' function and the test would be valid even without asserting whether the failed API is 'remove' or 'listdir' etc. Isn't it?

[issue3002] shutil.copyfile blocks indefinitely on named pipes

2008-06-06 Thread Ralf Schmitt
Ralf Schmitt <[EMAIL PROTECTED]> added the comment: if the destination is a named pipe, it will also block (waiting for a reader). ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3053] test_shutil fails under AIX

2008-06-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a working patch. I've also added a try/finally block, because otherwise the following tests in regrtest.py couldn't run properly (@test was unremovable because of wrong permissions). -- keywords: +patch Added file: http://bugs

[issue3053] test_shutil fails under AIX

2008-06-06 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: test_shutil fails with the following error under some AIX 5.3 machine: == FAIL: test_on_error (__main__.TestShutil)

[issue3052] Mac Modules failing to compile

2008-06-06 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: This is 10.4. ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing li

[issue3052] Mac Modules failing to compile

2008-06-06 Thread Ronald Oussoren
Ronald Oussoren <[EMAIL PROTECTED]> added the comment: Is this on OSX 10.4? I'll fix this tonight or tomorrow (the latter would probably result in a commit on sunday morning PST). The fix will look like this: #ifdef __LP64__ FSIORefNum fRefNum; #else SInt16 fRefNum; #en

[issue2337] Backport oct() and hex() to use __index__

2008-06-06 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: This was rejected by Guido. -- resolution: -> rejected status: pending -> closed ___ Python tracker <[EMAIL PROTECTED]> __

[issue3052] Mac Modules failing to compile

2008-06-06 Thread Benjamin Peterson
New submission from Benjamin Peterson <[EMAIL PROTECTED]>: On Mac 10.4 PPC: building 'MacOS' extension gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/temp/python/trunk/./Include -I/temp/python/trunk/./Mac/Include -I. -IInclude -I./Include -I/usr/local/include -

[issue3051] heapq change breaking compatibility

2008-06-06 Thread Georg Brandl
Changes by Georg Brandl <[EMAIL PROTECTED]>: -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3050] Implement PEP 371: multiprocessing module

2008-06-06 Thread Alec Thomas
Changes by Alec Thomas <[EMAIL PROTECTED]>: -- nosy: +alecthomas ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing

[issue3049] Some 3k sizeof tests fail

2008-06-06 Thread Robert Schuppenies
Robert Schuppenies <[EMAIL PROTECTED]> added the comment: Fixed in r63985. -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3050] Implement PEP 371: multiprocessing module

2008-06-06 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- dependencies: +Add PEP 8 compliant aliases to threading module, Thread local storage and PyGILState_* mucked up by os.fork() ___ Python tracker <[EMAIL PROTECTED]>

[issue3051] heapq change breaking compatibility

2008-06-06 Thread Thomas Herve
New submission from Thomas Herve <[EMAIL PROTECTED]>: A recent change in heapq implements it in terms of less-than: http://svn.python.org/view/python/trunk/Modules/_heapqmodule.c?rev=63827&r1=63675&r2=63827 Unfortunately, it breaks usage of heapq when a class only implements __le__ and not __ge_

[issue1185] py3k: Completely remove nb_coerce slot

2008-06-06 Thread Stefan Behnel
Stefan Behnel <[EMAIL PROTECTED]> added the comment: As noted in issue2997, the nb_divide slot (4th field!) has already been removed, so Py2 code has to be adapted anyway. I therefore recommend to just remove all unused fields to get a clean struct for Py3. -- nosy: +scoder

[issue3050] Implement PEP 371: multiprocessing module

2008-06-06 Thread Jesse Noller
New submission from Jesse Noller <[EMAIL PROTECTED]>: This issue tracks the work pending for the inclusion of the pyprocessing module under the multiprocessing name for Python 2.6 and 3.0. If needed, additional tickets will be created for issues which will need to be addressed after initial in

[issue2997] PyNumberMethods has left-over fields in Py3

2008-06-06 Thread Stefan Behnel
Stefan Behnel <[EMAIL PROTECTED]> added the comment: I would accept that if this had been done in all cases, but as I wrote in my first comment, the previously existing slot "nb_divide", which comes *before* the named ones, has already been removed, so there is no way existing Py2 code can work u

[issue2997] PyNumberMethods has left-over fields in Py3

2008-06-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Let me quote a comment from GvR about the similar issue1185: """ Can you redo the patch while keeping the slot *position* (though not the name or type)? The wasted space is minimal (4-8 bytes per type or class object) and it means a lo

[issue1798] Add ctypes calling convention that allows safe access of errno

2008-06-06 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: >> (Another note: the C-level errno and the TLS copy should also be >> synchronized when the C code invokes a Python callback.) > > What I meant is what should occur when a pure Python function is used > as a callback. At this point there is

[issue1798] Add ctypes calling convention that allows safe access of errno

2008-06-06 Thread Armin Rigo
Armin Rigo <[EMAIL PROTECTED]> added the comment: > (Another note: the C-level errno and the TLS copy should also be > synchronized when the C code invokes a Python callback.) What I meant is what should occur when a pure Python function is used as a callback. At this point there is already som

[issue3002] shutil.copyfile blocks indefinitely on named pipes

2008-06-06 Thread Ralf Schmitt
Ralf Schmitt <[EMAIL PROTECTED]> added the comment: The open('fifo', 'rb') already blocks. One has to use os.fdopen with O_NONBLOCK to prevent blocking. fd=os.open('fifo', os.O_RDONLY | os.O_NONBLOCK) and then use stat.S_ISFIFO(os.fstat(fd).st_mode) to check if this is a fifo. Checking with o

[issue3043] Recursion bug in deepcopy

2008-06-06 Thread Georg Brandl
Changes by Georg Brandl <[EMAIL PROTECTED]>: -- resolution: -> wont fix status: open -> pending ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3002] shutil.copyfile blocks indefinitely on named pipes

2008-06-06 Thread Georg Brandl
Changes by Georg Brandl <[EMAIL PROTECTED]>: -- priority: -> critical versions: +Python 3.0 -Python 2.3, Python 2.4 ___ Python tracker <[EMAIL PROTECTED]> ___

[issue2799] Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar()

2008-06-06 Thread Stefan Behnel
Stefan Behnel <[EMAIL PROTECTED]> added the comment: While PyUnicode_AsStringAndSize() may be a better solution if the length is required, PyUnicode_AsString is enough() when it is not required. So I don't buy that argument. Since there are dedicated UTF-8 encoding functions, both functions are p

[issue1798] Add ctypes calling convention that allows safe access of errno

2008-06-06 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: A different patch but implementing the same functionality was now committed as trunk rev 63977. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]>

[issue3047] string object's lstrip function

2008-06-06 Thread Jura
Jura <[EMAIL PROTECTED]> added the comment: print '_element_no_of_hsscch'.lstrip.__doc__ S.lstrip([chars]) -> string or unicode Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is unicode, S will be conver

[issue3046] Locking should be removed from the new buffer protocol

2008-06-06 Thread Stefan Behnel
Stefan Behnel <[EMAIL PROTECTED]> added the comment: Here is a patch that removes all occurrences of the locking protocol from the current py3k branch code base. There are still some issues in memoryobject.c: - there was an occurrence of PyBUF_SHADOW that might have to be handled - memory_getb

[issue2997] PyNumberMethods has left-over fields in Py3

2008-06-06 Thread Stefan Behnel
Stefan Behnel <[EMAIL PROTECTED]> added the comment: :) sorry, that's the problem when you don't have commit rights and leave the changes in your local copy. So this is still an open issue that should be fixed before beta1, thanks. ___ Python tracker <[EMAIL

[issue3049] Some 3k sizeof tests fail

2008-06-06 Thread Martin v. Löwis
New submission from Martin v. Löwis <[EMAIL PROTECTED]>: When merging the sizeof changes to 3k, I had to disable a few tests, marked with XXX. Can you please take a look at why precisely they broke, and change them appropriately? -- assignee: schuppenies messages: 67752 nosy: loewis, sch

[issue3047] string object's lstrip function

2008-06-06 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: What did you expect? Quoting from the docs, """The chars argument is not a prefix; rather, all combinations of its values are stripped: >>> 'www.example.com'.lstrip('cmowz.') 'example.com' """ -- nosy: +georg.brandl resolution: -> in

[issue3046] Locking should be removed from the new buffer protocol

2008-06-06 Thread Stefan Behnel
Stefan Behnel <[EMAIL PROTECTED]> added the comment: As a quick summary of the problems with the current PEP: 1) Many use cases will not require any locking at all, either because they run single-threaded with a short-read/short-write pattern, or because they do not write at all. 2) Write locks

[issue3048] getsizeof incorrect for Unicode strings

2008-06-06 Thread Martin v. Löwis
New submission from Martin v. Löwis <[EMAIL PROTECTED]>: sys.getsizeof doesn't take the actual length of the Unicode string into account: py> sys.getsizeof(u"") 32 [31332 refs] py> sys.getsizeof(u"1"*100) 32 [31332 refs] -- assignee: schuppenies messages: 67750 nosy: loewis, schuppenies

[issue3047] string object's lstrip function

2008-06-06 Thread Jura
New submission from Jura <[EMAIL PROTECTED]>: example from command line: '_element_no_of_hsscch'.lstrip('_element_') 'o_of_hsscch' '_element_o_of_hsscch'.lstrip('_element_') 'o_of_hsscch' -- components: Interpreter Core messages: 67748 nosy: jsostok severity: normal status: open title: