[issue2404] Backport ctypes support for buffer protocol to Python 2.6 (ref issue1971)

2008-08-21 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: I forgot to close this issue. Already implemented in svn rev 63962. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___

[issue2764] c_char doesn't implement py3k buffer interface

2008-08-21 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: The test has already been fixed and reenabled in rev 65849. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]>

[issue3645] readline module Crashs on OpenBSD/amd64

2008-08-21 Thread Henry Precheur
Henry Precheur <[EMAIL PROTECTED]> added the comment: Looks like this patch should also be applied to python 2.6 & 3. I did not tested but the patch is trivial enough to be applied without too much fear of breaking something ;) ___ Python tracker <[EMAIL PROT

[issue3645] readline module Crashs on OpenBSD/amd64

2008-08-21 Thread Henry Precheur
New submission from Henry Precheur <[EMAIL PROTECTED]>: $ python2.5 Python 2.5.2 (r252:60911, Jun 16 2008, 15:20:47) [GCC 3.3.5 (propolice)] on openbsd4

[issue3338] cPickle segfault with deep recursion

2008-08-21 Thread Darryl Dixon
Darryl Dixon <[EMAIL PROTECTED]> added the comment: Well, it's definitely a bug, or inconsistency, if you like, between cPickle and pickle. My gut says that probably there is some fault in cPickle that is causing this. When pickle.py can recurse to 10,000+ and cPickle segfaults at 2600 on a 64bi

[issue3639] segfaults calling warnings.warn() with non-string message

2008-08-21 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: If you search for _PyUnicode_AsString() in Python/_warnings.c you will find several places that assume that the proper measures have been taken to make sure the object is a string. All of those places need to be fixed so that if a string is not

[issue3644] ``make htmlview`` for docs fails on OS X

2008-08-21 Thread Brett Cannon
New submission from Brett Cannon <[EMAIL PROTECTED]>: Running ``make htmlview`` on OS X Leopard causes the following:: > make htmlview ~/Dev/python/3.x/scratch/Doc mkdir -p build/html build/doctrees python2.5 tools/sphinx-build.py -b html -d build/doctrees

[issue2366] Fixer for new metaclass syntax is needed

2008-08-21 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: On Thu, Aug 21, 2008 at 9:38 PM, Jack Diederich <[EMAIL PROTECTED]> wrote: > > Jack Diederich <[EMAIL PROTECTED]> added the comment: > > Benjamin, the 2to3 parse tree straddles the 2.x Grammar and 3.x Grammar > (it's its own thing) which is

[issue2366] Fixer for new metaclass syntax is needed

2008-08-21 Thread Jack Diederich
Jack Diederich <[EMAIL PROTECTED]> added the comment: Benjamin, the 2to3 parse tree straddles the 2.x Grammar and 3.x Grammar (it's its own thing) which is why fixup_parse_tree is there. From the docstring: one-line classes don't get a suite in the parse tree so we add one to normalize the tre

[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: The buildbot is still failing, but not on test_math. -- status: pending -> closed ___ Python tracker <[EMAIL PROTECTED]> __

[issue3643] Add more checks to testcapi

2008-08-21 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Your patches are pretty harmless, but this module is just for testing purposes. -- nosy: +benjamin.peterson priority: -> normal ___ Python tracker <[EMAIL PROTECTED]>

[issue3643] Add more checks to testcapi

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Python 3.0 has an new function which requires an extra patch: exception_print() have to check that the argument is an exception instance: >>> import _testcapi >>> _testcapi.exception_print(10) Erreur de segmentation (core dumped)

[issue3643] Add more checks to testcapi

2008-08-21 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: test_thread_state() doesn't check that the argument is a function and doesn't check function call result and so the exception is catched later: Non callable argument: import _testcapi _testcapi._test_thread_state(10) # no excepti

[issue3642] Objects/obmalloc.c:529: warning: comparison is always false due to limited range of data type

2008-08-21 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: I'm seeing a similar issue in py3k: Objects/bytesobject.c: In function '_PyBytes_FormatLong': Objects/bytesobject.c:3203: warning: comparison is always false due to limited range of data type ___ Python

[issue3642] Objects/obmalloc.c:529: warning: comparison is always false due to limited range of data type

2008-08-21 Thread Christian Heimes
New submission from Christian Heimes <[EMAIL PROTECTED]>: I'm getting a compiler warning on Linux AMD64. It's most probably an issue related to 64bit builds, because size_t > uint_t on 64bit systems. Such warnings may hide overflow issues. gcc -pthread -c -fno-strict-aliasing -g -Wall -Wstrict-p

[issue3611] invalid exception context

2008-08-21 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- keywords: +needs review ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-

[issue3611] invalid exception context

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: With my last patch (pyerr_setobject_reentrant-v2.patch) my program works fine! I known that PyErr_SetObject() makes re-entrant calls every ~30 seconds, so the code is tested ;-) ___ Python tracker <[EMAIL

[issue3641] Builtin ascii() function from future_builtins includes leading "u" of unicode strings

2008-08-21 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: This is a side effect of ascii returning a python 2.x unicode object. The repr still gives a leading "u". The point of ascii is that it returns a unicode object with only ascii characters. See PEP 3138 for more information. -- nosy

[issue3639] segfaults calling warnings.warn() with non-string message

2008-08-21 Thread Daniel Diniz
Daniel Diniz <[EMAIL PROTECTED]> added the comment: Two small clues. First, a backtrace: #0 0xb7df102a in strcmp () from /lib/tls/i686/cmov/libc.so.6 #1 0x0809e678 in warn_explicit (category=0x81dd140, message=0xb7ac58f4, filename=0xb7acced0, lineno=1, module=0xb7f53300, registry=0xb7ac9e

[issue3641] Builtin ascii() function from future_builtins includes leading "u" of unicode strings

2008-08-21 Thread tav
New submission from tav <[EMAIL PROTECTED]>: Perhaps I misunderstood the intended behaviour of the ascii() builtin in the future_builtins module, but the following behaviour is unexpected: >>> from __future__ import unicode_literals >>> from future_builtins import ascii >>> test = 'hello

[issue1777458] glob doesn't return unicode with unicode parameter

2008-08-21 Thread Lee Cantey
Lee Cantey <[EMAIL PROTECTED]> added the comment: Updated original report with the following: 2.5.1 (r251:54863, Jul 10 2008, 17:24:48) Fails for me with 2.5.1 on Linux, OS X, and Windows. >>> glob.glob("*") ['t.txt', 't\xd0\xb4.txt', 't\xe2\xbd\x94.txt'] >>> glob.glob(u"*") ['t.txt', 't\xd0\x

[issue1001604] glob doesn't return unicode with no dir in unicode filename

2008-08-21 Thread Lee Cantey
Lee Cantey <[EMAIL PROTECTED]> added the comment: 2.5.1 (r251:54863, Jul 10 2008, 17:24:48) Fails for me with 2.5.1 on Linux, OS X, and Windows. >>> glob.glob("*") ['t.txt', 't\xd0\xb4.txt', 't\xe2\xbd\x94.txt'] >>> glob.glob(u"*") ['t.txt', 't\xd0\xb4.txt', 't\xe2\xbd\x94.txt'] >>> glob.glob(u

[issue3187] os.listdir can return byte strings

2008-08-21 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: >> I do not accept an os.listdir() that raises an error because one >> filename cannot be decoded. It sounds like using errors='replace' is >> also wrong -- so the only solution is for os.listdir() to skip files it >> cannot decode. While

[issue3611] invalid exception context

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Ok, it was not enough: exc_{type,value,traceback} have to be saved/restored. So here is a new patch. I doesn't change Python behaviour for previous pitrou snippet (msg71658): it doesn't crash here and display two errors. I think that this

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

2008-08-21 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Thanks for the work, Jeff! I reviewed the fixer, changed a few things, added a few more tests, and committed it in r65968. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EM

[issue3107] test_list uses unreasonable amounts of memory on 64-bit Linux

2008-08-21 Thread Mark Hammond
Mark Hammond <[EMAIL PROTECTED]> added the comment: It looks like I made a dupe at http://bugs.python.org/issue3625, where I reported the same thing on 64bit windows (and 2 other cases that I'd be interested to know if cause problems for you too...) -- nosy: +mhammond __

[issue3625] test issues on 64bit windows

2008-08-21 Thread Mark Hammond
Mark Hammond <[EMAIL PROTECTED]> added the comment: I forgot about sys.maxsize - that makes things much cleaner, and even means I don't need to skip the check for insane amounts of memory. If you think this is OK, please also specifically say if you approve for me to check it into trunk for 2.6.

[issue3187] os.listdir can return byte strings

2008-08-21 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: On Thu, Aug 21, 2008 at 6:31 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > Guido van Rossum <[EMAIL PROTECTED]> added the comment: > > So shutil should be fixed to pass a bytes value to os.listdir(). But > then os.remove() should be

[issue3187] os.listdir can return byte strings

2008-08-21 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: So shutil should be fixed to pass a bytes value to os.listdir(). But then os.remove() should be fixed to accept bytes as well. This is the crux I believe: on Unix at least, syscall wrappers should accept bytes for filenames. And this woul

[issue3611] invalid exception context

2008-08-21 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: It's now known that PyErr_SetObject() have to be re-entrant because of the garbage collector interaction. As I wrote in my comments, tstate may be changed during PyEval_CallObject() call. The problem is to known which values have to be prot

[issue3640] test_cpickle crash on AMD64 Windows build

2008-08-21 Thread Mark Hammond
Changes by Mark Hammond <[EMAIL PROTECTED]>: -- assignee: -> mhammond keywords: +64bit ___ Python tracker <[EMAIL PROTECTED]> ___ ___ P

[issue3640] test_cpickle crash on AMD64 Windows build

2008-08-21 Thread Mark Hammond
New submission from Mark Hammond <[EMAIL PROTECTED]>: [from python-dev] I've found a recursion related crash in test_cpickle on 64bit builds. Specifically, the 'cPickleDeepRecursive' is causing a stack overflow, and the debugger tells me the actual recursion depth was 629 at the crash. The reas

[issue3107] test_list uses unreasonable amounts of memory on 64-bit Linux

2008-08-21 Thread Tony Wallace
Tony Wallace <[EMAIL PROTECTED]> added the comment: It worked- I took a patch of r65334, as svn diff -c 65334 "http://svn.python.org/projects/python/branches/release25-maint"; and applied that patch ONLY to a clean release 2.5.2 source, ignoring the patch failure in Misc/NEWS. Built it all ov

[issue3639] segfaults calling warnings.warn() with non-string message

2008-08-21 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- assignee: -> brett.cannon nosy: +brett.cannon priority: -> release blocker ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3445] Ignore missing attributes in functools.update_wrapper

2008-08-21 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: If the object being wrapped isn't a plain vanilla function, then the odds are *very* good that __doc__ cannot be copied to the new function and still be correct. This is definitely the case for both modules and partial objects. So for both the

[issue3639] segfaults calling warnings.warn() with non-string message

2008-08-21 Thread Lisandro Dalcin
New submission from Lisandro Dalcin <[EMAIL PROTECTED]>: from warnings import warn warn("hello world") # -> Success warn(UserWarning) # -> Segmentation fault warn(None) # -> Segmentation fault warn(1) # -> Segmentation fault -- components: Interpreter Core message

[issue3182] 2to3 Slight Patch

2008-08-21 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- resolution: -> rejected status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___

[issue2012] Add migration step for DictMixin -> collections.MutableMapping

2008-08-21 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- resolution: -> duplicate status: open -> closed superseder: -> Write UserDict fixer for 2to3 ___ Python tracker <[EMAIL PROTECTED]> _

[issue2431] 2to3 is rather slow

2008-08-21 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: I think we can safely say this has been fixed especially with regards to fix_imports. Thanks to Nick Edds! It only takes me about 3 seconds to process the example file. -- nosy: +benjamin.peterson resolution: -> fixed status: open

[issue2366] Fixer for new metaclass syntax is needed

2008-08-21 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Good work on the patch! It looks pretty good. I'm attaching a patch with a few minor changes. I don't really understand the need for fixup_parse_tree, since I see in the Grammar that a suite is required for every classdef.

[issue3638] tkinter.mainloop() is meanling less and crash: remove it

2008-08-21 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: mainloop() is a method of a Tkapp object, but it's also a method of _tkinter module. In TkApp_MainLoop, self is seen as a TkappObject whereas it can be a module object! So instruction like "self->dispatch=1" will replace a random byte in

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

2008-08-21 Thread Yaakov (Cygwin Ports)
Yaakov (Cygwin Ports) <[EMAIL PROTECTED]> added the comment: Thank you, that fixes that issue. But further along the build fails: Traceback (most recent call last): File "/usr/src/ports/python/python3.0/python3.0-3.0b3-1/src/Python-3.0b3/setup.py", line 1569, in class PyBuildInstallLib(i

[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Thanks, Antoine. Committed, r65964 (2.6) and r65965 (3.0). Setting status to pending; will close if/when the Solaris buildbot goes green. -- resolution: -> fixed status: open -> pending ___ Py

[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le jeudi 21 août 2008 à 21:26 +, Mark Dickinson a écrit : > Here's a patch. I'm reasonably confident that this should fix the > problem, but I don't have a Solaris machine to test it on. > > If anyone can check this on Solaris that woul

[issue2415] bytes() should respect __bytes__

2008-08-21 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Well, yes I suppose. However, I think it's a serious enough deficiency that it should block. I'll let Barry decide, though. -- assignee: -> barry ___ Python tracker <[EMAIL PROTECTED]>

[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Mark Dickinson
Changes by Mark Dickinson <[EMAIL PROTECTED]>: -- keywords: +needs review ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-lis

[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: ...and here's the actual patch! Added file: http://bugs.python.org/file11199/issue3633.patch ___ Python tracker <[EMAIL PROTECTED]> __

[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Here's a patch. I'm reasonably confident that this should fix the problem, but I don't have a Solaris machine to test it on. If anyone can check this on Solaris that would be fantastic, but I'll settle for a 'looks okay to me' from another

[issue2415] bytes() should respect __bytes__

2008-08-21 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Isn't it a new feature and, therefore, should wait for 3.1? -- nosy: +pitrou ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Le jeudi 21 août 2008 à 21:12 +, Mark Dickinson a écrit : > For now, it just seems simplest to replace the isxdigit call with an > explicit check for the ASCII 7-bit characters '0' through '9', 'a' > through 'f'. +1 I don't think it mak

[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate

2008-08-21 Thread Bill Janssen
Bill Janssen <[EMAIL PROTECTED]> added the comment: checking hostnames is false security, not real security. On 8/20/08, Heikki Toivonen <[EMAIL PROTECTED]> wrote: > > Heikki Toivonen <[EMAIL PROTECTED]> added the comment: > > > I would think most people/applications want to know to which host

[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: The problem appears to be that on Solaris, the isxdigit function (which is supposed to check whether a character is a valid hex digit) returns true for Unicode fullwidth digits. On other systems I have access to, isxdigit just returns true

[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 18:17:47 Guido van Rossum, vous avez écrit : > The proper work-around is for the app to pass bytes into os.listdir(); > then it will return bytes. In my case, I just would like to remove a directory with shutil.rmtr

[issue3628] IDLE does not run with Py30b3

2008-08-21 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: This should be changed in 2.6 as well (from sockthread.setDaemon(True) to sockthread.daemon = True). By the way, I notice that there are also used of setDaemon, isDaemon, getName and setName in Lib/multiprocessing/dummy/__init__.py; these

[issue3637] 2to3 refactoring

2008-08-21 Thread Benjamin Peterson
New submission from Benjamin Peterson <[EMAIL PROTECTED]>: The attached patch moves cmdline processing logic out of RefactoringTool and into its own module lib2to3.main. Guido and Collin: If you could review this (it's on Rietveld [1]) sometime soon, I can check this in and start writing the API

[issue2415] bytes() should respect __bytes__

2008-08-21 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- keywords: +needs review ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-

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

2008-08-21 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- keywords: +needs review ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list

[issue3594] PyTokenizer_FindEncoding() never succeeds

2008-08-21 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- keywords: +needs review ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list

[issue3445] Ignore missing attributes in functools.update_wrapper

2008-08-21 Thread Piotr Findeisen
Piotr Findeisen <[EMAIL PROTECTED]> added the comment: IMO, I'd be better to always ignore missing attributes. Consider another use case (following code I've posted also on comp.lang.python): from functools import wraps, partial def never_throw(f): @wraps(f) def wrapper(*args, **kwargs):

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

2008-08-21 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- keywords: +needs review ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list

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

2008-08-21 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- keywords: +needs review ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list

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

2008-08-21 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- keywords: +patch ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing

[issue3636] Managing dual 2.x and 3.0 installations on Windows

2008-08-21 Thread richard_b_martin
New submission from richard_b_martin <[EMAIL PROTECTED]>: I installed a 3.0 beta for the first time in Windows. I was surprised when my 2.5 scripts started to fail. I traced it down to the 3.0 install modifying the registry. If you run "assoc .py" from a command line, the return value is Pyt

[issue3633] float.fromhex discrepancy under Solaris

2008-08-21 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Thanks, Benjamin! Change to test committed in r65958, merged to py3k in r65959. Time to watch the py3k solaris buildbot. -- keywords: -needs review ___ Python tracker <[EMAIL PROTECTED]>

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

2008-08-21 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: I think the new patch looks fine and should be applied. -- nosy: +benjamin.peterson ___ Python tracker <[EMAIL PROTECTED]> _

[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

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

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

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

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

[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]> ___ ___ Pytho

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

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

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

[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]> ___ ___ Pyt

[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]> ___ ___ Pyt

[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]> ___ ___ Pyt

[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]> ___ ___ Pyt

[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]> ___ ___ Pyt

[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]> ___ ___ Pyt

[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

[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

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

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

[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]> ___ __

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

[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]> ___ _

[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://code

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

[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

[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]> ___

[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 0x080a23

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

[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

[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]> ___ ___

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

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

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

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

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

  1   2   >