[issue1326] internal zipimport.zipimporter feature untested

2008-01-15 Thread Brett Cannon

Brett Cannon added the comment:

And if you want more ideas for tests, I implemented my own tests for my
pure Python implementation of zipimport. They can be found in the
sandbox at import_in_py/zipimport_/tests.py .

--
nosy: +brett.cannon

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



[issue1830] pygettext.py syntax error

2008-01-15 Thread Peter Harris

New submission from Peter Harris:

Tools/i18n/pygettext.py contains a syntax error.

On line 665,  there is an old u'' string for testing unicode on pre-3.0
python.

It should be OK to remove it.

--
components: Demos and Tools
messages: 59961
nosy: scav
severity: normal
status: open
title: pygettext.py syntax error
type: crash
versions: Python 3.0

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



[issue1830] pygettext.py py3k errors

2008-01-15 Thread Peter Harris

Peter Harris added the comment:

Also, a couple of instances of assuming dict.keys() is a list, and
trying to use .sort() on them.

Patch attached for both issues.

--
title: pygettext.py syntax error - pygettext.py py3k errors
Added file: http://bugs.python.org/file9173/pygettext.diff

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



[issue1793] ctypes.util.find_msvcrt() function

2008-01-15 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

I found the code I wrote some time ago for the same purpose:
(in pypy, which uses ctypes a lot)

import sys
if sys.platform == 'win32':
# Parses sys.version and deduces the version of the compiler
import distutils.msvccompiler
version = distutils.msvccompiler.get_build_version()
if version is None:
# This logic works with official builds of Python.
if sys.version_info  (2, 4):
clibname = 'msvcrt'
else:
clibname = 'msvcr71'
else:
if version = 6:
clibname = 'msvcrt'
else:
clibname = 'msvcr%d' % (version * 10)

# If python was built with in debug mode
import imp
if imp.get_suffixes()[0][0] == '_d.pyd':
clibname += 'd'

standard_c_lib = ctypes.cdll.LoadLibrary(clibname+'.dll')

This code works on all pythons I have on my machine: official builds,
custom builds (relase/debug) with several MS compilers...
I did not test it with other compiled vendors (mingw32...).

But to me this seems more robust than a text search in the executable.

--
nosy: +amaury.forgeotdarc

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



[issue1826] operator.attrgetter() should accept dotted attribute paths

2008-01-15 Thread Scott Dial

Scott Dial added the comment:

Mea culpa, the original patch I attached here has an obvious duplication
of code in test_operator.py. I've attached an updated patch to make life
easier on the commiter.

Added file: http://bugs.python.org/file9175/getattrchaser.diff

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



[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Armin Rigo

Changes by Armin Rigo:


--
type:  - behavior

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



[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Armin Rigo

New submission from Armin Rigo:

The constructor of ctypes structures should probably not silently accept
the bogus arguments shown in the attached example.

--
components: Extension Modules
files: bogus_args.py
messages: 59964
nosy: arigo, cfbolz, fijal
severity: normal
status: open
title: ctypes.Structure constructor arguments
versions: Python 2.6
Added file: http://bugs.python.org/file9174/bogus_args.py

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



[issue1296] optparse's OptionGroup not described

2008-01-15 Thread A.M. Kuchling

Changes by A.M. Kuchling:


--
keywords: +easy

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



[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

What about PyArg_ParseTupleAndKeywords()?

--
nosy: +amaury.forgeotdarc

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



[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller

Thomas Heller added the comment:

This would require to build the 'char *format' string at runtime,
the 'char *keywords[]' array too, and pass a variable number of arguments
into the call.

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



[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller

Thomas Heller added the comment:

Do you have any idea how this could be implemented?

--
nosy: +theller

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



[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller

Thomas Heller added the comment:

Oops, uploaded the wrong file.

Added file: http://bugs.python.org/file9177/ctypes-struct.patch

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



[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller

Changes by Thomas Heller:


Removed file: http://bugs.python.org/file9176/ctypes-struct.patch

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



[issue1294] Management of KeyboardInterrupt in cmd.py

2008-01-15 Thread Raghuram Devarakonda

Raghuram Devarakonda added the comment:

Ok. BTW, can I get tracker permissions? I will try to check old bugs to
update their information and if required, close them.

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



[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Armin Rigo

Armin Rigo added the comment:

The pure Python implementation we just wrote in PyPy is:

for name, arg in zip(names, args):
if name in kwds:
raise TypeError(duplicate value for argument %r % (
name,))
self.__setattr__(name, arg)
for name, arg in kwds.items():
self.__setattr__(name, arg)

It's the same logic as in _ctypes.c:Struct_init(), where you can add the
C equivalent of if name in kwds after getting the name.

--
keywords: +easy

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



[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller

Thomas Heller added the comment:

Yes, I came up with a similar solution in the meantime; see the attached
patch.

Added file: http://bugs.python.org/file9176/ctypes-struct.patch

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



[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Armin Rigo

Armin Rigo added the comment:

The patch is missing Py_DECREF(name).  Also, I'd raise TypeError
instead of ValueError, just like function calls do in a similar
situation.

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



[issue1835] Update version number in __init__.py

2008-01-15 Thread Jacques Lemire

New submission from Jacques Lemire:

In the distutils directory the file __init__.py is not updated to 3.0.

--
components: Distutils
messages: 59974
nosy: jlp
severity: minor
status: open
title: Update version number in __init__.py
type: behavior
versions: Python 3.0

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



[issue1830] pygettext.py py3k errors

2008-01-15 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks!
Committed revision 59979.

--
nosy: +gvanrossum
resolution:  - accepted
status: open - closed

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



[issue1294] Management of KeyboardInterrupt in cmd.py

2008-01-15 Thread Guido van Rossum

Guido van Rossum added the comment:

I've added developer status to your username. Let me know if it doesn't
work.

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



[issue1835] Update version number in __init__.py

2008-01-15 Thread Guido van Rossum

Guido van Rossum added the comment:

The comment indicates it's not automatic that the version number follows
the Python release number.

Assigning to MAL who wants to coordinated this according to that same
comment.

--
assignee:  - lemburg
keywords: +easy
nosy: +gvanrossum, lemburg
priority:  - low
versions: +Python 2.6

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



[issue1835] Update version number in __init__.py

2008-01-15 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

The version number should only be bumped for major enhancements to
distutils or backwards incompatible changes.

Have there been any such changes ?

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



[issue1786] pdb should set stdin+stdout around exec call

2008-01-15 Thread Guido van Rossum

Guido van Rossum added the comment:

Committed revision 59984 (2.6).
Decided not to backport this to 2.5.

--
resolution:  - fixed
status: open - closed
versions:  -Python 2.5

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



[issue1294] Management of KeyboardInterrupt in cmd.py

2008-01-15 Thread Raghuram Devarakonda

Raghuram Devarakonda added the comment:

 I've added developer status to your username. Let me know if it doesn't
 work.

It does. Thanks.

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



[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller

Thomas Heller added the comment:

Ok, added the missing Py_DECREF, changed to TypeError, and added a test.

Added file: http://bugs.python.org/file9178/ctypes-struct.patch

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



[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller

Changes by Thomas Heller:


Removed file: http://bugs.python.org/file9177/ctypes-struct.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1831
__
___
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-15 Thread Mark Dickinson

Mark Dickinson added the comment:

 Inexact is saying that one thing could be ==3 and the other ==0, so I
 think it's correct.

You're right, of course :)

__
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



[issue1836] 'weekly' rotating logging file rotation incorrect

2008-01-15 Thread Kathryn M Kowalski

New submission from Kathryn M Kowalski:

Log file did not 'rotate' on day requested.
Fixed code in Lib/logging/handlers.py class TimedRotatingFileHandler
Compare excerpt of my fix below to the original

# Case 2) The day to rollover is further in the interval (i.e., today is
# day 2 (Wednesday) and rollover is on day 6 (Sunday).  Days to
# next rollover is simply 6 - 2, or 4.
# Case 3) The day to rollover is behind us in the interval (i.e., today
# is day 5 (Saturday) and rollover is on day 3 (Thursday).
# Days to rollover is 6 - 5 + 3 + 1, or 5.  In this case, it's 
the
# number of days left in the current week (1) plus the number
# of days in the next week until the rollover day (4).
if when.startswith('W'):
   day = t[6] # 0 is Monday
   if self.dayOfWeek  day:
   daysToWait = (self.dayOfWeek - day)
   self.rolloverAt = self.rolloverAt + (daysToWait * (60 * 60 * 24))
   if self.dayOfWeek  day:
   daysToWait = (6 - day) + self.dayOfWeek + 1

--
components: Library (Lib)
messages: 59983
nosy: kmk
severity: normal
status: open
title: 'weekly' rotating logging file rotation incorrect
type: behavior
versions: Python 2.5

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



[issue1837] Add Queue.LifoQueue and Queue.PriorityQueue

2008-01-15 Thread Raymond Hettinger

New submission from Raymond Hettinger:

Rather than just documenting that this can be done, it is better to
simply provide working implementations that show exactly how to subclass
the Queue module.  This also lets users easily select or switch between
the most appropriate structure.  Since API is the same, the learning
curve is near zero.

If accepted, will add a full set of tests.

--
assignee: gvanrossum
components: Library (Lib)
files: more_queues.diff
keywords: patch
messages: 59984
nosy: gvanrossum, rhettinger
severity: normal
status: open
title: Add Queue.LifoQueue and Queue.PriorityQueue
type: rfe
versions: Python 2.6
Added file: http://bugs.python.org/file9179/more_queues.diff

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



[issue1327] Python 2.4+ spends too much time in PyEval_EvalFrame w/ xmlrpmclib

2008-01-15 Thread Fredrik Lundh

Fredrik Lundh added the comment:

Can you switch on verbose mode in xmlrpclib, so you can see *where* the
transfer hangs?

Arguing that a hanging Python program must be caused by a bug in the
code that *executes* the Python program isn't that meaningful, really. 
After all, that code is used to run *all* Python programs, so I think
we'd noticed if it had a tendency to hang unexpectedly...

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



[issue1837] Add Queue.LifoQueue and Queue.PriorityQueue

2008-01-15 Thread Raymond Hettinger

Changes by Raymond Hettinger:


Removed file: http://bugs.python.org/file9179/more_queues.diff

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



[issue1837] Add Queue.LifoQueue and Queue.PriorityQueue

2008-01-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Updated patch to include tests.

Added file: http://bugs.python.org/file9181/more_queues.diff

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



[issue1339] smtplib starttls() should ehlo() if it needs to

2008-01-15 Thread Jesús Cea Avión

Changes by Jesús Cea Avión:


--
nosy: +jcea

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



[issue1202] zlib.crc32() and adler32() return value

2008-01-15 Thread Jesús Cea Avión

Changes by Jesús Cea Avión:


--
nosy: +jcea

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



[issue1189216] zipfile module and 2G boundary

2008-01-15 Thread Jesús Cea Avión

Changes by Jesús Cea Avión:


--
nosy: +jcea

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1189216
_
___
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-15 Thread Jesús Cea Avión

Changes by Jesús Cea Avión:


--
nosy: +jcea

__
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



[issue1746] ZIP files with archive comments longer than 4k not recognized as valid by zipfile module

2008-01-15 Thread Jesús Cea Avión

Changes by Jesús Cea Avión:


--
nosy: +jcea

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



[issue1526] DeprecationWarning in zipfile.py while zipping 113000 files

2008-01-15 Thread Jesús Cea Avión

Changes by Jesús Cea Avión:


--
nosy: +jcea

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



[issue1731] Random errors on interpreter shutdown

2008-01-15 Thread Jesús Cea Avión

Changes by Jesús Cea Avión:


--
nosy: +jcea

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



[issue1799] Per user site-packages and setup.py install --user patch

2008-01-15 Thread Jesús Cea Avión

Changes by Jesús Cea Avión:


--
nosy: +jcea

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



[issue1799] Per user site-packages and setup.py install --user patch

2008-01-15 Thread Christian Heimes

Christian Heimes added the comment:

Future patches will be applied to the branch directly:

http://svn.python.org/view/sandbox/trunk/pep370

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



[issue1747858] chown broken on 64bit

2008-01-15 Thread Sean Reifschneider

Sean Reifschneider added the comment:

It seems like the problem here is that chown is defined to take -1 for
the arguments, where the underlying platform may define chown taking
unsigned uid/gid.

I think in the short term we will need to apply a patch like one of the
ones included here, but in the long term maybe something like
chown(path, uid = None, gid = None)?  With chown(path, gid = 69). 
Does it make sense to use None instead of -1 in the long term?

--
keywords: +64bit, patch
nosy: +jafo
type:  - behavior

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



[issue1747858] chown broken on 64bit

2008-01-15 Thread Sean Reifschneider

Changes by Sean Reifschneider:


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



[issue1747858] chown broken on 64bit

2008-01-15 Thread Martin v. Löwis

Martin v. Löwis added the comment:

I believe that patch would break on a system where uid_t is a 64-bit
value, yet unsigned int is 32 bits.

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