[issue2841] Windows: "Runtime Error!" crash from pythonw.exe (3.0a5)

2008-05-13 Thread Amaury Forgeot d'Arc

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

The 0x4015 code and the message you get are typical of a call to
abort().

Ideed, I can reproduce the problem on windows 2000:
- start IDLE
- menu "File / New Window"
- close both windows

When running with python_d.exe, I see the message:
Tk_Get3DBorderFromObj called with non-existent border!
which appears in a call to a panic() function in 
tk8.4.16/generic/tk3d.c

--
nosy: +amaury.forgeotdarc

__
Tracker <[EMAIL PROTECTED]>

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



[issue2646] Python does not accept unicode keywords

2008-05-13 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
keywords: +26backport -patch
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue2548] Undetected error in exception handling

2008-05-13 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

__
Tracker <[EMAIL PROTECTED]>

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



[issue2542] PyErr_ExceptionMatches must not fail

2008-05-13 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
priority:  -> release blocker

__
Tracker <[EMAIL PROTECTED]>

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



[issue2833] __exit__ silences the active exception

2008-05-13 Thread Antoine Pitrou

Changes by Antoine Pitrou <[EMAIL PROTECTED]>:


--
nosy: +pitrou

__
Tracker <[EMAIL PROTECTED]>

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



[issue2775] Implement PEP 3108

2008-05-13 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
dependencies: +rename test_support to support

__
Tracker <[EMAIL PROTECTED]>

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



[issue2833] __exit__ silences the active exception

2008-05-13 Thread Amaury Forgeot d'Arc

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

Note that the problem is not related to "with", but with nested
exception handlers:

try:
raise Exception("foo")
except:
try: pass
except: pass
raise # in Py2.5 throws 'foo', in Py3.0 fails with RuntimeError


OTOH, python has always had poor support for nested exceptions; tried
with python24 and python25::

   try:
raise Exception("foo")
   except:
  try: raise KeyError("caught")
  except KeyError: pass
  raise # reraise the KeyError...

This does not happen if the two lines with KeyError are moved in another
function.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2831] Adding start to enumerate()

2008-05-13 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

Note that this functionality is currently available as follows:

>>> from itertools import count
>>> list(zip(count(3), 'abcdefg')
[(3, 'a'), (4, 'b'), (5, 'c'), (6, 'd'), (7, 'e'), (8, 'f'), (9, 'g')]

The enumerate(itr) builtin is just a convenience to avoid a module
import for the most basic zip(count(), itr) version.

The proposed patch would enable the example above to be written more
verbosely as:

>>> list(enumerate('abcdefg', start=3))

Or, with the positional argument approach as:

>>> list(enumerate(3, 'abcdefg'))


So, more verbose than the existing approach, and ambiguous to boot - as
Raymond noted, with the first it really isn't clear whether the first
value returned would be (3, 'd') or (3, 'a'), and with the second form
it isn't clear whether we're skipping the first three items, or
returning only those items.

Let's keep the builtins simple, and let itertools handle the variants -
that's why the module exists.

--
nosy: +ncoghlan

__
Tracker <[EMAIL PROTECTED]>

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



[issue2831] Adding start to enumerate()

2008-05-13 Thread Nick Coghlan

Nick Coghlan <[EMAIL PROTECTED]> added the comment:

Mentioning the zip(count(start), itr) version in the enumerate() docs
may be a good idea though.

(And of course, in 2.x, it should be izip() rather than zip() to
preserve the memory efficiency of enumerate())

__
Tracker <[EMAIL PROTECTED]>

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



[issue2844] int() lies about base parameter

2008-05-13 Thread Jakub Wilk

New submission from Jakub Wilk <[EMAIL PROTECTED]>:

>>> int('42', 42)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: int() base must be >= 2 and <= 36

>>> int('42', -909)
42

--
components: Library (Lib)
messages: 66777
nosy: jwilk
severity: normal
status: open
title: int() lies about base parameter
type: behavior
versions: Python 2.4, 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



[issue2844] int() lies about base parameter

2008-05-13 Thread Simon Cross

Simon Cross <[EMAIL PROTECTED]> added the comment:

Some quick digging in the code on trunk has revealed that by the time
the base reaches PyInt_FromString in intobject.c, -909 has become 10.
Surrounding numbers seem to come through fine.

--
nosy: +hodgestar

__
Tracker <[EMAIL PROTECTED]>

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



[issue2844] int() lies about base parameter

2008-05-13 Thread Simon Cross

Simon Cross <[EMAIL PROTECTED]> added the comment:

In int_new in intobject.c the base -909 is used to indicate that no base
has been passed through (presumably because NULL / 0 is a more common
pitfall that -909). Thus -909 is equivalent to base 10.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2824] zipfile to handle duplicate files in archive

2008-05-13 Thread Martin McNickle

Martin McNickle <[EMAIL PROTECTED]> added the comment:

The mechanism for throwing an error has been written, however for the
case of a duplicated filename, it appears to have been deliberatly not
been used by the original author.:

 def _writecheck(self, zinfo):
"""Check for errors before writing a file to the archive."""
if zinfo.filename in self.NameToInfo:
if self.debug:  # Warning for duplicate names
print "Duplicate name:", zinfo.filename
if self.mode not in ("w", "a"):
raise RuntimeError, 'write() requires mode "w" or "a"'
...

Putting a 'replace=True' switch seems a little clumsy, it would be much
better to raise an error, or allow the user a way to globally control
what happens in this case, i.e. overwrite the existing file or drop it.
 Adding a global behaviour switch seems to be the best way to preserve
backwards compatibility.

What do people think is the best way?

-- Martin

--
nosy: +BitTorment

__
Tracker <[EMAIL PROTECTED]>

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



[issue2755] IDLE ignores module change before restart

2008-05-13 Thread Kurt B. Kaiser

Kurt B. Kaiser <[EMAIL PROTECTED]> added the comment:

Thanks.  Another question: when the shell starts, do you
see the text

   No Subprocess 

to the right of the IDLE version, e.g.

IDLE 2.6a3   No Subprocess 

__
Tracker <[EMAIL PROTECTED]>

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



[issue2831] Adding start to enumerate()

2008-05-13 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

> Thanks. I think this part is the main reason I see a start argument to
> enumerate as potentially problematic:
>
> """all variants can easily be misread as starting at the nth item in the
>   sequence (much like islice() does now):   enumerate(3, 'abcdefg') -->
>   (3,'d') (4,'e') (5, 'f') (6, 'g')."""

So the ambiguity is that enumerate(it, start=N) could be taken as
skipping the first N items of it rather than adding N to the index it
returns. (And it is my own argument!) I'd like to withdraw this
argument. There are two separate use cases for using enumerate(): one is
to iterate over a sequence and to have a handy index by which to update
the value in the sequence. Another is for 1-based counting, usually when
printing 1-based ordinals (such as line numbers in files, dates in a
month or months in a year, etc.). N-based counting is less common but
still conceivable. However I see no use for skipping items from the
start, and if that use case ever came up, passing a slice to enumerate()
would be the appropriate thing to do. In fact, if you passed in a slice,
you might also want to pass a corresponding start value so the indices
produced match those of the original sequence.

So, I am still in favor of adding a new argument to enumerate().

I'm neutral on the need for a keyword (don't think it would hurt, not
sure how much it matters). I'm strongly against making it an optional
*leading* argument like Raymond proposed; that's a style I just don't
want to promote, range() and the curses module notwithstanding.

> Is the need to use zip(count(3), seq) for the offset index case really
such
> a burden given the associated benefits in keeping the builtin function
> really simple and easy to understand?

Yes, zip(count(3), seq) is too complex for this simple use case. I've
always solved this so far with this less-than-elegant but certainly
simpler idiom (except for users stuck in the tradition of for-loops in
certain older languages :-):

for i, line in enumerat(lines):
  i += 1
  print "%4d. %s" % (i, line)

and variants thereof.

--
nosy: +gvanrossum

__
Tracker <[EMAIL PROTECTED]>

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



[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky

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

The same issue is present in long_new:

>>> long('42', -909)
42L

I don't see why any magic value is needed, 10 would do the trick.

--
nosy: +belopolsky

__
Tracker <[EMAIL PROTECTED]>

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



[issue2844] int() lies about base parameter

2008-05-13 Thread Jakub Wilk

Jakub Wilk <[EMAIL PROTECTED]> added the comment:

10 would *not* do the trick:

>>> int(42)
42

>>> int(42, 10)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: int() can't convert non-string with explicit base

__
Tracker <[EMAIL PROTECTED]>

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



[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky

Changes by Alexander Belopolsky <[EMAIL PROTECTED]>:


--
keywords: +patch
Added file: http://bugs.python.org/file10316/issue2844.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky

Changes by Alexander Belopolsky <[EMAIL PROTECTED]>:


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



[issue708007] TelnetPopen3, TelnetBase, Expect split

2008-05-13 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton <[EMAIL PROTECTED]> added the comment:

finally!  i accidentally found this, when looking for my own work for
yet another project that requires this split.

comments - several

1) the patch was relevant in 2001 at the time of creation; it was
relevant for python 2.0, 2.1, 2.2, 2.3 2.4 2.5 and is still relevant now.

2) out of all of the python projects that i've done, some of which were
really quite large (for one person), over half of them have required
interaction with other programs - complex interaction - that required
the telnetpopen class.

calling out to php, calling out to c programs and using python to
perform parallelisation of simple scripts onto multiple systems (a
simple version of beowulf clustering), calling out to ssh to manage
remote servers - the list goes on.

3) the changes that guido asked me to make, back in 2001, we talked at
cross purposes (and i wasn't up to the task of saying so - sorry guido!).

the changes to split along the expectlib and telnetbase classes have
nothing to do whatsoever with the telnet "protocol".  in fact, the
enhancements that i've made _totally_ isolate the telnet protocol itself
into the "Telnet" derived class, and it can clearly be seen that
absolutely zero changes to the underlying implementation of the telnet
"protocol" are touched.

however, guido was asking me, as part of the acceptance of the changes,
to perform what he believed would be some "simple" bug-fixes to the
actual _inner workings_ of the (original) telnet code, which required
detailed knowledge of the telnet _protocol_ which i simply ... did not
have.  something to do with IAC.

on the basis of this miscommunication, guido's decision (seen in
http://bugs.python.org/issue405228) was to close the issue and reject
the code.

however - there is absolutely nothing "irrelevant" about the
enhancements, and the original reasons for rejection have absolutely
nothing to do with the enhancements.

overall, these enhancements should never have been left to rot - there
was never any real reason to leave them for so long, unused; the
"expect" command - see wikipedia page - has been available since 1995
and the concept is clearly well-understood as being extremely powerful;
many many people in the intervening years since 2001 have written expect
libraries in python - e.g. http://www.noah.org/wiki/Pexpect 

that one library alone - pexpect - would not need to have been written,
if this patch had been accepted at the time it was written.


Tracker <[EMAIL PROTECTED]>


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



[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky

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

> 10 would *not* do the trick:

You are right.  I guess something like issue2844-1.diff will be
necessary.  I am not sure it is worth the trouble, though.  Maybe just
change -909 to -MAX_INT?  Jakub, how did you discover this in the first
place?

Added file: http://bugs.python.org/file10317/issue2844-1.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky

Changes by Alexander Belopolsky <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file10317/issue2844-1.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky

Changes by Alexander Belopolsky <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file10318/issue2844-1.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2550] SO_REUSEADDR doesn't have the same semantics on Windows as on Unix

2008-05-13 Thread Alan Kennedy

Changes by Alan Kennedy <[EMAIL PROTECTED]>:


--
nosy: +amak

__
Tracker <[EMAIL PROTECTED]>

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



[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky

Changes by Alexander Belopolsky <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file10319/issue2844-1.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky

Changes by Alexander Belopolsky <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file10318/issue2844-1.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue2844] int() lies about base parameter

2008-05-13 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

I'm -1 on complicating these simple functions. Raymond?

--
assignee:  -> rhettinger
nosy: +georg.brandl, rhettinger

__
Tracker <[EMAIL PROTECTED]>

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



[issue2831] Adding start to enumerate()

2008-05-13 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Okay. I'm against making the argument keyword-only -- IMO keyword-only
arguments really should only be used in cases where their existence has
some advantage, like for max().

--
nosy: +georg.brandl

__
Tracker <[EMAIL PROTECTED]>

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



[issue2831] Adding start to enumerate()

2008-05-13 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

Sure, fine.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2833] __exit__ silences the active exception

2008-05-13 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

I've just discovered that the patch in r62847 doesn't clean up the
exception state if the except clause does not mention a local variable,
e.g. "except MyException" instead of "except MyException as e".

__
Tracker <[EMAIL PROTECTED]>

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



[issue2831] Adding start to enumerate()

2008-05-13 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Okay, committed a matching patch in r63208. Thank you all!

--
resolution:  -> accepted
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



[issue2507] Exception state lives too long in 3.0

2008-05-13 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

This bug should be reopened, the patch does not fix it when the except
clause does not assign the exception to a local variable (that is,
"except KeyError" rather than "except KeyError as e").
Another can of worms also appeared in #2833...

__
Tracker <[EMAIL PROTECTED]>

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



[issue2507] Exception state lives too long in 3.0

2008-05-13 Thread Collin Winter

Changes by Collin Winter <[EMAIL PROTECTED]>:


--
assignee: collinwinter -> 
resolution: fixed -> 
status: closed -> open

__
Tracker <[EMAIL PROTECTED]>

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



[issue2833] __exit__ silences the active exception

2008-05-13 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Raising priority.

--
nosy: +georg.brandl
priority:  -> release blocker

__
Tracker <[EMAIL PROTECTED]>

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



[issue2775] Implement PEP 3108

2008-05-13 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
dependencies: +Patch to rename HTMLParser module to lower_case

__
Tracker <[EMAIL PROTECTED]>

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



[issue1005] Patches to rename Queue module to queue

2008-05-13 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Queue has already been renamed in the meantime.

--
nosy: +georg.brandl
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



[issue1757062] Pickle fails on BeautifulSoup's navigableString instances

2008-05-13 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Closing as "won't fix".

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



[issue2775] Implement PEP 3108

2008-05-13 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
dependencies: +Patch to rename *Server modules to lower-case

__
Tracker <[EMAIL PROTECTED]>

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



[issue1002] Patch to rename HTMLParser module to lower_case

2008-05-13 Thread Brett Cannon

Brett Cannon <[EMAIL PROTECTED]> added the comment:

Do note that HTMLParse is slated to become html.parser in 3.0, so these 
patches are out-of-date. They can be used, though, to possibly help all 
references to HTMLParser (although 2to3 should handle that).

--
nosy: +brett.cannon

__
Tracker <[EMAIL PROTECTED]>

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



[issue1467929] %-formatting and dicts

2008-05-13 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

This probably won't be important anymore now that we have str.format()...

--
priority: normal -> low

_
Tracker <[EMAIL PROTECTED]>

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



[issue1025] tracebacks from list comps (probably other comps) don't show full stack

2008-05-13 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

This seems to be fixed in current SVN.

--
nosy: +georg.brandl
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



[issue1762972] 'exec' does not accept what 'open' returns

2008-05-13 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
assignee: christian.heimes -> gvanrossum

_
Tracker <[EMAIL PROTECTED]>

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



[issue1762972] 'exec' does not accept what 'open' returns

2008-05-13 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

This has apparently been fixed now.

--
nosy: +georg.brandl

_
Tracker <[EMAIL PROTECTED]>

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



[issue1467929] %-formatting and dicts

2008-05-13 Thread Marc-Andre Lemburg

Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment:

Sean, why don't you just check in the patch ?

Then we can close the bug.

Georg, the fact that we have an alternative method for string formatting
doesn't mean that it's ok for Python to hide error using the prevailing
method of string formatting.

_
Tracker <[EMAIL PROTECTED]>

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



[issue1467929] %-formatting and dicts

2008-05-13 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

I didn't want to imply that, but seeing that nobody cared about it for
so long I hadn't much hope for the future... ;)

_
Tracker <[EMAIL PROTECTED]>

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



[issue2845] shutil.copy2() copies permission bits

2008-05-13 Thread igs

New submission from igs <[EMAIL PROTECTED]>:

At least in Python 2.4 shutil.copy2() not only copies content and 
access times of a files like stated in the documentation but also the 
access bits.

That behaviour I would not expect because in other functions from 
shutil it is explicitly stated if the access bits are copied.

In fact I used
shutil.copy2(src, dest)
shutil.copystat(src, dest)
up to now. What does not work if the read-only attribute is set and 
what is completely nonsense after having a look into the implementation.

--
components: Windows
messages: 66803
nosy: igs
severity: normal
status: open
title: shutil.copy2() copies permission bits
type: behavior
versions: Python 2.4

__
Tracker <[EMAIL PROTECTED]>

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



[issue2755] IDLE ignores module change before restart

2008-05-13 Thread Mark Veldhuis

Mark Veldhuis <[EMAIL PROTECTED]> added the comment:

thank you too. Yes the text is there, I pasted the whole header here:


Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "copyright", "credits" or "license()" for more information.


Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface.  This connection is not visible on any external
interface and no data is sent to or received from the Internet.


IDLE 1.2.2   No Subprocess 
>>>

__
Tracker <[EMAIL PROTECTED]>

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



[issue2844] int() lies about base parameter

2008-05-13 Thread Martin v. Löwis

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

I don't see the problem at all. The -909 value is an implementation
artefact, and the submitter probably wouldn't have known it existed
without reading the source code. Perhaps we should change it to
something different every Python release just to denote that it is
deliberately undocumented.

Closing as "won't fix".

--
nosy: +loewis
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



[issue2846] Gzip cannot handle zero-padded output + patch

2008-05-13 Thread Tadek Pietraszek

New submission from Tadek Pietraszek <[EMAIL PROTECTED]>:

There are cases when gzip produces/receives a zero-padded output, for
example when creating a compressed tar archive with a pipe:

tar cz /dev/null > foo.tgz

ls -la foo.tgz
-rw-r- 1 tadek tadek 10240 May 13 23:40 foo.tgz

tar tvfz foo.tgz
crw-rw-rw- root/root   1,3 2007-10-18 18:27:25 dev/null


This is a known behavior (http://www.gzip.org/#faq8) and recent versions
of gzip handle it gracefully by skipping all zero bytes after the end of
the file (see gzip.c:1394-1406 in the version 1.3.12).

The Python gzip module crashes on those files:

#:~/python2.5/py2.5$ tar cz /dev/null > foo.tgz
tar: Removing leading `/' from member names
#:~/python2.5/py2.5$ bin/python
Python 2.5.2 (r252:60911, May 14 2008, 00:02:24)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gzip
>>> f=gzip.open("foo.tgz")
>>> f.read()
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/tadek/python2.5/py2.5/lib/python2.5/gzip.py", line 220, in
read
self._read(readsize)
  File "/home/tadek/python2.5/py2.5/lib/python2.5/gzip.py", line 263, in
_read
self._read_gzip_header()
  File "/home/tadek/python2.5/py2.5/lib/python2.5/gzip.py", line 164, in
_read_gzip_header
raise IOError, 'Not a gzipped file'
IOError: Not a gzipped file
>>>

The proposed patch fixes this behavior by reading all zero characters at
the end of the file. I tested that it works with: regular archives,
zero-padded archives, concatenated archives and concatenated zero-padded
archives.

Regards,
Tadek

--
components: Extension Modules
files: python2.5.2-gzip.patch
keywords: patch
messages: 66806
nosy: tadek
severity: normal
status: open
title: Gzip cannot handle zero-padded output + patch
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file10320/python2.5.2-gzip.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1187] pipe fd handling issues in subprocess.py on POSIX

2008-05-13 Thread Andrew Nissen

Andrew Nissen <[EMAIL PROTECTED]> added the comment:

In reference to Dustin's entry: That's the point; the expected behavior
is that subprocess should write data to the named files, without the
fix, it doesn't.  With the subprocess module as it stands, there are a
number of cases that will not behave as the user expects.  There were
two issues that were being addressed:

1) If a user passes in a file descriptor that is in the range 0-2, the
dup2 calls end up closing the file being passed in.

2) The other issue is the close code could end up closing file
descriptors it really shouldn't.  For example if p2cread == 1, the code
ends up closing the fd even though it really probably shouldn't.  On a
side note, I should have used a list for dup_fds instead of a dictionary.

It's been a while and I've not spent a huge amount of time getting back
up to speed; if there are any questions let me know and I'll spend some
more time on this.

__
Tracker <[EMAIL PROTECTED]>

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



[issue2843] New methods for existing Tkinter widgets

2008-05-13 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
type:  -> feature request

__
Tracker <[EMAIL PROTECTED]>

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



[issue2775] Implement PEP 3108

2008-05-13 Thread Brett Cannon

Changes by Brett Cannon <[EMAIL PROTECTED]>:


--
dependencies: +Remove cl usage from aifc

__
Tracker <[EMAIL PROTECTED]>

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



[issue2847] Remove cl usage from aifc

2008-05-13 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

The cl module has been removed from Python 3.0, but the aifc module still 
imports it in multiple locations. The module needs to be updated (with 
tests hopefully) so as to not use the cl module.

--
components: Library (Lib)
messages: 66808
nosy: brett.cannon
priority: critical
severity: normal
status: open
title: Remove cl usage from aifc
versions: 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



[issue2848] Remove mimetools usage from the stdlib

2008-05-13 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

The mimetools module has been deprecated for ages, but it is still used in 
multiple places (a quick grep lists ``cgi``, ``httplib``, ``urllib``, 
``urllib2``, ``test_cookielib``, ``test_multifile``, ``test_urllib``, 
``test_urllib2``, ``test_urllib2net``, ``test_urllib_localnet``, 
``test_urllibnet``, ``test_xmlrpc``). All uses need to be removed before 
the module can go from Py3K.

--
components: Library (Lib)
messages: 66809
nosy: brett.cannon
priority: critical
severity: normal
status: open
title: Remove mimetools usage from the stdlib
type: behavior
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



[issue2775] Implement PEP 3108

2008-05-13 Thread Brett Cannon

Changes by Brett Cannon <[EMAIL PROTECTED]>:


--
dependencies: +Remove mimetools usage from the stdlib

__
Tracker <[EMAIL PROTECTED]>

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



[issue2849] Remove usage of rfc822 from the stdlib

2008-05-13 Thread Brett Cannon

New submission from Brett Cannon <[EMAIL PROTECTED]>:

The rfc822 module has been deprecated for a while but is still used in the 
stdlib (at least in 'cgi' and 'test_urllib2'). All uses need to go before 
the module can be removed.

--
components: Library (Lib)
messages: 66810
nosy: brett.cannon
priority: critical
severity: normal
status: open
title: Remove usage of rfc822 from the stdlib
type: behavior
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



[issue2775] Implement PEP 3108

2008-05-13 Thread Brett Cannon

Changes by Brett Cannon <[EMAIL PROTECTED]>:


--
dependencies: +Remove usage of rfc822 from the stdlib

__
Tracker <[EMAIL PROTECTED]>

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



[issue2837] OpenID wannabe

2008-05-13 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



[issue2156] TestCase.tmpdir(), TestCase.mock()

2008-05-13 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