[issue2263] struct.pack() + numpy int raises SystemError

2008-03-10 Thread Just van Rossum

New submission from Just van Rossum <[EMAIL PROTECTED]>:

struct.pack() raises SystemError when fed a numpy integer in some cases. 
The following was run on MacOSX 10.4, little endian (I can only 
reproduce the error if I specify big endian for the struct format). Not 
sure if this could be a numpy bug.

Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) 
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import struct
>>> import numpy
>>> i = numpy.int16(1)
>>> struct.pack(">B", i)
__main__:1: DeprecationWarning: struct integer overflow masking is 
deprecated
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/struct.
py", line 63, in pack
return o.pack(*args)
SystemError: /Users/ronald/r252/Objects/longobject.c:322: bad argument 
to internal function
>>> struct.pack(">H", i)
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/struct.
py", line 63, in pack
return o.pack(*args)
SystemError: /Users/ronald/r252/Objects/longobject.c:322: bad argument 
to internal function
>>> struct.pack(">h", i)
'\x00\x01'
>>> struct.pack(">b", i)
'\x01'
>>> struct.pack("B", i)
'\x01'
>>> struct.pack("h", i)
'\x01\x00'
>>> numpy.__version__
'1.0.4'
>>>

--
components: Library (Lib)
messages: 63435
nosy: jvr
severity: normal
status: open
title: struct.pack() + numpy int raises SystemError
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue2122] mmap.flush does not check for errors on windows

2008-03-10 Thread Ralf Schmitt

Ralf Schmitt <[EMAIL PROTECTED]> added the comment:

attached is a patch. I hope it is ok to change the semantics a bit. 
They were very strange:
- on unix it raises an exception on errors. otherwise it always returns 0.
- on windows it returns non-zero on success, and returns zero on errors.

Now, flush returns None or raises an Exception.

Added file: http://bugs.python.org/file9645/mmap-flush.txt

__
Tracker <[EMAIL PROTECTED]>

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



[issue2240] setitimer, getitimer wrapper

2008-03-10 Thread Ralf Schmitt

Ralf Schmitt <[EMAIL PROTECTED]> added the comment:

Okay, the patch applies just fine (besides configure, which must be
regenerated). Running the tests however consumes 3 gb of memory.
The range functions must be changed to xrange on trunk. I've also
changed the docs a bit ("new in 2.6").
I didn't change anything related to coding standards (is this an issue
with tabs vs spaces?).
all tests in test_signal work with a patched revision 61332 of trunk, on
a 64 bit linux.

Added file: http://bugs.python.org/file9646/trunk-itimer.txt

__
Tracker <[EMAIL PROTECTED]>

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



[issue2240] setitimer, getitimer wrapper

2008-03-10 Thread Ralf Schmitt

Changes by Ralf Schmitt <[EMAIL PROTECTED]>:


--
versions: +Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue2264] empty specifier for float.__format__ does not always print at least one decimal digit

2008-03-10 Thread Eric Smith

New submission from Eric Smith <[EMAIL PROTECTED]>:

PEP 3101 specifies that the empty format presentation type for float
will always print at least one digit after the decimal point, but it
does not do that if the number is output with an exponent:

works:
>>> format(3.0, '')
'3.0'

fails:
>>> format(3e200, '')
'3e+200'

As currently implemented, the code just maps the empty format specifier
to 'g', and does not add the additional behavior specfied in the PEP.

--
assignee: eric.smith
components: Interpreter Core
messages: 63438
nosy: eric.smith
priority: normal
severity: normal
status: open
title: empty specifier for float.__format__ does not always print at least one 
decimal digit
versions: Python 2.6, Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue1751245] Popen pipe file descriptor leak on OSError in init

2008-03-10 Thread Ralf Schmitt

Changes by Ralf Schmitt <[EMAIL PROTECTED]>:


--
nosy: +schmir
type:  -> resource usage

_
Tracker <[EMAIL PROTECTED]>

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



[issue2262] Helping the compiler avoid memory references in PyEval_EvalFrameEx

2008-03-10 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

Jeffrey> ... but I'm really surprised to see the same tests affected in
Jeffrey> opposite directions. Is that common with pybench and compiler
Jeffrey> changes?

I've no idea.  Marc-André Lemburg would be the person with the most insight
into pybench behavior I think.

Skip

__
Tracker <[EMAIL PROTECTED]>

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



[issue1475] test_popen fails when the directory contains a space

2008-03-10 Thread Joseph Armbruster

Joseph Armbruster <[EMAIL PROTECTED]> added the comment:

Should this issue be linked to 1559298?  It appears to be the same issue
but was opened up earlier and is referencing a different version.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1451466] reading very large files

2008-03-10 Thread Joseph Armbruster

Joseph Armbruster <[EMAIL PROTECTED]> added the comment:

Note: If this issue is related to 1672853, I ran through the test code
provided in the issue recently and it appeared to pass for both the
trunk and 2.5 maint.

_
Tracker <[EMAIL PROTECTED]>

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



[issue2265] A line in the second example of "7.3.5 Examples" in "Python Library Reference" seems to be incorrect.

2008-03-10 Thread Kazuyoshi Furutaka

New submission from Kazuyoshi Furutaka <[EMAIL PROTECTED]>:

The line
destination.add(MHMessage(message))
should read
destination.add(mailbox.MHMessage(message))

--
assignee: georg.brandl
components: Documentation
messages: 63442
nosy: furutaka, georg.brandl
severity: minor
status: open
title: A line in the second example of "7.3.5 Examples" in "Python Library 
Reference" seems to be incorrect.
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue2128] sys.argv is wrong for unicode strings

2008-03-10 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

Here is a patch that redoes the entire argv handling, in terms of
wchar_t. As a side effect, it also changes the sys.path handling to use
wchar_t.

--
keywords: +patch
Added file: http://bugs.python.org/file9647/wchar.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2262] Helping the compiler avoid memory references in PyEval_EvalFrameEx

2008-03-10 Thread Jeffrey Yasskin

Changes by Jeffrey Yasskin <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file9648/elim_mem_refs.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2262] Helping the compiler avoid memory references in PyEval_EvalFrameEx

2008-03-10 Thread Jeffrey Yasskin

Changes by Jeffrey Yasskin <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file9648/elim_mem_refs.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2262] Helping the compiler avoid memory references in PyEval_EvalFrameEx

2008-03-10 Thread Jeffrey Yasskin

Changes by Jeffrey Yasskin <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file9649/elim_mem_refs.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1275] bsddb closing a DB object before all DBCursors using it are closed crashes

2008-03-10 Thread Jesús Cea Avión

Jesús Cea Avión <[EMAIL PROTECTED]> added the comment:

This issue is solved in pybsddb 4.6.1, available in pypi. Python bsddb3
module must be updated and this issue closed as "fixed".

--
nosy: +jcea

__
Tracker <[EMAIL PROTECTED]>

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



[issue2266] Missing documentation about old/new-style classes

2008-03-10 Thread Yinon Ehrlich

New submission from Yinon Ehrlich <[EMAIL PROTECTED]>:

http://docs.python.org/tut/node11.html talks about old/new style
classes. But there is no any explanation what it is. The same for
http://docs.python.org/ref/node33.html
My suggestion: refer to http://wiki.python.org/moin/NewClassVsClassicClass

--
assignee: georg.brandl
components: Documentation
messages: 63445
nosy: Yinon, georg.brandl
severity: minor
status: open
title: Missing documentation about old/new-style classes
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue2266] Missing documentation about old/new-style classes

2008-03-10 Thread Yinon Ehrlich

Changes by Yinon Ehrlich <[EMAIL PROTECTED]>:


__
Tracker <[EMAIL PROTECTED]>

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



[issue1621] Do not assume signed integer overflow behavior

2008-03-10 Thread jan matejek

Changes by jan matejek <[EMAIL PROTECTED]>:


--
nosy: +matejcik

__
Tracker <[EMAIL PROTECTED]>

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



[issue834461] simple bsddb interface potential for deadlock with threads

2008-03-10 Thread Jesús Cea Avión

Changes by Jesús Cea Avión <[EMAIL PROTECTED]>:


--
nosy: +jcea


Tracker <[EMAIL PROTECTED]>


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



[issue1215023] bsddb dbobj.DB.associate doesn't accept dbobj.DB param

2008-03-10 Thread Jesús Cea Avión

Changes by Jesús Cea Avión <[EMAIL PROTECTED]>:


--
nosy: +jcea

_
Tracker <[EMAIL PROTECTED]>

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



[issue1010645] bsddb3 testsuite failure when running more than one time

2008-03-10 Thread Jesús Cea Avión

Changes by Jesús Cea Avión <[EMAIL PROTECTED]>:


--
nosy: +jcea

_
Tracker <[EMAIL PROTECTED]>

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



[issue1149447] bssdb wrapper does not export some low-level functions

2008-03-10 Thread Jesús Cea Avión

Changes by Jesús Cea Avión <[EMAIL PROTECTED]>:


--
nosy: +jcea

_
Tracker <[EMAIL PROTECTED]>

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



[issue2267] datetime.datetime operator methods are not subclass-friendly

2008-03-10 Thread Paul Komkoff

New submission from Paul Komkoff <[EMAIL PROTECTED]>:

The datetime.datetime class overrides some arithmetic operations for it
to be able to add or subtract timedeltas. However, the result of A + B
operation, where A is instance of a subclass of datetime and B is
timedelta instance will be always the instance of base datetime.

This is extremely annoying and requires to override arithmetic operators
and writing a lots of rubbish to replace the datetime base object with
type(self)

--
components: Library (Lib)
messages: 63446
nosy: stingray
severity: normal
status: open
title: datetime.datetime operator methods are not subclass-friendly
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue2268] Fold slice constants

2008-03-10 Thread Alexander Belopolsky

New submission from Alexander Belopolsky <[EMAIL PROTECTED]>:

I am attaching a proof-of-concept patch which would optimize bytecode
generated from constant slices as follows:

Before patch:

>>> dis(lambda:x[1:2:3])
  1   0 LOAD_GLOBAL  0 (x)
  3 LOAD_CONST   0 (1)
  6 LOAD_CONST   1 (2)
  9 LOAD_CONST   2 (3)
 12 BUILD_SLICE  3
 15 BINARY_SUBSCR   
 16 RETURN_VALUE

After the patch:

>>> dis(lambda:x[1:2:3])
  1   0 LOAD_GLOBAL  0 (x) 
  3 LOAD_CONST   3 (slice(1, 2, 3)) 
  6 BINARY_SUBSCR
  7 RETURN_VALUE 

While the peephole optimizer changes are straightforward, the
optimization does not work unless slice objects gain hash and marshal
support.

While I don't see any problem with adding slice marshaling, the idea of
making slices hashable has recently been rejected (see issue1733184) and
I was supporting the rejection myself.

With this patch, however, I would like to reopen the discussion of
hash(slice(..)) issue.

Allowing constant folding for slices may tip the balance towards
allowing hash(slice(..)) assuming that {}[:] can still be prohibited.

One possible approach to this problem would be to emit a new bytecode
instead of BINARY_SUBSCR from slice syntax and have it reject mapping
objects.  This should be easy for objects implemented in C, but for user
defined classes with custom __(get|set)item__ it may not be easy to
distinguish between a mapping and a sequence.  However, I don't much of
a problem for always allowing x[:] for such types (user code can reject
slices if necessary).

If extra bytecode approach is taken, it is likely that d[slice(a,b)]
will end up being supported even if d[a:b] is not.  Some may think it
would be a good feature, though.

A possible advantage of that approach would be a better error message
from an attempt to slice a dictionary. The current "unhashable type"
diagnostic is somewhat cryptic. "Cannot slice a dictionary" would be
much friendlier.

It is possible to work around unhashability of slices and still
implement folding, but the ideas that come to mind such as placing a
hashable subclass of slice into constants seem too artificial.

I am copying the "nosy" list from issue1733184 to start the discussion.

--
components: Interpreter Core
files: const-slice-folding.diff
keywords: patch
messages: 63447
nosy: belopolsky, exarkun, gvanrossum, lpd, rhettinger
severity: normal
status: open
title: Fold slice constants
type: feature request
versions: Python 3.0
Added file: http://bugs.python.org/file9650/const-slice-folding.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2268] Fold slice constants

2008-03-10 Thread Jean-Paul Calderone

Changes by Jean-Paul Calderone <[EMAIL PROTECTED]>:


--
nosy:  -exarkun

__
Tracker <[EMAIL PROTECTED]>

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



[issue2269] Problem reporting non-keyword arg after keyword arg syntax error

2008-03-10 Thread Isaac Morland

New submission from Isaac Morland <[EMAIL PROTECTED]>:

$ cat bug_fine.py 
if True:
max (a='a', 'b')
#elif True:
#   pass
else:
pass
$ python bug_fine.py 
  File "bug_fine.py", line 2
max (a='a', 'b')
SyntaxError: non-keyword arg after keyword arg
$ cat bug_show.py 
if True:
max (a='a', 'b')
elif True:
pass
else:
pass
$ python bug_show.py 
Exception exceptions.SyntaxError: ('non-keyword arg after keyword arg',
2) in 'garbage collection' ignored
Fatal Python error: unexpected exception during garbage collection
Abort trap
$

--
components: Interpreter Core
messages: 63448
nosy: ijmorlan
severity: normal
status: open
title: Problem reporting non-keyword arg after keyword arg syntax error
type: compile error
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue2269] Problem reporting non-keyword arg after keyword arg syntax error

2008-03-10 Thread Isaac Morland

Isaac Morland <[EMAIL PROTECTED]> added the comment:

I should add that the full version information is:

Python 2.5 (r25:51908, Aug 15 2007, 11:38:03) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin

Also, in my actual code (a much larger file, in a project using ll.xist
and other libraries), the error manifests differently:  I get
"TypeError: 'int' object is not iterable" on startup the first time it
loads, then it appears to run subsequent times, but behaves bizarrely. 
Specifically, *none* of the branches of the if statement run (verified
by putting a nonsense symbol after the if statement, and at the
beginning and end of each branch of the if statement; the "no such
symbol" error concerns the one *after* the if statement).  On neither
run is the "non-keyword arg after keyword arg" reported.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2270] Typo on 8.6.2.5 Document Objects page

2008-03-10 Thread T.G.M.

New submission from T.G.M. <[EMAIL PROTECTED]>:

The Python 2.5.2 online docs,
"http://docs.python.org/lib/dom-document-objects.html";
(http://docs.python.org/lib/dom-document-objects.html) has the following
2nd sentence:

Remeber that it inherits properties from Node.

Remeber should be Remember.

--
assignee: georg.brandl
components: Documentation
messages: 63450
nosy: georg.brandl, throw6617
severity: normal
status: open
title: Typo on 8.6.2.5 Document Objects page
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue2269] Problem reporting non-keyword arg after keyword arg syntax error

2008-03-10 Thread Facundo Batista

Facundo Batista <[EMAIL PROTECTED]> added the comment:

Already fixed in the trunk. Thanks for the report!

--
nosy: +facundobatista
resolution:  -> out of date
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue2267] datetime.datetime operator methods are not subclass-friendly

2008-03-10 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

This is trivial to implement (see attached) and IMHO is a good idea.

The next question, however is whether similar changes should be made to 
timedelta arithmetics.  Timedelta case is not so clearcut because of the 
usual dilemma of what the type of a+b should be when a and b are 
instances of two different subclasses of timedelta.

--
keywords: +patch
nosy: +belopolsky
Added file: http://bugs.python.org/file9651/datetime.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2267] datetime.datetime operator methods are not subclass-friendly

2008-03-10 Thread Paul Komkoff

Paul Komkoff <[EMAIL PROTECTED]> added the comment:

I just checked the astimezone method - it also does this.

As with timedelta... well, it's not critical for me now but it worth
thinking about :)

__
Tracker <[EMAIL PROTECTED]>

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



[issue2267] datetime.datetime operator methods are not subclass-friendly

2008-03-10 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Recently, the similar issue1562 "Decimal can't be subclassed useful" was
rejected. In the discussion I found a reference to a former post, which
precisely deals with datetime and timedelta:
http://mail.python.org/pipermail/python-list/2005-January/300791.html

The main argument is that the """base class has no idea what
requirements may exist for invoking a subclass's constructor"""

All python types behave this way: int, float, lists.

--
nosy: +amaury.forgeotdarc
resolution:  -> wont fix
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue2271] msi installs to the incorrect location (C drive)

2008-03-10 Thread Ross

New submission from Ross <[EMAIL PROTECTED]>:

When installing Python using any of the following stand-alone installers:

python-2.5.2.amd64.msi
python-2.5.1.amd64.msi
python-2.5.2.msi

all the files and folders are installed in C:\ instead of C:\Python25\
as specified in the installer.  Creating C:\Python25\ before
installation, changing the folder name, and rebooting the machine did
not solve the problem.  The installation is being performed on Windows
Vista Enterprise 64 bit with an Intel Q6600 processor machine.

--
components: Installation, Windows
messages: 63455
nosy: rossmclendon
severity: normal
status: open
title: msi installs to the incorrect location (C drive)
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue2267] datetime.datetime operator methods are not subclass-friendly

2008-03-10 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

Invoking a subclass's constructor is only an issue when subclass adds 
data members.  In this case, arithmetic methods need to be overridden.  
Note that my patch does not make __add__ and friends invoke subclass' 
constructor, only subclass' tp_alloc.

Existing code already does this in some cases.  For example,

>>> class d(datetime): pass
... 
>>> d.strptime('20080310', '%Y%m%d')
d(2008, 3, 10, 0, 0)
>>> d.now()
d(2008, 3, 10, 20, 27, 6, 303147)

I think date/datetime present a particularly compelling case for 
departing from the general rule.  These classes are minimal by design 
and need to be extended in many applications.

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



[issue1858] Make .pypirc handle multiple servers

2008-03-10 Thread Tarek Ziadé

Tarek Ziadé <[EMAIL PROTECTED]> added the comment:

patch with more tests and explanations...

for the -r option, the standard call without the change would be:

$ python setup.py register -r pypi sdist upload -r pypi

which is very redundant. That's why config.py looks into args.

To avoid collisions, the right thing to do imho would be to have a
"shared_options" dict in the command classes to allow a given command
to get some options from another.

For instance, in the register command, in pseudo-code:

class register:
  shared_options = {'upload': ['repository']} 

and in the upload one:

class upload:
  shared_options = {'register': ['repository']} 

If register and upload are both present in the command line, then the
option is made available to both commands.

For instance, this two lines would provide the repository to the two
commands:

$ python setup.py register -r pypi sdist upload
$ python setup.py register sdist upload -r pypi (preferred way)

But this will be a patch proposition on its own.

Added file: http://bugs.python.org/file9652/distutils.2008.03.11.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2271] msi installs to the incorrect location (C drive)

2008-03-10 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

Please run

msiexec /i  /l*v python.log

Compress the log, and attach it to this report.

--
nosy: +loewis

__
Tracker <[EMAIL PROTECTED]>

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