[issue1737] Windows installer issue (ObjectBrowser.py)

2008-01-08 Thread Dariusz Suchojad
Dariusz Suchojad added the comment: I think we can close the issue (although I seem not be able to do that). The installer works just fine now I've downloaded it using another browser. For future reference - the former one was Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/2007

[issue1760] PEP 341 is not reflected in the documentation

2008-01-08 Thread Yinon Ehrlich
New submission from Yinon Ehrlich: Compare: http://docs.python.org/whatsnew/pep-341.html With: http://docs.python.org/ref/exceptions.html http://docs.python.org/tut/node10.html#SECTION001030 -- components: Documentation messages: 59525 nosy: Yinon severity: minor status:

[issue1761] Bug in re.sub()

2008-01-08 Thread Ravon Jean-Michel
New submission from Ravon Jean-Michel: Here is my source: def truc (): line = ' hi \n' line1 = re.sub('$', 'hello', line) line2 = re.sub('$', 'you', line1) print line2 Here is what I get: >>> trace.truc() hi hello helloyou >>> -- components: Regular Expressions message

[issue932563] logging: need a way to discard Logger objects

2008-01-08 Thread Vinay Sajip
Vinay Sajip added the comment: I've posted a proposal to python-list: you can view via http://groups.google.co.uk/group/comp.lang.python/browse_frm/thread/336eb031c85758fa or http://article.gmane.org/gmane.comp.python.general/553877 Tracker <[EMAIL PROTEC

[issue1761] Bug in re.sub()

2008-01-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: In other words, if I understand correctly: >>> re.sub('$', '#', 'a\nb\nc') 'a\nb\nc#' >>> re.sub('$', '#', 'a\nb\n') 'a\nb#\n#' The first sample is correct, but the second one find two matches, even without the re.MULTILINE option. Is this normal? The doc

[issue1257] atexit errors should result in nonzero exit code

2008-01-08 Thread Titus Brown
Titus Brown added the comment: Please see GHOP patches by [EMAIL PROTECTED], http://code.google.com/p/google-highly-open-participation-psf/issues/detail?id=215 I've attached the Python 2.6 patch here. -- nosy: +titus Added file: http://bugs.python.org/file9104/ghop-215-py2.6-ctb.diff

[issue1743] IDLE fails to launch

2008-01-08 Thread Rich
Rich added the comment: I've been away for a couple of days, but can replicate everything Joakim has reported in my abscence. Deleting/renaming recent-files.lst allows me to launch IDLE (from cmd or Start Menu). Oddly though, if I close IDLE, copy/paste the contents of the old recent-files int

[issue1761] Bug in re.sub()

2008-01-08 Thread Georg Brandl
Georg Brandl added the comment: Fredrik? -- assignee: -> effbot nosy: +effbot, georg.brandl __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-l

[issue1761] Bug in re.sub()

2008-01-08 Thread Fredrik Lundh
Fredrik Lundh added the comment: re.findall has the same behaviour. Without looking at the code, I'm not sure if this is a bug in the code or in the documentation, really. __ Tracker <[EMAIL PROTECTED]> _

[issue1757] Decimal hash depends on current context

2008-01-08 Thread Facundo Batista
Facundo Batista added the comment: Fixed in r59852. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python

[issue1761] Bug in re.sub()

2008-01-08 Thread Facundo Batista
Facundo Batista added the comment: As re provides regular expression matching operations similar to those found in Perl, I tried there to see what happens: """ use Data::Dumper; $a = 'a\nb\nc'; $a =~ s/$/#/; print Dumper($a); $a = 'a\nb\n'; $a =~ s/$/#/; print Dumper($a); """ $ perl pru_sub.p

[issue1124861] subprocess fails on GetStdHandle in interactive GUI

2008-01-08 Thread Daniel Serodio
Daniel Serodio added the comment: I found this bug via this post: http://mail.python.org/pipermail/python-list/2007-April/436275.html And I think 2.5.1 still has this bug. I'm not familiar with Python bugtracker's "ettiquete", should I reopen this bug? -- nosy: +dserodio __

[issue1761] Bug in re.sub()

2008-01-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Careful, Perl strings must be double-quoted for \n to be understood as the newline character: """ use Data::Dumper; $a = "a\nb\nc"; $a =~ s/$/#/; print Dumper($a); $a = "a\nb\n"; $a =~ s/$/#/; print Dumper($a); """ And the output is: $VAR1 = 'a b c#';

[issue1761] Bug in re.sub()

2008-01-08 Thread Georg Brandl
Georg Brandl added the comment: At least, the docs for re.M are consistent with the current behavior. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-l

[issue1137] pyexpat patch for changing buffer_size

2008-01-08 Thread A.M. Kuchling
A.M. Kuchling added the comment: Committed to the trunk in rev. 59853. AchimGaedke: thanks for your contribution! Also, please submit a signed copy of the contributor agreement when you can: see http://www.python.org/psf/contrib/ for details. -- resolution: -> accepted status: open ->

[issue1114] _curses issues on 64-bit big-endian (e.g, AIX)

2008-01-08 Thread A.M. Kuchling
A.M. Kuchling added the comment: Applied to trunk in rev. 59854, and to 25-maint in rev. 59855. Thanks for your bugfix! -- resolution: -> accepted status: open -> closed versions: +Python 2.5, Python 2.6 -Python 2.3 __ Tracker <[EMAIL PROTECTED]>

[issue1623] Implement PEP-3141 for Decimal

2008-01-08 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Yes, making Decimal subclass object instead of Real and Inexact makes it as fast as it used to be. ABCMeta.__instancecheck__ is easy to speed up, but after fixing it, we're still about 25% behind. So here'a version that just registers Decimal as a subclass inste

[issue1182] Paticular decimal mod operation wrongly output NaN.

2008-01-08 Thread Facundo Batista
Facundo Batista added the comment: Decimal was backported to Py2.5, commited in r59859. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing li

[issue1761] Bug in re.sub()

2008-01-08 Thread Guido van Rossum
Guido van Rossum added the comment: So if the input ends in '\n', '$' matches both before and after that character, and two substitutions are made (even though multiline is not set). Seems a bug to me. -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]>

[issue1182] Paticular decimal mod operation wrongly output NaN.

2008-01-08 Thread Facundo Batista
Changes by Facundo Batista: -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1762] Inheriting from ABC slows Decimal down.

2008-01-08 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: I've only verified the behavior on 2.6, but I suspect it's true for both. __ Tracker <[EMAIL PROTECTED]> __ ___ Python

[issue1762] Inheriting from ABC slows Decimal down.

2008-01-08 Thread Christian Heimes
Christian Heimes added the comment: __instancecheck__ contains unnecessary code. If we restrict ABCs to new style classes we could make the function faster: Old: def __instancecheck__(cls, instance): """Override for isinstance(instance, cls).""" return any(cls.__subclasschec

[issue1762] Inheriting from ABC slows Decimal down.

2008-01-08 Thread Jeffrey Yasskin
New submission from Jeffrey Yasskin: Adding numbers.Real to Decimal's base classes almost doubles the time its its test suite takes to run. A profile revealed that a large fraction of that slowdown was in __instancecheck__, but even after optimizing that, it's still about 25% slower. It looks lik

[issue1762] Inheriting from ABC slows Decimal down.

2008-01-08 Thread Christian Heimes
Christian Heimes added the comment: Is this for 2.6 or 3.0? -- nosy: +tiran priority: -> high __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs

[issue1763] Winpath module - easy access to Windows directories like My Documents

2008-01-08 Thread Christian Heimes
New submission from Christian Heimes: The new module "winpath" gives easy access to Windows shell folders like my documents, my files, application data etc. -- components: Library (Lib), Windows files: trunk_winpath.patch keywords: patch messages: 59547 nosy: tiran priority: normal sever

[issue1763] Winpath module - easy access to Windows directories like My Documents

2008-01-08 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: The current 'path' modules such as posixpath and ntpath have functions that operate on a file path. But I see this module more as a way of getting information related to one's profile. So the name 'winpath' may not be a good choice. -- nosy: +dragh

[issue1762] Inheriting from ABC slows Decimal down.

2008-01-08 Thread Guido van Rossum
Guido van Rossum added the comment: What change is responsible for the speedup? The cache check or removing type(instance) from the set? Since type(instance) is usually the same object as instance.__class__, the set will still have only one element (in particular for Decimal this is the case) so

[issue1763] Winpath module - easy access to Windows directories like My Documents

2008-01-08 Thread Christian Heimes
Christian Heimes added the comment: I'm not very good in naming things. I'm open to suggestions :) __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list

[issue1762] Inheriting from ABC slows Decimal down.

2008-01-08 Thread Christian Heimes
Christian Heimes added the comment: The patch implements the rich cmp slots for <, <=, > and >= required for numbers.Real. Added file: http://bugs.python.org/file9107/trunk_decimal_richcmp.patch __ Tracker <[EMAIL PROTECTED]> __

[issue1762] Inheriting from ABC slows Decimal down.

2008-01-08 Thread Christian Heimes
Christian Heimes added the comment: without abc: $ time ./python Lib/test/regrtest.py test_decimal real0m10.113s user0m9.685s sys 0m0.196s with numbers.Real subclass: $ time ./python Lib/test/regrtest.py test_decimal real0m16.232s user0m15.241s sys 0m0.384s Proposed pat

[issue1760] PEP 341 is not reflected in the documentation

2008-01-08 Thread Christian Heimes
Changes by Christian Heimes: -- assignee: -> georg.brandl nosy: +georg.brandl priority: -> normal versions: +Python 2.6 __ Tracker <[EMAIL PROTECTED]> __

[issue1763] Winpath module - easy access to Windows directories like My Documents

2008-01-08 Thread Martin v. Löwis
Martin v. Löwis added the comment: I believe Microsoft advises against looking at the registry to find these things, and advocates the use of SHGetFolder instead: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/apcompat/apcompat/use_the_application_programming_interface_to_locat

[issue1737] Windows installer issue (ObjectBrowser.py)

2008-01-08 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- resolution: -> invalid status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing lis

[issue1743] IDLE fails to launch

2008-01-08 Thread Martin v. Löwis
Martin v. Löwis added the comment: Can anybody provide a complete, reproducible procedure for that bug (rather than reproducible procedures to work around it)? Such a procedure might have to start with installing Python. __ Tracker <[EMAIL PROTECTED]>

[issue1182] Paticular decimal mod operation wrongly output NaN.

2008-01-08 Thread Mark Dickinson
Mark Dickinson added the comment: Unfortunately, I think this backport still breaks hash: bernoulli:~/python_source/release25-maint dickinsm$ ./python.exe Python 2.5.2a0 (release25-maint:59859M, Jan 8 2008, 11:54:53) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin Type "help", "copyrig

[issue1182] Paticular decimal mod operation wrongly output NaN.

2008-01-08 Thread Facundo Batista
Facundo Batista added the comment: Fix it, please. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue1381] cmath is numerically unsound

2008-01-08 Thread Mark Dickinson
Mark Dickinson added the comment: A note to any potential reviewers for this patch (cmath3.patch): I'm especially looking for non-mathematical feedback here, so please don't be put off by the mathematics. Some questions: - there's a new file cmath.ctest containing testcases; should this be

[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2008-01-08 Thread Robin Stocker
Robin Stocker added the comment: Guido: The check was only done for call nodes, not for function definitions. __ Tracker <[EMAIL PROTECTED]> __ ___ Pytho

[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2008-01-08 Thread Robin Stocker
Robin Stocker added the comment: Ok, I checked all the logs and updated the patch. test_collections uses n = 254 now and all tests pass. I left revision 54043 out on purpose, because it fixes Lib/inspect.py and Lib/pydoc.py for both PEP 3102 and 3107, so it should be included in the patch for PE

[issue1761] Bug in re.sub()

2008-01-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: In the previous samples we forgot the /g option needed to match ALL occurrences of the pattern: """ use Data::Dumper; $a = "a\nb\nc"; $a =~ s/$/#/g; print Dumper($a); $a = "a\nb\n"; $a =~ s/$/#/g; print Dumper($a); """ Which now gives the same output as

[issue1182] Paticular decimal mod operation wrongly output NaN.

2008-01-08 Thread Mark Dickinson
Mark Dickinson added the comment: hash fixed in revision 59863. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue1761] Bug in re.sub()

2008-01-08 Thread Guido van Rossum
Guido van Rossum added the comment: Then I'd say, this is the correct semantics, for better or for worse; add an example to the docs, and a test to the test suite, and close this as wont fix. __ Tracker <[EMAIL PROTECTED]> __

[issue1763] Winpath module - easy access to Windows directories like My Documents

2008-01-08 Thread Christian Heimes
Christian Heimes added the comment: Here is a new patch which adds os.path.getshellfolders(). It uses SHGetFolderPathW which is compatible with Windows 2000. I've implemented the API because several of my project need the path to my documents. I've a personal interested in the specific feature.

[issue1182] Paticular decimal mod operation wrongly output NaN.

2008-01-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: If this something missing from Colishaw's test suite, you should submit the result to him so they can include it in the next update. -- nosy: +rhettinger __ Tracker <[EMAIL PROTECTED]>

[issue1381] cmath is numerically unsound

2008-01-08 Thread Mark Dickinson
Mark Dickinson added the comment: Okay: would it be okay for me to move the #ifdef MS_WINDOWS sequence somewhere where it can be used by both mathmodule.c and cmathmodule.c, then? There are replacements for log1p and asinh in the patch, so it shouldn't matter than they're missing on Windows-

[issue1381] cmath is numerically unsound

2008-01-08 Thread Christian Heimes
Christian Heimes added the comment: * I've added a configure test for copysign a while ago. I'm using this constructor for Windows compatibility in mathmodule.c: #ifdef MS_WINDOWS # define copysign _copysign # define HAVE_COPYSIGN 1 #endif #ifdef HAVE_COPYSIGN #endif I know no platform beside

[issue1137] pyexpat patch for changing buffer_size

2008-01-08 Thread Achim Gaedke
Achim Gaedke added the comment: Also the shortend version will bring better performance. Thanks! __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list m

[issue1182] Paticular decimal mod operation wrongly output NaN.

2008-01-08 Thread Mark Dickinson
Mark Dickinson added the comment: I don't think anything's missing from Cowlishaw's test-suite. An old, buggy test (nrmx218) was both renamed (to redx218) and fixed by Cowlishaw. I think Facundo ended up with both tests---so naturally the old, broken test failed. ___

[issue1381] cmath is numerically unsound

2008-01-08 Thread Christian Heimes
Christian Heimes added the comment: It may even be a good idea to move asinh, copysign and log1p to a new file Python/pymath.c and add compensatory implementations of acosh, atanh and expm1, too. The math related code in pyport.h could then be moved to Include/pymath.h. In the past some people ha

[issue1576] [Patch] Working post import hook and lazy modules

2008-01-08 Thread Christian Heimes
Christian Heimes added the comment: The new patch applies against the latest svn revision. Several functions were renamed. Added file: http://bugs.python.org/file9112/py3k_post_import_lazy.patch __ Tracker <[EMAIL PROTECTED]> __

[issue1576] [Patch] Working post import hook and lazy modules

2008-01-08 Thread Christian Heimes
Changes by Christian Heimes: Removed file: http://bugs.python.org/file8909/py3k_post_import_hook3.patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bug

[issue1576] [Patch] Working post import hook and lazy modules

2008-01-08 Thread Christian Heimes
Changes by Christian Heimes: Removed file: http://bugs.python.org/file8914/py3k_post_import_hook4.patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bug

[issue1576] [Patch] Working post import hook and lazy modules

2008-01-08 Thread Christian Heimes
Changes by Christian Heimes: Removed file: http://bugs.python.org/file8928/py3k_post_import_hook_lazy.patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python

[issue1771] Remove cmp parameter to list.sort() and builtin.sorted()

2008-01-08 Thread Guido van Rossum
New submission from Guido van Rossum: We should either change the API so you can pass in a '<' comparator, or get rid of it completely (since key=... takes care of all use cases I can think of). -- messages: 59575 nosy: gvanrossum priority: normal severity: normal status: open title: Rem

[issue1771] Remove cmp parameter to list.sort() and builtin.sorted()

2008-01-08 Thread Guido van Rossum
Changes by Guido van Rossum: -- components: +Interpreter Core __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1683] Thread local storage and PyGILState_* mucked up by os.fork()

2008-01-08 Thread Christian Heimes
Christian Heimes added the comment: Bug day task -- nosy: +tiran priority: -> high versions: -Python 2.4 __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1722] Undocumented urllib functions

2008-01-08 Thread Senthil
Senthil added the comment: > Georg Brandl added the comment: > > There are quite a lot more functions in __all__, more than 10 split* > functions... should they all be documented? > > Also, isn't urlparse meant to do such tasks? I agree. I too feel that not everything in the __all__ list shoul

[issue1771] Remove cmp parameter to list.sort() and builtin.sorted()

2008-01-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: I support removal; however, there is an uncommon corner-case that is well served by __cmp__ where a primary key is sorted ascending and a secondary key is sorted descending -- that case is a PITA with the key= function because you need a way to invert the sen

[issue1771] Remove cmp parameter to list.sort() and builtin.sorted()

2008-01-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Forgot to mention, the easy work-around is to do two consecutive sorts and take advantage of the guaranteed stability: l.sort(key=secondary, reverse=True) l.sort(key=primary) __ Tracker <[EMAIL PROTECTED]>

[issue1772] popen fails when there are two or more pathnames/parameters with spaces

2008-01-08 Thread Stephan Hoermann
New submission from Stephan Hoermann: If commands similar to this (including all quotation marks) '"C:\\Program Files\\test.bat" blah "C:\\Data Files\\test2.txt"' are executed using popen, then the following is returned from stderr "'C:\\Program' is not recognized as an internal or external c

[issue1622] zipfile hangs on certain zip files

2008-01-08 Thread Alan McIntyre
Alan McIntyre added the comment: Here's the first draft of a patch (zipfile-unsigned-fixes.diff) that does a few things: - Interpret fields as unsigned unless required (CRC, etc.) - Corrects reading of ZIP files with large archive comments - Replaces hard-coded structure sizes with module-level

[issue1683] Thread local storage and PyGILState_* mucked up by os.fork()

2008-01-08 Thread Adam Olsen
Changes by Adam Olsen: -- nosy: +rhamphoryncus __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue1682] Move Demo/classes/Rat.py to Lib/rational.py and fix it up.

2008-01-08 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Thanks again for the excellent comments. __init__: good catch. repr(Rational): The rule for repr is "eval(repr(object)) == object". Unfortunately, that doesn't decide between the two formats, since both assume some particular import statements. I picked the on