[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-03-14 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: Removed file: http://bugs.python.org/file13283/half-baked-not-for-real-use.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5237 ___

[issue5487] Parts of Tkinter missing (but not when running from IDLE)

2009-03-14 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Why do you think this is a bug? You need to import tkinter.messagebox explicitly for your program to be correct. That you could do without inside IDLE is only because IDLE had already imported that module. Closing as won't fix. --

[issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone

2009-03-14 Thread Mart Sõmermaa
Mart Sõmermaa m...@mrts.pri.ee added the comment: This is the 2.6 version. What about the 3.0 version in http://docs.python.org/3.0/reference/datamodel.html#object.__lt__ needs to be updated? When functools.total_ordering (whether it lands in functools is open) lands that section should be

[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-14 Thread Rudd-O
Rudd-O rud...@rudd-o.com added the comment: More info: From my wicked noarch RPM compiled in an i386 machine, installed into my 64 bit centos (same OS): [rud...@tobey ~]$ python Python 2.4.5 (#1, Mar 13 2009, 12:13:36) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2 Type help, copyright,

[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-14 Thread Rudd-O
Rudd-O rud...@rudd-o.com added the comment: apparently, /usr/lib/python2.4/site-packages IS in the sys.path, which would seem to indicate that python would actually load pure python modules from there. Which means that the only fixes that need to go within distutils would be: 1. a fix so in

[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-14 Thread Rudd-O
Rudd-O rud...@rudd-o.com added the comment: last comment, first line, I should amend it to say that even in 64bit arches, the /usr/lib (NOT ilb64) sitepackages dir is available. I would have to actually try this on the packages that I have, see how i fare. --

[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-14 Thread Rudd-O
Rudd-O rud...@rudd-o.com added the comment: FYI: In RPM, the correct dependency to require a particulr python minor version is: python(abi) = 2.X where X is the minor version. -- ___ Python tracker rep...@bugs.python.org

[issue1568] PATCH: Armin's attribute lookup caching for 3.0

2009-03-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I'm not sure this should be closed. According to Neil (see above) the implementation could be simpler in 3.0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1568

[issue4281] Idle - incorrectly displaying a character (Latin capital letter sharp s)

2009-03-14 Thread Vlastimil Brom
Vlastimil Brom vlastimil.b...@gmail.com added the comment: I just wanted to confirm, that there isn't a bug in idle nor tk, but somwhere in my istalled fonts. Now while testing python 3.1a1, when I also have a font containing ẞ LATIN CAPITAL LETTER SHARP S (DejaVu), it's more clear. Printing

[issue5463] Compiler warning get_ulong is never used 3.x

2009-03-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: The latest patch looks good to me, and results in a much cleaner looking _struct.c. Thank you! One worry: the issue 4228 discussion suggests that the zipfile module still relies on the deprecated wrapping. I think this needs to be

[issue1568] PATCH: Armin's attribute lookup caching for 3.0

2009-03-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, reopening and retargetting to 3.1 in case someone wants to work on it. -- resolution: fixed - accepted stage: - patch review status: closed - open type: feature request - performance versions: +Python 3.1 -Python 3.0

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-03-14 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Committed: r70364 (trunk) r70366 (py3k) The docs still need updating. If anyone with more knowledge of the documentation system than I have would like to tackle those, please feel free! -- priority: - high resolution: - accepted

[issue4228] struct.pack('L', -1)

2009-03-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Was zipfile ever fixed to avoid this deprecated behaviour? If not, is the fix fairly trivial? It would be nice to be able to finally turn these struct deprecation warnings into errors in Python 3.1 and/or Python 2.7. -- nosy:

[issue1714448] if something as x:

2009-03-14 Thread Jervis Whitley
Jervis Whitley jervi...@gmail.com added the comment: Hi, I like this idea. I've put together a short patch that will implement inline assignment. if f() - name: use(name) or more powerfully: if f() - name == 'spam': usespam(name) the old syntax if something as x: is still available

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-03-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: First draft of patch attached. Limitations of this version of the patch: - includes some unrelated marshal.c changes (improved error messages) - no tests of the new functionality - contextlib not changed yet - no documentation changes The new

[issue1143] Update to latest ElementTree in Python 2.7

2009-03-14 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Well, sure, but I'm not going to do it. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1143 ___

[issue1143] Update to latest ElementTree in Python 2.7

2009-03-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I was silently suggesting that you could add it to the release PEP :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1143 ___

[issue1143] Update to latest ElementTree in Python 2.7

2009-03-14 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2009/3/14 Antoine Pitrou rep...@bugs.python.org: Antoine Pitrou pit...@free.fr added the comment: I was silently suggesting that you could add it to the release PEP :-) Wow, I'm really not getting the subtle hints today. --

[issue4688] GC optimization: don't track simple tuples and dicts

2009-03-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file12387/tupleopts.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4688 ___

[issue4688] GC optimization: don't track simple tuples and dicts

2009-03-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file12389/dictopts2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4688 ___

[issue4688] GC optimization: don't track simple tuples and dicts

2009-03-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file12396/tupleopts-alt.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4688 ___

[issue4688] GC optimization: don't track simple tuples and dicts

2009-03-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file12397/tuple+dictopts-alt.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4688 ___

[issue4688] GC optimization: don't track simple tuples and dicts

2009-03-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a new patch against trunk. -- Added file: http://bugs.python.org/file13331/containeropts.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4688

[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2009-03-14 Thread Rudd-O
Rudd-O rud...@rudd-o.com added the comment: Apropos this bug, the issues are fleshed out here: http://rudd-o.com/new-projects/python-improvements/how-to-slash-man-years-from-the-process-of-building-rpms-out-of-python-modules -- ___ Python tracker

[issue4688] GC optimization: don't track simple tuples and dicts

2009-03-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a benchmark ripped from the Computer Language Shootout (http://shootout.alioth.debian.org). Running binary_trees.py 18 takes the following time: - without patch: 330s. - with patch:201s. (40% speedup) - with GC disabled : 165s.

[issue5488] nb_inplace_divide slot is missing in docs

2009-03-14 Thread Lorenz Quack
New submission from Lorenz Quack d...@amberfisharts.com: http://docs.python.org/c-api/typeobj.html#PyNumberMethods lists the slots in the PyNumberMethods struct used to implement the Number Protocol for extension types. The entry for binaryfunc nb_inplace_divide; is missing from this listing.

[issue5489] Broken DLL

2009-03-14 Thread JCoder
New submission from JCoder bcookma...@gmail.com: The windows installer for Python 2.6 failed to install Python on Windows ME because a DLL required for installation could not be run. -- components: Installation messages: 83596 nosy: JCoder severity: normal status: open title: Broken

[issue2874] Remove use of the stat module in the stdlib

2009-03-14 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: We never came to an agreement on how to handle this so it's just been sitting here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2874 ___

[issue5489] Broken DLL

2009-03-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: The support for Win9x,Me,NT4 was dropped from python2.6. See http://www.python.org/dev/peps/pep-0011/ -- nosy: +ocean-city resolution: - wont fix status: open - closed ___ Python

[issue5490] Broken DLL

2009-03-14 Thread JCoder
New submission from JCoder bcookma...@gmail.com: When I try to install Python 2.6 on Windows ME, I get an error message saying that a DLL file needed to install it cannot be opened. By the way, I just posted this message, and apparantly, it disappeared. -- components: Installation

[issue5490] Broken DLL

2009-03-14 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is a duplicate of issue 5490. -- nosy: +loewis resolution: - duplicate status: open - closed superseder: - Broken DLL ___ Python tracker rep...@bugs.python.org

[issue1700507] Carbon.Scrap.PutScrapFlavor

2009-03-14 Thread Garrett Cooper
Garrett Cooper yaneg...@gmail.com added the comment: I'm confirming this issue on Intel / Leopard with python 2.5 (system python), 2.5 (macports) and 2.6 (macports). PPC / Tiger with python 2.3 (system python), 2.5 (macports) and 2.6 (macports) just errors out with: MacOS.Error: (-4960,

[issue1700507] Carbon.Scrap.PutScrapFlavor

2009-03-14 Thread Garrett Cooper
Garrett Cooper yaneg...@gmail.com added the comment: The failure testcase that dingus9 provided is: import Carbon.Scrap as Scrap scrap = Scrap.GetCurrentScrap() scrap.GetScrapFlavorData('TEXT') -- ___ Python tracker rep...@bugs.python.org

[issue1700507] Carbon.Scrap.PutScrapFlavor

2009-03-14 Thread Garrett Cooper
Changes by Garrett Cooper yaneg...@gmail.com: -- versions: +Python 2.4, Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1700507 ___ ___

[issue1700507] Carbon.Scrap.PutScrapFlavor

2009-03-14 Thread Garrett Cooper
Changes by Garrett Cooper yaneg...@gmail.com: -- versions: -Python 2.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1700507 ___ ___

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-03-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Either Brandl or Peterson can and typically will change the .rst source if given the exact new text. For me to write that, I need to know the grammar you actually implemented. Did you, in essence, simply change field_name::=

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-03-14 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I implemented this one: field_name::= (identifier | integer | ) (. attribute_name | [ element_index ])* Which I would have written as: field_name::= (identifier | integer)? (. attribute_name | [ element_index ])* Not that it

[issue2116] weakref copy module interaction

2009-03-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Should a deepcopy of a weakref return the same weakref, or a weakref to a new copied object? Also, what about the optional callback? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue2116] weakref copy module interaction

2009-03-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Hmm, forget that question. If we deepcopy the weakref target, it will be destroyed just afterwards, making the deepcopied weakref useless. -- ___ Python tracker rep...@bugs.python.org

[issue2116] weakref copy module interaction

2009-03-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a patch providing proper copy and deepcopy support, including for weak dicts (the Proxy type is unsupported, though). -- Added file: http://bugs.python.org/file13334/issue2116.patch ___ Python

[issue1714448] if something as x:

2009-03-14 Thread Steven D'Aprano
Steven D'Aprano st...@pearwood.info added the comment: Regarding the proposed syntax: if (f() == 'spam') - name: newname = name.replace('p', 'h') Surely that should assign the *bool* result of comparing f() with 'spam' to name? Doing anything else is opening the door to a world of pain.

[issue1714448] if something as x:

2009-03-14 Thread Jervis Whitley
Jervis Whitley jervi...@gmail.com added the comment: If we allow this, how many of the following will be allowed? if expr as name: block while expr as name: block expr as name # alternative to name = expr This patch implements your final point: expr as name (albeit with a nominal '-'

[issue2116] weakref copy module interaction

2009-03-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Updated patch so that copied weakdicts are decoupled (adding an item to the copy doesn't mutate the original). -- Added file: http://bugs.python.org/file13335/issue2116-2.patch ___ Python tracker

[issue1714448] if something as x:

2009-03-14 Thread Jervis Whitley
Jervis Whitley jervi...@gmail.com added the comment: Regarding the proposed syntax: if (f() == 'spam') - name: newname = name.replace('p', 'h') Surely that should assign the *bool* result of comparing f() with 'spam' to name? Doing anything else is opening the door to a world of

[issue1714448] if something as x:

2009-03-14 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: At the moment binding occurs either right-to-left with =, eg. x = y where x is the new name, or left-to-right, eg. import x as y where y is the new name. If the order is to be right-to-left then using as seems to be the

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-03-14 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: Removed file: http://bugs.python.org/file13330/pep377_v1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5251 ___

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-03-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Removed first draft of patch - it was fundamentally flawed (it didn't clean up the stack properly when the statement body was skipped) -- ___ Python tracker rep...@bugs.python.org

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-03-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Second draft attached, this time with tests and sans segmentation faults :) Limitations of this version of the patch: - still includes some unrelated marshal.c changes (improved error messages) - no documentation changes yet -- Added

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-03-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Note that the semantics in the current patch aren't quite correct, since the __exit__ attribute is retrieved inside the scope of the outer try/except block. Updated patch with the correct semantics coming soon. --

[issue1714448] if something as x:

2009-03-14 Thread Steven D'Aprano
Steven D'Aprano st...@pearwood.info added the comment: Matthew suggested ~= instead of - or as. I dislike this because ~= first makes me think of approximately equal to, and then it makes me think of augmented assignment, and only then do I remember that although ~ is used in Python for

[issue5491] Clarify contextlib.nested semantics

2009-03-14 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: Current doc example: with nested(A, B, C) as (X, Y, Z): do_something() with A as X: with B as Y: with C as Z: do_something() Recommended docs change: with nested(A(), B(), C()) as (X, Y, Z): do_something()