[issue1342811] Tkinter.Menu.delete doesn't delete command of entry

2008-08-21 Thread Robert Schuppenies

Robert Schuppenies <[EMAIL PROTECTED]> added the comment:

I am sry that you see it that way, I do not. I was given commit access
solely for gsoc purposes and committing changes before a late release
without review from a committer IMHO violates strict policies. I tried
to get somebody to review the patch twice on the #python-dev channel,
but was ignored. Maybe I should have made more fuss about it. Also,
since it is still a beta, it is not the end of the world. I don't like
it either but take the blame now.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3628] IDLE does not run with Py30b3

2008-08-21 Thread Mark Summerfield

New submission from Mark Summerfield <[EMAIL PROTECTED]>:

When I try to run IDLE in Py30b3 I get a traceback, then the main window
appears with an error message box and an OK button; once I click OK,
IDLE goes away.

$ ~/opt/python30b3/bin/idle
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/mark/opt/python30b3/lib/python3.0/idlelib/run.py", line
76, in main
sockthread.set_daemon(True)
AttributeError: 'Thread' object has no attribute 'set_daemon'

It looks like there's been some mixup with threading... in an earlier
beta there was setDaemon(), then it became set_daemon(), and now it is
back to setDaemon() again. And unfortunately, the obvious fix (change
the name to setDaemon()), although it gets past this problem, just leads
to another:

$ ~/opt/python30b3/bin/idle # using setDaemon
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/mark/opt/python30b3/lib/python3.0/idlelib/run.py", line
76, in main
sockthread.setDaemon(True)
  File "/home/mark/opt/python30b3/lib/python3.0/threading.py", line 674,
in setDaemon
"Thread.daemon property", DeprecationWarning)
  File "/home/mark/opt/python30b3/lib/python3.0/warnings.py", line 18,
in showwarning
file.write(formatwarning(message, category, filename, lineno, line))
TypeError: idle_formatwarning_subproc() takes exactly 4 positional
arguments (5 given)

I did run make test and got 300 tests OK with 22 skipped all expected on
linux2.

--
components: IDLE
messages: 71611
nosy: mark
severity: normal
status: open
title: IDLE does not run with Py30b3
type: crash
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3187] os.listdir can return byte strings

2008-08-21 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

If the filename can not be encoded correctly in the system charset, 
it's not really a problem. The goal is to be able to use open(), 
shutil.copyfile(), os.unlink(), etc. with the given filename.

orig = filename from the kernel (bytes)
filename = filename from listdir() (str)
dest = filename to the kernel (bytes)

The goal is to get orig == dest. In my program Hachoir, to workaround 
this problem I store the original filename (bytes) and convert it to 
unicode with characters replacements (eg. replace invalid byte 
sequence by "?"). So the bytes string is used for open(), 
unlink(), ... and the unicode string is displayed to stdout for the 
user.

IMHO, the best solution is to create such class:

class Filename:
def __init__(self, orig):
self.as_bytes = orig
self.as_str = myformat(orig)
def __str__(self):
return self.as_str
def __bytes__(self):
return self.as_bytes

New problems: I guess that functions operating on filenames 
(os.path.*) will have to support this new type (Filename class).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3617] Add MS EULA to the list of third-party licenses in the Windows installer

2008-08-21 Thread Marc-Andre Lemburg

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

Mark Hammond wrote:
> Mark Hammond <[EMAIL PROTECTED]> added the comment:
> 
> Obviously IANAL, but my reading of eula.txt included with VS9 seems less
> restrictive than the 2003 one.  It has 2 clauses that seem relevant:
> 
> * [you must] require distributors and external end users to agree to
> terms that protect it at least as much as this agreement;
> 
> * [you must not] modify or distribute the source code of any
> Distributable Code so that any part of it becomes subject to an Excluded
> License.  An Excluded License is [description of GPL]
> 
> I do see how the first could be considered an issue (otoh, I'd try to
> argue we aren't doing anything to imply any worse terms :), but I don't
> see how the second is, even for GPLd programs that simply used the compiler.
> 
> Maybe it would be helpful if you referenced the specific clauses you
> think are of concern?

This was already discussed on the PSF members mailing list.

I don't have the VC9 EULA available, but these are the clauses of concern
from VC7.1:

"""
3.  DISTRIBUTION REQUIREMENTS AND OTHER LICENSE RIGHTS AND LIMITATIONS.  If 
you choose to exercise
your rights under Section 2, any redistribution by you is subject to your 
compliance with Section
3.1; some of the Redistributable Code has additional limited use rights 
described in Section 3.2.

   3.1  General Distribution Requirements.

 (a)If you choose to redistribute Sample Code, or 
Redistributable Code (collectively,
the “Redistributables”) as described in Section 2, you agree:

  (i) except as otherwise noted in Section 2.1 (Sample Code), 
to distribute the
Redistributables only in object code form and in conjunction with and as a part 
of a software
application product developed by you that adds significant and primary 
functionality to the
Redistributables (“Licensee Software”);

  (ii) that the Redistributables only operate in conjunction 
with Microsoft Windows
platforms;

  (iii) that if the Licensee Software is distributed beyond 
Licensee’s premises or
externally from Licensee’s organization, to distribute the Licensee Software 
containing the
Redistributables pursuant to an end user license agreement (which may be 
“break-the-seal”,
“click-wrap” or signed), with terms no less protective than those contained in 
this EULA;

  (iv) not to use Microsoft’s name, logo, or trademarks to 
market the Licensee
Software;

  (v) to display your own valid copyright notice which shall be 
sufficient to
protect Microsoft’s copyright in the Software;

  (vi) not to remove or obscure any copyright, trademark or 
patent notices that
appear on the Software as delivered to you;

  (vii) to indemnify, hold harmless, and defend Microsoft from 
and against any
claims or lawsuits, including attorney’s fees, that arise or result from the 
use or distribution of
the Licensee Software;

  (viii) to otherwise comply with the terms of this EULA; and 
(ix) agree that
Microsoft reserves all rights not expressly granted.

 You also agree not to permit further distribution of the 
Redistributables by your end
users except you may permit further redistribution of the Redistributables by 
your distributors to
your end-user customers if your distributors only distribute the 
Redistributables in conjunction
with, and as part of, the Licensee Software, you comply with all other terms of 
this EULA, and your
distributors comply with all restrictions of this EULA that are applicable to 
you.

 (b)If you use the Redistributables, then in addition to 
your compliance with the
applicable distribution requirements described for the Redistributables, the 
following also applies.
 Your license rights to the Redistributables are conditioned upon your not

  (i) creating derivative works of the Redistributables in any 
manner that would
cause the Redistributables in whole or in part to become subject to any of the 
terms of an Excluded
License; or

  (ii) distributing the Redistributables (or derivative works 
thereof) in any manner
that would cause the Redistributables to become subject to any of the terms of 
an Excluded License.
 An “Excluded License” is any license that requires as a condition of use, 
modification and/or
distribution of software subject to the Excluded License, that such software or 
other software
combined and/or distributed with such software be (x) disclosed or distributed 
in source code form;
(y) licensed for the purpose of making derivative works; or (z) redistributable 
at no charge.
"""

Specifically:
-

3.1 (a) (iii) ... pursuant to an end user license agreement (which may be 
“break-the-seal”,
“click-wrap” or signed), with terms no less protective than those contained in 
this EULA ...

The PSF licen

[issue3629] Py30b3 won't compile a regex that compiles with 2.5.2 and 30b2

2008-08-21 Thread Mark Summerfield

New submission from Mark Summerfield <[EMAIL PROTECTED]>:

Here are the results of running the same tiny program against 2.5.2,
30b2, and 30b3. The program creates a regex and tries to match 3
strings. For 2.5.2 and 30b2 this works fine; for 30b3 the regex won't
even compile:

$ python -V
Python 2.5.2
$ python /tmp/retext.py
name="name1" value="value1"
name="name2" value="value #2"
name="name3" value="value '3'"
$
$ ~/opt/python30b2/bin/python3.0 -V
Python 3.0b2
$ ~/opt/python30b2/bin/python3.0 /tmp/retext.py
name="name1" value="value1"
name="name2" value="value #2"
name="name3" value="value '3'"
$
$ ~/opt/python30b3/bin/python3.0 /tmp/retext.py
Traceback (most recent call last):
  File "/tmp/retext.py", line 8, in 
""", re.VERBOSE)
  File "/home/mark/opt/python30b3/lib/python3.0/re.py", line 203, in compile
return _compile(pattern, flags)
  File "/home/mark/opt/python30b3/lib/python3.0/re.py", line 255, in
_compile
p = sre_compile.compile(pattern, flags)
  File "/home/mark/opt/python30b3/lib/python3.0/sre_compile.py", line
520, in compile
groupindex, indexgroup
RuntimeError: invalid SRE code

--
components: Regular Expressions
files: retext.py
messages: 71614
nosy: mark
severity: normal
status: open
title: Py30b3 won't compile a regex that compiles with 2.5.2 and 30b2
type: behavior
versions: Python 3.0
Added file: http://bugs.python.org/file11185/retext.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3187] os.listdir can return byte strings

2008-08-21 Thread Antoine Pitrou

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

Selon STINNER Victor <[EMAIL PROTECTED]>:
> IMHO, the best solution is to create such class:
>
> class Filename:
> def __init__(self, orig):
> self.as_bytes = orig
> self.as_str = myformat(orig)
> def __str__(self):
> return self.as_str
> def __bytes__(self):
> return self.as_bytes

I agree that logically it's the right solution. It's also the most invasive. If
that class is made a subclass of str, however, existing code shouldn't break
more than it currently does.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3628] IDLE does not run with Py30b3

2008-08-21 Thread Mark Summerfield

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

Just realised how to fix this. Change line 76 in idlelib/run.py:

# change this:
sockthread.set_daemon(True)
# to this:
sockthread.daemon = True

and IDLE runs fine.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3626] python3.0 interpreter on Cygwin ignores all arguments

2008-08-21 Thread Amaury Forgeot d'Arc

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

Cygwin seems to have a broken implementation of mbstowcs.
See http://www.google.com/codesearch?q=cygwin+mbstowcs\(NULL

The attached patch corrects the problem.

--
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file11186/cygwin-mbstowcs.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3617] Add MS EULA to the list of third-party licenses in the Windows installer

2008-08-21 Thread Mark Hammond

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

MAL:
> This was already discussed on the PSF members mailing list.

Yeah, but not specifically about VS2008 which this bug seemed to be
specifically targetting.  FWIW, this appears like *less* of a problem
for 2.6 than for 2.4 and 2.5 as it doesn't appear to have as draconian
clauses as the ones you quote.

> Note that I'm not suggesting to dive into all this. We 
> should simply put the EULA into the installer package 
> and be done with it :-)

I can't argue with that - including the relevant EULA certainly would be
prudent (I wonder what the license on the EULA itself is - it doesn't
seem to be covered as 'Distributable Code' under the terms of its own
license ;)  What the hell though - at the risk of being sued, I've
attached it ;)

Added file: http://bugs.python.org/file11187/msvs2008_prof_edition_eula.txt

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3630] Unable to inherit bytes: bytes.__init__() doesn't accept arguments

2008-08-21 Thread STINNER Victor

New submission from STINNER Victor <[EMAIL PROTECTED]>:

Example:

   class MyBytes(bytes):
  def __init__(self, *args, **kw):
 bytes.__init__(self, *args, **kw)
   a = bytes(b"hello")   # ok
   b = MyBytes(b"hello") # error

=> DeprecationWarning: object.__init__() takes no parameters

The example works fine in Python 2.6 but fails in Python 3.0.

--
components: Library (Lib)
messages: 71619
nosy: haypo
severity: normal
status: open
title: Unable to inherit bytes: bytes.__init__() doesn't accept arguments
type: behavior
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3617] Add MS EULA to the list of third-party licenses in the Windows installer

2008-08-21 Thread Marc-Andre Lemburg

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

Attaching the VS7.1 EULA. This is only relevant for Python 2.5... should
we do another patch level release.

--
versions: +Python 2.5
Added file: http://bugs.python.org/file11188/eula.txt

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3617] Add MS EULA to the list of third-party licenses in the Windows installer

2008-08-21 Thread Marc-Andre Lemburg

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

Mark Hammond wrote:
> MAL:
>> Note that I'm not suggesting to dive into all this. We 
>> should simply put the EULA into the installer package 
>> and be done with it :-)
> 
> I can't argue with that - including the relevant EULA certainly would be
> prudent (I wonder what the license on the EULA itself is - it doesn't
> seem to be covered as 'Distributable Code' under the terms of its own
> license ;)  What the hell though - at the risk of being sued, I've
> attached it ;)

Thanks. I'll have a look at the new EULA as well... I was under the
assumption that EULAs tend to grow more restrictive rather then
open up possibilities ;-)

I've added the VC7.1 EULA as well.

--
title: Add MS EULA to the list of third-party licenses in the   Windows 
installer -> Add MS EULA to the list of third-party licenses in the Windows 
installer

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3617] Add MS EULA to the list of third-party licenses in the Windows installer

2008-08-21 Thread Marc-Andre Lemburg

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

Adding the EULA should be easy... the MSI installer code already adds
the other licenses for OpenSSL, etc. to the license text in
Tools/msi/msi.py (took me a while to find that file, since I would have
expected this to live under PCbuild/).

The only "problem" is finding the path to the EULA text file, since that
depends on the where VS is installed (and perhaps the edition as well).

--
components: +Windows
keywords: +easy

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3630] Unable to inherit bytes: bytes.__init__() doesn't accept arguments

2008-08-21 Thread Antoine Pitrou

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

With immutable types, you must use __new__ instead. Passing the
arguments to __init__ is too late since the object is immutable and it
has already been built in memory, thus you can't initialize it with
another value.

>>> class B(bytes):
...  def __new__(cls, *args, **kargs):
...   print(args)
...   return bytes.__new__(cls, *args, **kargs)
...
>>> b = B(b"foo")
(b'foo',)
>>> b
b'foo'
>>> type(b)


--
nosy: +pitrou
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3187] os.listdir can return byte strings

2008-08-21 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

I wrote a Filename class. I tries different methods:
 * no parent class "class Filename: ..." -> I don't know how to make 
bytes(filename) works!? But it's the best option to avoid strange bugs 
(mix bytes/str, remember Python 2.x...)
 * str parent class "class Filename(str): ..." -> doesn't work because 
os functions uses the fake unicode filename before testing the bytes 
(real) filename
 * bytes parent class "class Filename(bytes): ..." -> that's the 
current implementation

The idea is to encode str -> bytes (and not bytes -> str because we 
want to avoid problems with such conversions). So I reimplemented most 
bytes methods: __addr__, __raddr__, __contains__, startswith, endswith 
and index. index method has no start/end arguments since the behaviour 
would be different than a real unicode string :-/

I added an example of fixed os.listdir(): create Filename() object if 
we get bytes. Should we always create Filename objects? I don't think 
so.

Added file: http://bugs.python.org/file11189/filename.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3618] possible deadlock in IO library (Lib/io.py)

2008-08-21 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

So if we consider that RLock is fast enough (see my C version of RLokc 
in #3001), we can use RLock instead of Lock to avoid this issue. Here 
is a patch to use RLock and also including an unit test of this issue.

Added file: http://bugs.python.org/file11190/io_deadlock.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3618] possible deadlock in IO library (Lib/io.py)

2008-08-21 Thread Antoine Pitrou

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

Selon STINNER Victor <[EMAIL PROTECTED]>:
>
> So if we consider that RLock is fast enough (see my C version of RLokc
> in #3001), we can use RLock instead of Lock to avoid this issue. Here
> is a patch to use RLock and also including an unit test of this issue.

I tried your test and it seems to lock when using the Python implementation of
RLock, but perhaps it's precisely because the implementation is in Python.

Also, your RLock implementation has to be finished before going further ;)
(see my comments in #3001)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3631] Improve gdbinit of Python 2.6

2008-08-21 Thread STINNER Victor

New submission from STINNER Victor <[EMAIL PROTECTED]>:

I wrote a patch to improve gdbinit (gdb macros):
 - implement py_decref
 - reuse pyo in pylocals
 - direclty call PyCode_Addr2Line() in lineno instead of a long and 
complex reimplemention in gdb script language
 - avoid memory leak in pylocals: call py_decref($_name)

See also #3610 (for Python 3.0).

--
files: gdbinit_python26.patch
keywords: patch
messages: 71627
nosy: haypo
severity: normal
status: open
title: Improve gdbinit of Python 2.6
Added file: http://bugs.python.org/file11191/gdbinit_python26.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3631] Improve gdbinit of Python 2.6

2008-08-21 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


--
components: +None
type:  -> feature request
versions: +Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3629] Py30b3 won't compile a regex that compiles with 2.5.2 and 30b2

2008-08-21 Thread Barry A. Warsaw

Changes by Barry A. Warsaw <[EMAIL PROTECTED]>:


--
priority:  -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3628] IDLE does not run with Py30b3

2008-08-21 Thread Barry A. Warsaw

Changes by Barry A. Warsaw <[EMAIL PROTECTED]>:


--
priority:  -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3632] use string_print() in gdb

2008-08-21 Thread STINNER Victor

New submission from STINNER Victor <[EMAIL PROTECTED]>:

"pyo" macro from gdbinit (see #3631) uses _PyObject_Dump() to display 
an object. This function calls (indirectly) string_print() to display 
one line of text. But if the GIL is released (I guess it's the GIL or 
is it called the "thread state"?), gdb crashs Python:

   object  : Fatal Python error: PyEval_SaveThread: NULL tstate
   Program received signal SIGABRT, Aborted.
   0xe410 in __kernel_vsyscall ()

Workaround: ensure GIL before Py_BEGIN_ALLOW_THREADS... That sounds 
ugly but it works :-) So I propose to enable it in debug mode (#ifdef 
Py_DEBUG) with a patch.

I guess that the issue is very specific to (gdb) debugging and should 
not affect normal usage of Python. That's why I choosed to enable it 
only in debug mode.

--
components: Library (Lib)
files: string_print.patch
keywords: patch
messages: 71628
nosy: haypo
severity: normal
status: open
title: use string_print() in gdb
type: performance
versions: Python 2.6
Added file: http://bugs.python.org/file11192/string_print.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3187] os.listdir can return byte strings

2008-08-21 Thread Antoine Pitrou

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

>  * bytes parent class "class Filename(bytes): ..." -> that's the
> current implementation

I don't think that makes sense (especially under Windows which has Unicode file
APIs). os.listdir() and friends should really return str or str-like objects,
not bytes-like objects with an additional __str__ method.

>  * str parent class "class Filename(str): ..." -> doesn't work because
> os functions uses the fake unicode filename before testing the bytes
> (real) filename

Well, of course, if we create a filename type, then all os functions must be
adapted to accept it rather than assume str.

All this is highly speculative of course, and if we really follow this course
(i.e. create a filename type) it should probably be postponed to 3.1: too many
changes with far-reaching consequences.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3632] use string_print() in gdb

2008-08-21 Thread Amaury Forgeot d'Arc

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

I once fell into the same issue, but the patch should modify
_PyObject_Dump(), around the call to PyObject_Print.

string_print() is not the only function called by _PyObject_Dump, by far...

And beware that many people routinely run python in "debug mode" outside
gdb, for example during development.
That's why it's better to modify _PyObject_Dump only; we can be sure
that it only affects a debugger session.

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3632] use string_print() in gdb

2008-08-21 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

Oh! I have a better idea: why not patching _PyObject_Dump() instead of 
string_print() :-) So here is a new patch.

___
Python tracker <[EMAIL PROTECTED]>

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




[issue3632] use string_print() in gdb

2008-08-21 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file11193/pyobject_dump.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3632] use string_print() in gdb

2008-08-21 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file11192/string_print.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3631] Improve gdbinit of Python 2.6

2008-08-21 Thread Skip Montanaro

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

Thanks for the patch.  Most of it looks okay except for the rewrite of
the lineno command.  That was written in gdb's command language so
that you could get a python stack from a core dump, not just from a
running process.  Is there some reason it can't remain as it was
(changes to line number data structures between versions, perhaps)?

--
nosy: +skip.montanaro

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3629] Py30b3 won't compile a regex that compiles with 2.5.2 and 30b2

2008-08-21 Thread Antoine Pitrou

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

The error is in the bytecode verifier and also occurs with 2.6.
(perhaps a good reason not to backport it to 2.5 :-))

--
nosy: +gvanrossum, pitrou
versions: +Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3629] Py30b3 won't compile a regex that compiles with 2.5.2 and 30b2

2008-08-21 Thread Antoine Pitrou

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

The following expression is sufficient to reproduce the bug:

re.compile("(?P)(?(quote))")

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2415] bytes() should respect __bytes__

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: normal -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Antoine Pitrou

New submission from Antoine Pitrou <[EMAIL PROTECTED]>:

This is a failure that seems to occur quite often (always?) on the
Solaris buildbot:

==
FAIL: test_invalid_inputs (test.test_float.HexFloatTestCase)
--
Traceback (most recent call last):
  File
"/home2/buildbot/slave/3.0.loewis-sun/build/Lib/test/test_float.py",
line 451, in test_invalid_inputs
self.assertRaises(ValueError, fromHex, x)
AssertionError: ValueError not raised by fromhex

--

--
components: Interpreter Core
messages: 71635
nosy: pitrou
priority: critical
severity: normal
status: open
title: float.fromhex discrepancy under Solaris
type: behavior
versions: Python 2.6, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3373] sys recursion limit a lot shorter on trunk?

2008-08-21 Thread Antoine Pitrou

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

(FWIW, I just ran Misc/find_recursion_limit.py on a 32-bit Windows box.

With 2.6 I get 5900.
With 3.0 I get 9000.

So the good news is that 3.0 seems to be less stack-hungry :-))

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3627] apple security patches need to be forward ported to py3k

2008-08-21 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

I tried merging this once, but there were many conflicts. Are you
available to do this?

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3625] test issues on 64bit windows

2008-08-21 Thread Antoine Pitrou

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

Mark, that check looks fragile:

+IS32BIT = sys.maxint == 0x7fff and "64 bit" not in sys.version

Why don't you check for sys.maxsize instead? By construction,
sys.maxsize should give you the pointer width (minus the sign bit ;-)).

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3631] Improve gdbinit of Python 2.6

2008-08-21 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

@skip: oh yes, you're right about the core file :-) So forget the 
changes in lineno. I first rewrote lineno for Python 3.0 because the 
code changed and it was easier for me to reuse PyCode_Addr2Line() :-)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

This probably has been happening for quite a while. We just didn't
notice because that bot was busy hanging on test_nis.

The failure is in test_math. Mark, do you know anything?

--
nosy: +benjamin.peterson, marketdickinson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3620] test_smtplib is flaky

2008-08-21 Thread Antoine Pitrou

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

The failure happens even when test_smtplib runs before both
test_asyncore and test_asynchat (*). So the latter can't be the culprit.


(*)
http://www.python.org/dev/buildbot/3.0.stable/sparc%20Debian%203.0/builds/419/step-test/0

--
nosy: +pitrou
title: test_asyncore is not cleanup after its self? -> test_smtplib is flaky

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2356] sys.exitfunc should raise a Py3K warning

2008-08-21 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

This is going to be very hard to implement without module descriptors.
It might be better to make a 2to3 fixer which inserts an import too.

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3601] test_unicode.test_raiseMemError fails in UCS4

2008-08-21 Thread Antoine Pitrou

Changes by Antoine Pitrou <[EMAIL PROTECTED]>:


--
assignee:  -> pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3607] test_multiprocessing failure (Unserializable message)

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python 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-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

___
___
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-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
versions: +Python 2.7 -Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3297] Python interpreter uses Unicode surrogate pairs only before the pyc is created

2008-08-21 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Ping.

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2744] Fix test_cProfile

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
versions: +Python 3.1 -Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2965] Update interface of weakref dictionaries

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2357] sys.exc_{type,values,traceback} needs a 2to3 fixer

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
title: sys.exc_{type,values,traceback} should raise a Py3K warning -> 
sys.exc_{type,values,traceback} needs a 2to3 fixer

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1967] Backport dictviews to 2.7

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
title: Backport dictviews to 2.6 -> Backport dictviews to 2.7
versions: +Python 2.7 -Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2534] Restore isinstance and issubclass speed in 2.6

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3279] import of site.py fails on startup

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Mark Dickinson

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

I'll take a look, though if anyone has some time to spare and access to a 
Solaris machine then they can probably figure this out more quickly.

The first step would be to fix the test so that it at least shows which 
input the failure occurs for.

--
assignee:  -> marketdickinson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2333] Backport dict comprehensions

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
versions: +Python 2.7 -Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2331] Backport parameter annotations

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
versions: +Python 2.7 -Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2334] Backport set comprehensions

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
versions: +Python 2.7 -Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2402] get rid of warnings in regrtest with -3

2008-08-21 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Brett has been doing this.

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2764] c_char doesn't implement py3k buffer interface

2008-08-21 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Ping

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2874] Remove use of the stat module in the stdlib

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2501] xml.sax.parser() doesn't terminate when given a filename

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3002] shutil.copyfile blocks indefinitely on named pipes

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2226] Small _abcoll Bugs / Oddities

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2443] uninitialized access to va_list

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3590] sax.parser considers XML as text rather than bytes

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2322] Clean up getargs.c and its formatting possibilities

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3187] os.listdir can return byte strings

2008-08-21 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

Le Thursday 21 August 2008 14:55:43 Antoine Pitrou, vous avez écrit :
> >  * bytes parent class "class Filename(bytes): ..." -> that's the
> > current implementation
>
> I don't think that makes sense (especially under Windows which has Unicode
> file APIs). os.listdir() and friends should really return str or str-like
> objects, not bytes-like objects with an additional __str__ method.

In we use "class Filename(str): ...", we have to ensure that all operations 
takes care of the charset because the unicode version is invalid and not be 
used to access to the file system. Dummy example: Filename()+"/" should not 
return str but raise an error or create a new filename.

> Well, of course, if we create a filename type, then all os functions must
> be adapted to accept it rather than assume str.

If Filename has no parent class but is convertible to bytes(), os functions 
requires no change and so we can fix it before final 3.0 ;-)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3187] os.listdir can return byte strings

2008-08-21 Thread Antoine Pitrou

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

> If Filename has no parent class but is convertible to bytes(), os
> functions requires no change and so we can fix it before final 3.0 ;-)

This sounds highly optimistic.

Also, I think it's wrong to introduce a string-like class with implicit
conversion both to bytes and to str, while we have taken all measures to
make sure that bytes/str exchangeability doesn't exist any more in py3k.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2764] c_char doesn't implement py3k buffer interface

2008-08-21 Thread Antoine Pitrou

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

Thomas, the bytes object is not broken anymore with respect to the
buffer API, but it depends which buffer API you are talking about :-) I
hope it is the new, 3.0 one.

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2876] Write UserDict fixer for 2to3

2008-08-21 Thread Nick Edds

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

I've been thinking about this a bit, and I don't see how handling it
should be all that different from handling module renaming. 

For import UserDict, we can just change UserDict to collections and deal
with UserDict.UserDict with a deprecation warning and
UserDict.IterableUserDict and UserDict.Mixin with transformations to
collections.UserDict and collections.MutableMapping.

For from imports, we can raise the deprecation warning on UserDict, and
otherwise change from UserDict import ... to from collections import ...
and then for non-import appearances of UserDict, IterableUserDict, and
Mixin rename or raise a deprecation warning as appropriate.

For the other import cases, similar things could be done.

I think the old version of fix_imports, which had support like this,
would basically be all that we need. I should be able to mimic that
functionality, but also make it more scalable than the previous version.

Is there something I'm missing here about the difference between modules
and classes? From the use-cases I've observed of UserDict, it seems like
this functionality would be sufficient.

___
Python 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-08-21 Thread Antoine Pitrou

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

For what it's worth, py3k has a subtler recursion checking algorithm
which would probably fix this problem if backported properly. See
_Py_CheckRecursiveCall() in ceval.c (lines 462+), and especially the
role played by the tstate->overflowed flag, which allows a moderate
overflow of the recursion count in order for error handling code to
execute properly.

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3629] Py30b3 won't compile a regex that compiles with 2.5.2 and 30b2

2008-08-21 Thread Guido van Rossum

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

Duly accepted. (Though if someone has a quick fix I'd be open to it. :-)

--
assignee:  -> gvanrossum

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3373] sys recursion limit a lot shorter on trunk?

2008-08-21 Thread Guido van Rossum

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

I think it's fine as it is. Incrementing the stack level more frequently
is a good thing since there used to be paths that didn't increment it at
all and hence could cause segfaults.  The default is conservative since
increasing it could cause segfaults, and on some systems threads don't
get a very large stack.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
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-08-21 Thread Guido van Rossum

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

This will definitely not be in 2.6.

--
keywords:  -26backport

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3187] os.listdir can return byte strings

2008-08-21 Thread Guido van Rossum

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

The proper work-around is for the app to pass bytes into os.listdir();
then it will return bytes.  It would be nice if open() etc. accepted
bytes (as well as strings of course), at least on Unix, but not
absolutely necessary -- the app could also just know the right encoding.

I see two reasonable alternatives for what os.listdir() should return
when the input is a string and one of the filenames can't be decoded:
either omit it from the output list; or use errors='replace' in the
encoding.  Failing the entire os.listdir() call is not acceptable, and
neither is returning a mixture of str and bytes instances.

--
nosy: +gvanrossum

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3338] cPickle segfault with deep recursion

2008-08-21 Thread Antoine Pitrou

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

Well, the standard recursion limit is precisely there to guard against
segfaults when blowing up the C stack, so if you make the recursion
limit much larger, it's quite normal to get segfaults.

Therefore, I don't think this is a real bug.

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3611] invalid exception context

2008-08-21 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

The bug is not closed :-/ With py3k trunk, I still get a crash. So I 
added a flag to detect inner calls. Here is an example of inner call 
backtrace:

(gdb) where
(...)
#2  0xb7df4201 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0x080a23a9 in PyErr_SetObject (exception=0x818b760, 
value=0xb75a3694) at Python/errors.c:61
#4  0x08094048 in do_raise (exc=0xb75a3694, cause=0x0) at 
Python/ceval.c:2928
#5  0x0808fa70 in PyEval_EvalFrameEx (f=0x83557d4, throwflag=0) at 
Python/ceval.c:1510
(...)
#23 0x08094bd8 in PyEval_CallObjectWithKeywords (func=0xb7a6c96c, 
arg=0xb7c6802c, kw=0x0) at Python/ceval.c:3283
#24 0x0806befd in slot_tp_del (self=0xb759d44c) at 
Objects/typeobject.c:5268
(...)
#26 0x0811f05d in PyDict_Clear (op=0xb7595e84) at 
Objects/dictobject.c:846
#27 0x08121112 in dict_tp_clear (op=0xb7595e84) at 
Objects/dictobject.c:1841
#28 0x080c81e9 in delete_garbage (collectable=0xbfcc75c4, 
old=0x8179434) at Modules/gcmodule.c:684
(...)
#31 0x080c9000 in _PyObject_GC_Malloc (basicsize=28) at 
Modules/gcmodule.c:1333
#32 0x08060aee in PyType_GenericAlloc (type=0x818b0a0, nitems=0) at 
Objects/typeobject.c:667
(...)
#37 0x080a24cc in PyErr_SetObject (exception=0x818b0a0, 
value=0xb75acea0) at Python/errors.c:87
(...)
#44 0x080912f7 in PyEval_EvalFrameEx (f=0x83660e4, throwflag=0) at 
Python/ceval.c:1940
(...)

First Python stack:

(gdb) pystack
/home/haypo/prog/py3k/Lib/io.py (1074): _flush_unlocked
/home/haypo/prog/py3k/Lib/io.py (1070): flush
/home/haypo/prog/py3k/Lib/io.py (1454): flush
/home/haypo/prog/py3k/Lib/io.py (1459): close
/home/haypo/prog/py3k/Lib/io.py (390): __del__
/home/haypo/fusil3000/fusil/process/cpu_probe.py (30): live
/home/haypo/fusil3000/fusil/mas/univers.py (15): executeAgent
(...)

Second Python stack:

(gdb) pystack
/home/haypo/fusil3000/fusil/process/cpu_probe.py (30): live
/home/haypo/fusil3000/fusil/mas/univers.py (15): executeAgent
/home/haypo/fusil3000/fusil/mas/univers.py (24): execute
/home/haypo/fusil3000/fusil/application.py (196): executeProject
(...)

So the real fix is to make PyErr_SetObject() re-entrant.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3611] invalid exception context

2008-08-21 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
resolution: accepted -> 
status: closed -> open

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3611] invalid exception context

2008-08-21 Thread Antoine Pitrou

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

On a Windows box, I manage to make the following script reliably hang on
a non-debug build of beta3. This can be a good base for further diagnosing.


def f():
class Bug:
def __del__(self):
1/0

import gc
trash = [Bug()]
trash.append(trash)
try:
gc.collect()
gc.set_threshold(1, 1, 1)
del trash
len()
except TypeError:
raise

if __name__ == "__main__":
f()

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3611] invalid exception context

2008-08-21 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

Here is a new snippet with strange exception handling:
- 8< -
from gc import collect
import _weakref

class FuzzingUserClass:
pass

obj = _weakref.ref(FuzzingUserClass)

# Exception not raised??
obj.__init__(
0,
0,
0,
)

# Exception catched here??
collect()
- 8< -

Result:
Exception TypeError: '__init__ expected at most 2 arguments, 
got 3' in 'garbage collection' ignored
Fatal Python error: unexpected exception during garbage collection
Abandon (core dumped)

The exception is raised in Objects/weakrefobject.c:
  weakref___init__() 
  => parse_weakref_init_args() 
  => PyArg_UnpackTuple() *here*

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2415] bytes() should respect __bytes__

2008-08-21 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Here's a patch. It's only implemented for bytes. Doing this for
bytearray would require a bit of refactoring, and can I think wait for
3.1. I added two new C functions. PyObject_Bytes and PyBytes_FromObject.
You can review it at http://codereview.appspot.com/3245.

--
keywords: +patch
Added file: http://bugs.python.org/file11194/2415.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3611] invalid exception context

2008-08-21 Thread Antoine Pitrou

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

Haypo, this is a separate bug I think. Please open a new ticket :)

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3634] invalid result value of _weakref.__init__()

2008-08-21 Thread STINNER Victor

New submission from STINNER Victor <[EMAIL PROTECTED]>:

_weakref.__init__() doesn't catch errors correctly. Example:
- 8< -
from gc import collect
import _weakref

class FuzzingUserClass:
pass

obj = _weakref.ref(FuzzingUserClass)

# Exception not raised??
obj.__init__(
0,
0,
0,
)

# Exception catched here??
collect()
- 8< -

Attached patch fix the bug for py3k branch: return -1 on error 
(instead of 1).

--
components: Library (Lib)
files: weakref_init.patch
keywords: patch
messages: 71662
nosy: haypo
severity: normal
status: open
title: invalid result value of _weakref.__init__()
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file11195/weakref_init.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3611] invalid exception context

2008-08-21 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

@pitrou: Ok, done (issue #3634). We were right, it's a different bug.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3611] invalid exception context

2008-08-21 Thread Amaury Forgeot d'Arc

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

Antoine, your script hangs at the end due to the io.py deadlock (see #3618)

- at the end of the script, flush_io() is called
- this enters code in io.py
- here, garbage collection occurs (thanks to low thresholds)
- the Bug() instance is collected
- the exception is handled by a PyErr_WriteUnraisable
- which tries to print

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3611] invalid exception context

2008-08-21 Thread Amaury Forgeot d'Arc

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

I found another way to loose the current exception context; see
lostcontext2.py

Completely removing the block starting with
   if (why == WHY_EXCEPTION && !throwflag) {
corrects the script;

but according to Benjamin: """removing those lines causes a RuntimeError
about exceeding the recursion limit for about 1/3 of the tests."""

So a better fix must be found. At least we have the unit test :-).

Added file: http://bugs.python.org/file11196/lostcontext2.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2356] sys.exitfunc should raise a Py3K warning

2008-08-21 Thread Brett Cannon

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

On Thu, Aug 21, 2008 at 6:43 AM, Benjamin Peterson
<[EMAIL PROTECTED]> wrote:
>
> Benjamin Peterson <[EMAIL PROTECTED]> added the comment:
>
> This is going to be very hard to implement without module descriptors.
> It might be better to make a 2to3 fixer which inserts an import too.
>

So for every sys import you are going to add an "import atexit"? That
doesn't seem reasonable. And if the call is in an expression context
you definitely cannot add the import.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2876] Write UserDict fixer for 2to3

2008-08-21 Thread Brett Cannon

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

As I said, it isn't using the import filter, it's whether this should be
done through a warning instead because the superclasses have changed.

I really should ask on python-dev about this.

--
priority: high -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2350] Warn against importing 'exceptions'

2008-08-21 Thread Brett Cannon

Changes by Brett Cannon <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2351] Using __(get|set|del)slice__ needs a Py3K warning

2008-08-21 Thread Brett Cannon

Changes by Brett Cannon <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2357] sys.exc_{type,values,traceback} needs a 2to3 fixer

2008-08-21 Thread Brett Cannon

Changes by Brett Cannon <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3602] Move test.test_suport.catch_warning() to the 'warnings' module

2008-08-21 Thread Brett Cannon

Changes by Brett Cannon <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3594] PyTokenizer_FindEncoding() never succeeds

2008-08-21 Thread Brett Cannon

Changes by Brett Cannon <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3574] compile() cannot decode Latin-1 source encodings

2008-08-21 Thread Brett Cannon

Changes by Brett Cannon <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2356] sys.exitfunc should raise a Py3K warning

2008-08-21 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

On Thu, Aug 21, 2008 at 1:21 PM, Brett Cannon <[EMAIL PROTECTED]> wrote:
>
> So for every sys import you are going to add an "import atexit"? That
> doesn't seem reasonable. And if the call is in an expression context
> you definitely cannot add the import.

You're right; it's not going to be perfect, but 2to3 could warn when
it couldn't insert the import statement.
>
> ___
> Python tracker <[EMAIL PROTECTED]>
> 
> ___
>

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2876] Write UserDict fixer for 2to3

2008-08-21 Thread Brett Cannon

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

You know what, Nick, go for the fixer. UserDict.UserDict will need a
deprecation warning, but otherwise a fixer for IterableUserDict and
DictMixin is fine.

And I can handle the deprecation if you want.

--
assignee: collinwinter -> 

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2356] sys.exitfunc should raise a Py3K warning

2008-08-21 Thread Brett Cannon

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

On Thu, Aug 21, 2008 at 11:45 AM, Benjamin Peterson
<[EMAIL PROTECTED]> wrote:
>
> Benjamin Peterson <[EMAIL PROTECTED]> added the comment:
>
> On Thu, Aug 21, 2008 at 1:21 PM, Brett Cannon <[EMAIL PROTECTED]> wrote:
>>
>> So for every sys import you are going to add an "import atexit"? That
>> doesn't seem reasonable. And if the call is in an expression context
>> you definitely cannot add the import.
>
> You're right; it's not going to be perfect, but 2to3 could warn when
> it couldn't insert the import statement.
>>

OK, I can live with that.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1342811] Tkinter.Menu.delete doesn't delete command of entry

2008-08-21 Thread Guilherme Polo

Changes by Guilherme Polo <[EMAIL PROTECTED]>:


--
keywords: +needs review -patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2008-08-21 Thread Guilherme Polo

Changes by Guilherme Polo <[EMAIL PROTECTED]>:


--
keywords: +needs review -patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3635] pickle.dumps cannot save instance of dict-derived class that overrides __getattribute__

2008-08-21 Thread Michael Yang

New submission from Michael Yang <[EMAIL PROTECTED]>:

# pickle.dumps is not able to process an instance of
# a class that inherits from 'dict' and
# overrides the built-in __getattribute__ method
# but can successfully process one that 
# overrides the__getattr__ method

>>> class Examp1(dict):
...   def __getattr__(self,name):
... return self[name]
... 
>>> class Examp2(dict):
...   def __getattribute__(self,name):
... return self[name]
... 
>>> ex1 = Examp1()
>>> ex2 = Examp2()
>>> ex1['aKey'] = (3,4)
>>> ex2['aKey2'] = (4,5)
>>> ex1
{'aKey': (3, 4)}
>>> ex1.aKey
(3, 4)
>>> ex2
{'aKey2': (4, 5)}
>>> ex2.aKey2
(4, 5)
>>> import pickle
>>> pickle.dumps(ex1)
b'\x80\x03c__main__\nexamp1\nq\x00)\x81q\x01X\x04\x00\x00\x00aKeyq\x02K\x03K\x04\x86q\x03s}q\x04b.'
>>> pickle.dumps(ex2)
Traceback (most recent call last):
  File "", line 1, in 
  File "[hidden]/python3/3.0b2/common/lib/python3.0/pickle.py", line
1319, in dumps
Pickler(f, protocol).dump(obj)
  File "", line 3, in __getattribute__
KeyError: '__reduce_ex__'

--
components: Extension Modules
messages: 71671
nosy: msyang
severity: normal
status: open
title: pickle.dumps cannot save instance of dict-derived class that overrides 
__getattribute__
type: behavior
versions: Python 2.5, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Mark Dickinson

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

Here's a patch for the test-suite to get more information about where 
float.fromhex is failing.  Could someone else please review this quickly 
so that I can check it in?  It shouldn't take more than a few minutes to 
review.

--
keywords: +needs review, patch
Added file: http://bugs.python.org/file11197/issue3633_test.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3419] multiprocessing module is racy

2008-08-21 Thread Mark Dickinson

Changes by Mark Dickinson <[EMAIL PROTECTED]>:


--
keywords: +needs review

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

That looks fine.

___
Python tracker <[EMAIL PROTECTED]>

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



  1   2   >