[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/20071030 SeaMonkey/1.1.6

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1737
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
messages: 59526
nosy: jmravon
severity: normal
status: open
title: Bug in re.sub()
type: behavior
versions: Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1761
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 PROTECTED]
http://bugs.python.org/issue932563

___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 docs say: 
 '$' Matches the end of the string or just before the newline at 
 the end of the string [...]
It seems that it matches BOTH the end of the string AND just before the
newline at the end of the string.

--
nosy: +amaury.forgeotdarc

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1761
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1257
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 into the new one, and then restart IDLE, it still works.
Another thing I noticed, after launching IDLE from the Command Prompt, 
is that I get this error (while IDLE is still running and I haven't 
done anything with it yet):
Traceback (most recent call last): File [...]\idlelib\run.py, line 
82, in main exit()
File [...]\idlelib\run.py, line 208, in exit del sys.exitfunc
AttributeError: exitfunc

Is that normal?

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1743
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1757
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.pl
$VAR1 = 'a\\nb\\nc#';
$VAR1 = 'a\\nb\\n#';

--
nosy: +facundobatista

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1761
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1124861
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1761
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1114
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 instead of having it inherit.

I removed __le__ and __lt__ too, since, without subclassing
numbers.Real, nothing requires them to exist, and the behavior's the same.

Added file: 
http://bugs.python.org/file9105/decimal-3141-just-trunc-registered.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1623
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1182
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1761
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1182
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1762
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.__subclasscheck__(c)
   for c in {instance.__class__, type(instance)})
New:

def __instancecheck__(cls, instance):
Override for isinstance(instance, cls).
# safe a function call for common case
if instance.__class__ in cls._abc_cache:
return True
return cls.__subclasscheck__(instance.__class__)

--
assignee:  - gvanrossum
nosy: +gvanrossum

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1762
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
severity: normal
status: open
title: Winpath module - easy access to Windows directories like My Documents
type: rfe
versions: Python 2.6
Added file: http://bugs.python.org/file9106/trunk_winpath.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1763
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: +draghuram

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1763
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1762
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 patch:
$ time ./python Lib/test/regrtest.py  test_decimal
real0m11.128s
user0m9.533s
sys 0m0.260s

Only with if instance.__class__ in cls._abc_cache: return True
$ time ./python Lib/test/regrtest.py  test_decimal
real0m11.201s
user0m10.345s
sys 0m0.292s

Wow, __instancecheck__ must be called a *lot* of times.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1762
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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_locate_special_folders.asp

As for naming things: I guess an object ShellFolders in ntpath might
work fine, with (computed) attributes Desktop, Documents, etc (according
to the FOLDERID_ symbolic constants of the API).

OTOH, this is entirely ad-hoc, as tons of other Windows API is *not*
directly exposed to Python, so it's questionable why this one
specifically deserves being supported.

The patch has no documentation.

--
nosy: +loewis

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1763
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1737
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1743
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, copyright, credits or license for more information.
 from decimal import *
 x = Decimal(1.634E100)
 hash(x) == hash(int(x))
False

Do we really want to go from a slow-but-working Decimal.__hash__ in Python 
2.5.1 to a fast-but-
broken hash in Python 2.5.2?

I can fix this (it's a 1-line change), and reinstate the extra hash tests, if 
you like.  Or I can 
post a patch if you prefer.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1182
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1182
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 put 
directly into Lib/test (where it is right now), or is there a better place.  Is 
the name of this file reasonable?

- is the new stuff in pyport.h (checks for _copysign and copysign, and 
automatic 
renaming of _copysign to copysign) okay?  Should it be in cmathmodule.c instead?

- is the code in test_cmath that looks for the testcase file okay?

And it would be really great if someone with access to a Windows box could just 
verify that the tests pass with this patch applied;  I've only tested it on OS 
X 
and Linux.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1381
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1745
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 PEP 3107.

Added file: 
http://bugs.python.org/file9108/backport-keyword-only-arguments-full.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1745
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 Python:

$VAR1 = 'a
b
c#';
$VAR1 = 'a
b#
#';

Perl is too difficult for us ;-)

What shall we do?
- mark the issue as invalid
- diverge from Perl regular expressions
- file a bug in the PCRE issue tracker
And in every case: add these samples to the test suite.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1761
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1182
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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. It may
also be required for a new, user specific site-package directory. The
feature is currently being discussed on the python-dev list.

Added file: http://bugs.python.org/file9111/trunk_os_getshellfolders.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1763
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1182
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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---it might mean that the accuracy 
of some of the functions is slightly reduced on Windows, though.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1381
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 besides Windows with a _copysign method. You don't
have to add tests for _copysign for Windows. You may want to add the
code to PC/pyconfig.h and define HAVE_COPYSIGN there.

* test_file = testdir + os.sep + 'cmath.ctest
  make that:
  test_file = os.path.join(testdir, 'cmath.ctest')

* Windows doesn't have log1p, the hyperbolic area functions (asinh) and
some other functions, too. IIRC Windows does only implement the Bessel
functions of 1st and 2nd kind but non of the other C99 math functions.

--
nosy: +tiran

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1381
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1182
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1576
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1576
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1576
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1576
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: Remove cmp parameter to list.sort() and builtin.sorted()
versions: Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1771
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1771
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1683
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 should be
documented. And in this specific case of splithost, it is more appropriate for
the user to use urlparse.

--
nosy: +orsenthil

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1722
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 sense of the reversed
input (there are tricks for this but they are obscure).

--
nosy: +rhettinger

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1771
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1771
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
command,\noperable program or batch file.\n. No use of quotation has 
been able to fix this. As soon as there is more than one pair of 
quotations inside the command string popen will not handle the command 
correctly.

--
components: Library (Lib), Windows
messages: 59580
nosy: shoermann
severity: major
status: open
title: popen fails when there are two or more pathnames/parameters with spaces
type: behavior
versions: Python 2.4, Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1772
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 variables
(calculated using struct.calcsize)
- When writing a file in ZipFile.close(), if the ZipFile instance has a
comment value, this value is now written as the archive comment
- Renamed some of the module variables to better match the names used in
the ZIP file spec
- General cleanup  addition of comments to (hopefully) make the code a
little easier to follow

Test  doc changes are included,  this code currently passes regression
test suite with -uall on OS X.

Added file: http://bugs.python.org/file9113/zipfile-unsigned-fixes.diff

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1622
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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]
http://bugs.python.org/issue1683
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 one more likely
to be unique, and I assume Decimal picked the shorter one. I can go
either way.

_gcd's sign: It's a happy accident for me. Possibly Sjoerd Mullender
designed it that way. I've added a comment and a test.

__ceil__: I like that implementation better.

2-argument round: Fixed and tested.

equality: Very good point. I've stolen the sandbox code and added
Rational.from_float() using it. I think I also need to make this change
to the comparisons.

hashing: oops, yes these should be hashable. Decimal cheats by comparing
!= to even floats that it's equal to, so I'm going to assume that they
also want Rational(5,2) != Decimal('2.5').

The new patch is against 2.6.

--
keywords: +patch
Added file: http://bugs.python.org/file9114/rational.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1682
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com