[issue2507] Exception state lives too long in 3.0

2008-05-07 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: No, I don't. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http

[issue2521] ABC caches should use weak refs

2008-05-07 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: -- nosy: +pitrou __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2779] Python 3.0a4 crashes on script in a path with non-ASCII characters (Windows)

2008-05-07 Thread Tim Pietzcker
New submission from Tim Pietzcker <[EMAIL PROTECTED]>: When I try to run a script that is contained in a directory whose path contains non-ASCII characters (e. g. Umlauts), Python 3.0a4 crashes with the following error message: (Windows cmd console): E:\Eigene Dateien\Klinikum\Qualitätsmanagemen

[issue2780] Python 3.0a4 crashes on script in a path with non-ASCII characters (Windows)

2008-05-07 Thread Tim Pietzcker
New submission from Tim Pietzcker <[EMAIL PROTECTED]>: Apologies if this has been reported before; I couldn#T find it on a search but maybe I used the wrong search terms. When I try to run a script that is contained in a directory whose path contains non-ASCII characters (e. g. Umlauts), Python

[issue2779] Python 3.0a4 crashes on script in a path with non-ASCII characters (Windows)

2008-05-07 Thread Tim Pietzcker
Tim Pietzcker <[EMAIL PROTECTED]> added the comment: Please delete this issue - clicked on "Submit" too soon. Sorry again. __ Tracker <[EMAIL PROTECTED]> __

[issue2610] string representation of range and dictionary views

2008-05-07 Thread Brad Miller
Brad Miller <[EMAIL PROTECTED]> added the comment: Is there any chance this patch will make it into the latest alpha?? Brad __ Tracker <[EMAIL PROTECTED]> __ __

[issue2778] set_swap_bodies is unsafe

2008-05-07 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: set_swap_bodies() is fine as it involves pure C with no possible callbacks. The issue is in its use in the __contains__() check. I'll take a look at it and see what if anything needs to be changed. Am lowering the priority because yo

[issue2781] Tiny patch to _winreg docs

2008-05-07 Thread Tim Golden
New submission from Tim Golden <[EMAIL PROTECTED]>: The docs for _winreg refer to RegLoadKey, which is the underlying API. The function is actually exposed as LoadKey. Patch attached. -- assignee: georg.brandl components: Documentation files: _winreg.patch keywords: patch messages: 66359

[issue2782] datetime/date strftime() method and time.strftime() inconsistency

2008-05-07 Thread Andrii V. Mishkovskyi
New submission from Andrii V. Mishkovskyi <[EMAIL PROTECTED]>: datetime and date strftime() method does additional check on input format, thus being completely different from time's module time.strftime() method behavior. There are two ways to fix this: 1. Add an explicit note about this behavior

[issue2772] Add PendingDeprecationWarning for % formatting

2008-05-07 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: I'm not sure Py_EnterRecursiveCall is what I want, because that allows the recursion to happen, but just aborts it when it gets too deep. What I want to achieve is to have the warning not called if it's the warning that's being formatted. I code

[issue2779] Python 3.0a4 crashes on script in a path with non-ASCII characters (Windows)

2008-05-07 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- resolution: -> invalid status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Pyt

[issue2783] ctypes.util.find_library() doesn't find OS X .bundle or .so libraries

2008-05-07 Thread Bill Janssen
New submission from Bill Janssen <[EMAIL PROTECTED]>: On OS X, dynamically loadable libraries come in several flavors: .bundle (or, often, .so) a standard dynamically loadable module; .dylib, a dynamically loadable module that is also a library that can be linked against like a .a file; .framewo

[issue1348] httplib closes socket, then tries to read from it

2008-05-07 Thread Adam Olsen
Changes by Adam Olsen <[EMAIL PROTECTED]>: -- nosy: +Rhamphoryncus __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscri

[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2008-05-07 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: Cleaned up version of Amaury's patch. I stop releasing the GIL after sys.exitfunc is called, which protects threads from the ensuing teardown. I also grab the import lock (and never release it). This should prevent the nasty issue with daemon t

[issue2302] Uses of SocketServer.BaseServer.shutdown have a race

2008-05-07 Thread Rafael Zanella
Rafael Zanella <[EMAIL PROTECTED]> added the comment: >With the code as it stands, calls to shutdown that happen before >serve_forever enters its loop will deadlock, and there's no simple way >for the user to avoid this. The attached patch prevents the deadlock and >allows multiple serve_forever.

[issue2772] Add PendingDeprecationWarning for % formatting

2008-05-07 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: On Wed, May 7, 2008 at 10:33 AM, Eric Smith <[EMAIL PROTECTED]> wrote: > I think a better approach will be to remove % formatting from > warnings.py. I think that will remove the need for any checks at all. > I'll investigate that. Tha

[issue2610] string representation of range and dictionary views

2008-05-07 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > Is there any chance this patch will make it into the latest alpha?? I don't think there is any such chance. __ Tracker <[EMAIL PROTECTED]>

[issue2610] string representation of range and dictionary views

2008-05-07 Thread Brad Miller
Brad Miller <[EMAIL PROTECTED]> added the comment: On May 7, 2008, at 1:55 PM, Martin v. Löwis wrote: Thanks for the very clear answer. This being my first attempt at contributing to the Python core, I am looking for some sort of clarity on the future of this patch. It feels like some sort

[issue2784] fast builtin sum may leak

2008-05-07 Thread Jean Brouwers
New submission from Jean Brouwers <[EMAIL PROTECTED]>: The new, fast builtin sum implementation may cause a memory leak in the float loop. Both lines PyFPE_START_PROTECT("add", return 0) should be changed to PyFPE_START_PROTECT("add", Py_DECREF(item); Py_DECREF(iter); return 0) The

[issue2785] alternate fast builtin sum

2008-05-07 Thread Jean Brouwers
New submission from Jean Brouwers <[EMAIL PROTECTED]>: The attached patch bltmodule2.c.diff is a different implementation of the fast summation code for your consideration. It uses three separate sums to add ints, floats and other objects. All ints are accumulated into a C long, reset even af

[issue2722] os.getcwd fails for long path names on linux

2008-05-07 Thread Matthias Urlichs
Matthias Urlichs <[EMAIL PROTECTED]> added the comment: MAX_PATH is a compile time constant which, like FD_BITS for select(), may be too small for the system you're ultimately running on. Using that as default initial size is OK, but handling ERANGE is still a very good idea. -- nosy: +

[issue2778] set_swap_bodies is unsafe

2008-05-07 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: The intended use is unsafe. contains, remove, and discard all use it for a lookup, which can't be fixed. Upon further inspection, intersection_update is fine. Only a temporary set (not frozenset!) is given junk, which I don't see as a problem.

[issue2726] Autodoc's autoclass directive should include constructor docstring

2008-05-07 Thread Abhik Shah
Abhik Shah <[EMAIL PROTECTED]> added the comment: Works great.. Thanks! On Sun, May 4, 2008 at 5:38 AM, Georg Brandl <[EMAIL PROTECTED]> wrote: > > Georg Brandl <[EMAIL PROTECTED]> added the comment: > > Okay, I added a config value ("autoclass_content") in r62697. Let me > know what you thin

[issue2786] Names in traceback should have class names, if they're methods

2008-05-07 Thread Matthias Urlichs
New submission from Matthias Urlichs <[EMAIL PROTECTED]>: Consider this simple error: >>> class foo(object): ... def __init__(self,bar): ...pass ... >>> foo() Traceback (most recent call last): File "", line 1, in TypeError: __init__() takes exactly 2 positional arguments (1 given) >>>

[issue2784] fast builtin sum may leak

2008-05-07 Thread Jean Brouwers
Jean Brouwers <[EMAIL PROTECTED]> added the comment: There is one other, similar issue in the Modules/imgfile.c file. Line 327 is PyFPE_START_PROTECT("readscaled", return 0) and should probably be PyFPE_START_PROTECT("readscaled", iclose(image); return 0) /Jean Brouwers _

[issue2787] Patch to flush unittest output

2008-05-07 Thread Adam Olsen
New submission from Adam Olsen <[EMAIL PROTECTED]>: In 3.0, unittest's output has become line buffered. Instead of printing the test name when it starts a test, then "ok" when it finishes, the test name is delayed until the "ok" is printed. This makes it unnecessarily hard to determine which te

[issue2787] Patch to flush unittest output

2008-05-07 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: Hrm, this behaviour exists in trunk as well. I must be confused about the cause (but the patch still fixes it.) __ Tracker <[EMAIL PROTECTED]> __

[issue2788] ignore file for Mercurial

2008-05-07 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: Here is an .hgignore file to put in the base directory of both the trunk and the py3k branch. -- components: Build files: .hgignore messages: 66377 nosy: pitrou severity: normal status: open title: ignore file for Mercurial versions

[issue2785] alternate fast builtin sum

2008-05-07 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: What is the benefit of this new implementation? If it is faster, can you give us any performance numbers? (for example using timeit) -- nosy: +pitrou __ Tracker <[EMAIL PROTECTED]>

[issue2507] Exception state lives too long in 3.0

2008-05-07 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a last patch fixing without lines longer than 78 chars. Added file: http://bugs.python.org/file10213/exc_cleanup4.patch __ Tracker <[EMAIL PROTECTED]> ___

[issue2750] Add simplejson to Python 2.6/3.0 standard library

2008-05-07 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Command to merge json into 3.0: svnmerge.py unblock -r62734,62736,62748,62769; svnmerge.py merge --force -r62734,62736,62748,62769 __ Tracker <[EMAIL PROTECTED]> __

[issue2750] Add simplejson to Python 2.6/3.0 standard library

2008-05-07 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: On Wed, May 7, 2008 at 7:08 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > > Christian Heimes <[EMAIL PROTECTED]> added the comment: > > Command to merge json into 3.0: > > svnmerge.py unblock -r62734,62736,62748,62769; svnmerge.py me

[issue2785] alternate fast builtin sum

2008-05-07 Thread Jean Brouwers
Jean Brouwers <[EMAIL PROTECTED]> added the comment: I did not compare performance (yet). If there is a particular test case, I am happy to measure that. Also, I made sure that the results and errors (!) for non-numeric items are the same as for the original, Slow Summation case. The versio

[issue2750] Add simplejson to Python 2.6/3.0 standard library

2008-05-07 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Because I haven't committed the result of svnmerge.py unblock yet. svnmerge.py refuses to work on a sandbox with uncommitted changes. 2to3: ./python Tools/scripts/2to3 -w Lib/json/ ./python Tools/scripts/2to3 -w -d Lib/json/ _

[issue2772] Add PendingDeprecationWarning for % formatting

2008-05-07 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: > That would make user code warning that uses '%"' brittle. However, if > we warn about it, I think it's ok. True enough. Then I think we should go with: 1. Use .format() in the warnings module. 2. Tell the users not to use % formatting in user

[issue2750] Add simplejson to Python 2.6/3.0 standard library

2008-05-07 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: I got the JSON module working under Python 3.0. I'm still not happy with the mixing of bytes and unicode, though. The patch contains additional changes to "svnmerge.py unblock -r62734,62736,62748,62769; svnmerge.py merge --force -r62734,627

[issue2650] re.escape should not escape underscore

2008-05-07 Thread Rafael Zanella
Rafael Zanella <[EMAIL PROTECTED]> added the comment: AFAIK the lookup on dictionaries is faster than on lists. Patch added, mainly a compilation of the previous patches with an expanded test. -- nosy: +zanella Added file: http://bugs.python.org/file10215/re_patch.diff

[issue2785] alternate fast builtin sum

2008-05-07 Thread Jean Brouwers
Jean Brouwers <[EMAIL PROTECTED]> added the comment: Here is one, simple comparison between 3 different builtin_sum's, all measured on the same machine, MacOS X 10.4.11 (Intel Duo): 1) Python 2.5.1 ActiveState with standard Slow Summation: % python2.5.1 -mtimeit --setup="x=[1.0e12, 7]*100"

[issue1346238] A constant folding optimization pass for the AST

2008-05-07 Thread Thomas Lee
Thomas Lee <[EMAIL PROTECTED]> added the comment: I'm working on the AST optimization code for 2.7 (?) in the tlee-ast-optimize branch. I've since adopted some of the ideas from this patch, but I'll take another look when I get a chance. The folding operation is already mostly in-place.

[issue2785] alternate fast builtin sum

2008-05-07 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Will take a look at this one but am inclined to reject it. The timing benefits are marginal at best and only help in the atypical case of mixed floats and ints. The patch changes the type and ordering of intermediate sums, resulting in

[issue2784] fast builtin sum may leak

2008-05-07 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: -> rhettinger nosy: +rhettinger __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bug

[issue2523] binary buffered reading is quadratic

2008-05-07 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Here is a pure Python patch removing the quadratic behaviour and trying to make read operations generally faster. Here are some numbers: ./python -m timeit -s "f = open('50KB', 'rb')" "f.seek(0)" "while f.read(11): pass" -> py3k without pat

[issue2750] Add simplejson to Python 2.6/3.0 standard library

2008-05-07 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: When you've merged it, I'll alter the 3.0 docs. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bug

[issue2717] tempfile.mkstempf

2008-05-07 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: The conclusion on python-dev is that NamedTemporaryFile is an adequate replacement for mktemp, so this isn't needed. -- resolution: -> rejected status: open -> closed __ Tracker <[EMAIL PROTECTED]>

[issue2523] binary buffered reading is quadratic

2008-05-07 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I see that the code is still using the immutable bytes object for its buffer (which forces Python to create a new buffer every time its modified). Also, I think it worthwhile to check if using a pre-allocated bytearray object (i.e., byte

[issue1179] [CVE-2007-4965] Integer overflow in imageop module

2008-05-07 Thread Barry A. Warsaw
Barry A. Warsaw <[EMAIL PROTECTED]> added the comment: This is not a release blocker for 2.6 or 3.0. -- nosy: +barry priority: release blocker -> critical __ Tracker <[EMAIL PROTECTED]> __

[issue2778] set_swap_bodies is unsafe

2008-05-07 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: I decided not to wait. Here's a patch. Several of set's unit tests covered the auto-conversion, so I've modified them. -- keywords: +patch Added file: http://bugs.python.org/file10217/python-setswap.diff ___

[issue2523] binary buffered reading is quadratic

2008-05-07 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Hi Alexandre, I first tried to use a (non-preallocated) bytearray object and, after trying several optimization schemes, I found out that the best one worked as well with an immutable bytes object :) I also found out that the bytes <-> bytear

[issue2788] ignore file for Mercurial

2008-05-07 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I have a slightly different .hgignore for my personal mercurial branch. Although, I don't really like the idea of polluting the main subversion repository with the ignore files of other VCS. -- nosy: +alexandre.vassalotti Added

[issue2548] Undetected error in exception handling

2008-05-07 Thread Barry A. Warsaw
Barry A. Warsaw <[EMAIL PROTECTED]> added the comment: I'm not going to hold up the 2.6 alpha release for this, but will bump it up for the first 2.6 beta. -- nosy: +barry priority: release blocker -> critical __ Tracker <[EMAIL PROTECTED]>

[issue2235] __eq__ / __hash__ check doesn't take inheritance into account

2008-05-07 Thread Barry A. Warsaw
Barry A. Warsaw <[EMAIL PROTECTED]> added the comment: Guido, can you comment on Amaury's latest patch? I'm going to bump this back to critical so as not to hold up 2.6 alpha, but it should be marked as a release blocker for the first beta. -- nosy: +barry priority: release blocker -> c

[issue2632] performance problem in socket._fileobject.read

2008-05-07 Thread Barry A. Warsaw
Barry A. Warsaw <[EMAIL PROTECTED]> added the comment: Bumping this down to critical for the alpha release. It should be release blocker for the first beta. -- nosy: +barry priority: release blocker -> critical __ Tracker <[EMAIL PROTECTED]>

[issue2778] set_swap_bodies is unsafe

2008-05-07 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Rejecting this patch which simply disables a feature that some users consider to be important. I will look at it further. Right now, I'm inclined to simply document that the three temporary autoconversions deny meaningful contemporaneo

[issue2789] Comparsion datetime objects with None

2008-05-07 Thread Alexandr Zamaraev
New submission from Alexandr Zamaraev <[EMAIL PROTECTED]>: When comparing any standard objects with None returned True or False. When comparing the object of the module datetime with None raised exception TypeError. Example Python session: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1

[issue2532] file that breaks 2to3 (despite being correct python)

2008-05-07 Thread Rodrigo Bernardo Pimentel
Changes by Rodrigo Bernardo Pimentel <[EMAIL PROTECTED]>: -- nosy: +rbp __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsu

[issue2222] Memory leak in os.rename?

2008-05-07 Thread Neal Norwitz
Changes by Neal Norwitz <[EMAIL PROTECTED]>: -- priority: normal -> critical __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue2507] Exception state lives too long in 3.0

2008-05-07 Thread Barry A. Warsaw
Barry A. Warsaw <[EMAIL PROTECTED]> added the comment: r62847 -- priority: release blocker -> critical resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ __

[issue2778] set_swap_bodies is unsafe

2008-05-07 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: PEP 218 explicitly dropped auto-conversion as a feature. Why should this be an exception? __ Tracker <[EMAIL PROTECTED]> __ __

[issue1179] [CVE-2007-4965] Integer overflow in imageop module

2008-05-07 Thread Ismail Donmez
Ismail Donmez <[EMAIL PROTECTED]> added the comment: This _must_ be a release blocker for Python 3.0, Its a shame that this bug still is not fixed and a patch is available for months now. __ Tracker <[EMAIL PROTECTED]> __

[issue2778] set_swap_bodies is unsafe

2008-05-07 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: If needed, I'll update the PEP to be more clear. The sets.py module had two protocols: __as_immutable__() and __as_temporarily_immutable__ (). The first protocol was the one that was dropped -- it triggered with something like "s1.add(s

[issue1179] [CVE-2007-4965] Integer overflow in imageop module

2008-05-07 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: imageop is deleted in 3.0. See PEP 3108. So it can't be a release blocker. This also explains my general lack of interest in this module. __ Tracker <[EMAIL PROTECTED]>

[issue1179] [CVE-2007-4965] Integer overflow in imageop module

2008-05-07 Thread Ismail Donmez
Ismail Donmez <[EMAIL PROTECTED]> added the comment: I am sorry for the drama then, :) __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing lis

[issue2788] ignore file for Mercurial

2008-05-07 Thread Georg Brandl
Changes by Georg Brandl <[EMAIL PROTECTED]>: -- assignee: -> georg.brandl nosy: +georg.brandl __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs