[issue2370] operator.{isCallable,sequenceIncludes} needs a fixer

2008-05-06 Thread Jeff Balogh
Jeff Balogh <[EMAIL PROTECTED]> added the comment: Updating the deprecation warnings patch to use PyErr_WarnPy3k and apply correctly against current trunk. Added file: http://bugs.python.org/file10206/operator-warnings.diff __ Tracker <[EMAIL PROTECTED]>

[issue2370] operator.{isCallable,sequenceIncludes} needs a fixer

2008-05-06 Thread Jeff Balogh
Changes by Jeff Balogh <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9787/operator-warnings.diff __ Tracker <[EMAIL PROTECTED]> __ ___ P

[issue2370] operator.{isCallable,sequenceIncludes} needs a fixer

2008-05-06 Thread Jeff Balogh
Jeff Balogh <[EMAIL PROTECTED]> added the comment: doh! Attaching a new patch that actually contains a fixer. Added file: http://bugs.python.org/file10205/issue2370.diff __ Tracker <[EMAIL PROTECTED]> __

[issue2370] operator.{isCallable,sequenceIncludes} needs a fixer

2008-05-06 Thread Jeff Balogh
Changes by Jeff Balogh <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9779/issue2370.diff __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bu

[issue2772] Add PendingDeprecationWarning for % formatting

2008-05-06 Thread Neal Norwitz
Neal Norwitz <[EMAIL PROTECTED]> added the comment: Why not use the normal recursion check mechanism? Specifically, if (Py_EnterRecursiveCall("unicode % ")) return NULL; // err = Warn(); Py_LeaveRecursiveCall(); I don't see where the problem with threads co

[issue2778] set_swap_bodies is unsafe

2008-05-06 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- assignee: -> rhettinger nosy: +rhettinger __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bug

[issue2778] set_swap_bodies is unsafe

2008-05-06 Thread Adam Olsen
New submission from Adam Olsen <[EMAIL PROTECTED]>: set_swap_bodies() is used to cheaply create a frozenset from a set, which is then used for lookups within a set. It does this by creating a temporary empty frozenset, swapping its contents with the original set, doing the lookup using the froze

[issue2775] Implement PEP 3108

2008-05-06 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- keywords: +easy __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2775] Implement PEP 3108

2008-05-06 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: If you use TextMate, get the Python-Dev bundle and use the command in there to insert the deprecation boilerplate for removing a module. __ Tracker <[EMAIL PROTECTED]>

[issue2777] subprocess unit tests for kill, term and send_signal flaky

2008-05-06 Thread Christian Heimes
New submission from Christian Heimes <[EMAIL PROTECTED]>: The unit tests for the kill, term and send_signal methods of the subprocess.Popen object are still flaky and sometimes cause the test suite to hang. I'm going to disable them for the upcoming alpha until I've found a better solution.

[issue2772] Add PendingDeprecationWarning for % formatting

2008-05-06 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: > Well, the first thing to check for is Py_Py3kWarning. Then do the > extra logic and execution speed. In 3.0, it's always a PendingDeprecationWarning, so that won't work. The test needs to be: if not recursing and warning_is_not_suppressed:

[issue2370] operator.{isCallable,sequenceIncludes} needs a fixer

2008-05-06 Thread Collin Winter
Changes by Collin Winter <[EMAIL PROTECTED]>: -- components: -Build, Demos and Tools, Distutils, Documentation, Documentation tools (Sphinx), IDLE, Installation, Interpreter Core, Library (Lib), Macintosh, Regular Expressions, Tests, Tkinter, Unicode, Windows, XML, ctypes ___

[issue2370] operator.{isCallable,sequenceIncludes} needs a fixer

2008-05-06 Thread Collin Winter
Collin Winter <[EMAIL PROTECTED]> added the comment: I believe you forgot to add fix_operator.py to this patch. -- components: +Build, Demos and Tools, Distutils, Documentation, Documentation tools (Sphinx), Extension Modules, IDLE, Installation, Interpreter Core, Library (Lib), Macint

[issue2507] Exception state lives too long in 3.0

2008-05-06 Thread Collin Winter
Collin Winter <[EMAIL PROTECTED]> added the comment: Looks good to me. Antoine, do you have commit privileges? __ Tracker <[EMAIL PROTECTED]> __ ___ Pyth

[issue2776] urllib2.urlopen() gets confused with path with // in it

2008-05-06 Thread Martin McNickle
Changes by Martin McNickle <[EMAIL PROTECTED]>: -- components: +Library (Lib) -Extension Modules versions: +Python 2.6, Python 3.0 __ Tracker <[EMAIL PROTECTED]> __ ___

[issue2776] urllib2.urlopen() gets confused with path with // in it

2008-05-06 Thread Martin McNickle
Martin McNickle <[EMAIL PROTECTED]> added the comment: The problem lines are in AbstractHTTPHandler.do_request(): scheme, sel = splittype(request.get_selector()) sel_host, sel_path = splithost(sel) if not request.has_header('Host'): request.add_unredirected_header('Host', sel

[issue2775] Implement PEP 3108

2008-05-06 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: For the TextMate users, I am going to be checking in a Python-Dev bundle into svn soon which will include a command to insert the warnpy3k() call for module deletions. Might want to wait for that if you want to cut out at least one copy-and-p

[issue2775] Implement PEP 3108

2008-05-06 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: I am working on audiodev to get the basic structure of removals worked out (testing infrastructure, etc.). __ Tracker <[EMAIL PROTECTED]> __ ___

[issue2775] Implement PEP 3108

2008-05-06 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: I'm working on removing mac modules. -- nosy: +benjamin.peterson __ Tracker <[EMAIL PROTECTED]> __

[issue2637] urllib.quote() escapes characters unnecessarily and contrary to docs

2008-05-06 Thread Tom Pinckney
Tom Pinckney <[EMAIL PROTECTED]> added the comment: It also looks like urllib.quote (and quote_plus) do not properly handle unicode strings. urllib.urlencode() properly converts unicode strings to utf-8 encoded ascii strings before then calling urllib.quote() on them. -- nosy: +thomasp

[issue2772] Add PendingDeprecationWarning for % formatting

2008-05-06 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: On Tue, May 6, 2008 at 4:50 PM, Eric Smith <[EMAIL PROTECTED]> wrote: > > Eric Smith <[EMAIL PROTECTED]> added the comment: > > Since we're just trying to prevent this function from recursing > (indirectly) into itself, I think all of th

[issue2772] Add PendingDeprecationWarning for % formatting

2008-05-06 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: Since we're just trying to prevent this function from recursing (indirectly) into itself, I think all of the logic can go here. What would you suggest the function _PyErr_InErrorProcessing do differently? I think the real issue is: Does the add

[issue2776] urllib2.urlopen() gets confused with path with // in it

2008-05-06 Thread Ambarish Malpani
Ambarish Malpani <[EMAIL PROTECTED]> added the comment: Sorry, should have added another line: The reason this is important to fix, is I am getting that URL with a // in a Moved (HTTP 302) message, so I can't just get rid of the // __ Tracker <[EMAIL PROTECTED]> <

[issue2776] urllib2.urlopen() gets confused with path with // in it

2008-05-06 Thread Ambarish Malpani
New submission from Ambarish Malpani <[EMAIL PROTECTED]>: Try the following code: import urllib import urllib2 url = 'http://features.us.reuters.com//autos/news/95ED98EE-A837-11DC-BCB3-4F218271.html' data = urllib.urlopen(url).read() data2 = urllib2.urlopen(url).read() The attempt to get it wi

[issue2772] Add PendingDeprecationWarning for % formatting

2008-05-06 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Would it be practical to add a _PyErr_InErrorProcessing function to prevent recursion? -- nosy: +benjamin.peterson __ Tracker <[EMAIL PROTECTED]> _

[issue1591035] update urlparse to RFC 3986

2008-05-06 Thread Georg Brandl
Changes by Georg Brandl <[EMAIL PROTECTED]>: -- assignee: -> jhylton nosy: +jhylton _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs-

[issue2152] make sqlite.Row hashable correctly

2008-05-06 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Can this be closed? -- nosy: +georg.brandl __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs

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

2008-05-06 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Since dumps and loads deal with raw data they should accept/return bytes, too. I'm re-adding 2.6 as version again because I believe we should clean up the API in 2.6 first. It's also a good chance to document how to port a library to Python

[issue2775] Implement PEP 3108

2008-05-06 Thread Jeremy Hylton
Jeremy Hylton <[EMAIL PROTECTED]> added the comment: I'm working on the new urllib package. -- nosy: +jhylton __ Tracker <[EMAIL PROTECTED]> __

[issue1779700] urlparse.urljoin does not obey current uri rfc (rfc 3986)

2008-05-06 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Closing then. -- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> update urlparse to RFC 3986 _ Tracker <[EMAIL PROTECTED]> _

[issue1751] Fast BytesIO implementation + misc changes

2008-05-06 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Patch committed in r62778. Antoine wrote: > Also, I stand by the suggestion I made about the resizing logic, but it > shouldn't be a showstopper either. We can improve that later. I made your suggested change to the resizing logic. Tha

[issue2523] binary buffered reading is quadratic

2008-05-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: -- nosy: +alexandre.vassalotti __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list maili

[issue1751] Fast BytesIO implementation + misc changes

2008-05-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: By the way, is someone already working on a C-accelerated TextIO? __ Tracker <[EMAIL PROTECTED]> __ ___

[issue2775] Implement PEP 3108

2008-05-06 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- assignee: -> brett.cannon __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list U

[issue2775] Implement PEP 3108

2008-05-06 Thread Brett Cannon
New submission from Brett Cannon <[EMAIL PROTECTED]>: This is to keep track of who is working on what for PEP 3108 (http://www.python.org/dev/peps/pep-3108/). Once something is complete it should be denoted in the PEP itself, so always check the PEP to see what is left to be done (for both 2.6

[issue1751] Fast BytesIO implementation + misc changes

2008-05-06 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: Alexandre, you have until the end of the week to commit it or someone else will. =) I don't want this going in so close to the alphas, but it should go in almost immediately afterwards. __ Tracker <[EMAIL PROTE

[issue1674032] Make threading.Event().wait(timeout=3) return isSet

2008-05-06 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Tim, you said this was a bad idea for conditions in #1175933 - is the same true for Events? -- assignee: georg.brandl -> tim_one nosy: +tim_one _ Tracker <[EMAIL PROTECTED]>

[issue2773] Wrong description of 'g' conversion type of string formatting operator %

2008-05-06 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Argh, fixed in r62775. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscrib

[issue2773] Wrong description of 'g' conversion type of string formatting operator %

2008-05-06 Thread Artur Zaprzała
Artur Zaprzała <[EMAIL PROTECTED]> added the comment: The fix is wrong. not less == greater than or equal to __ Tracker <[EMAIL PROTECTED]> __ ___ Python

[issue2773] Wrong description of 'g' conversion type of string formatting operator %

2008-05-06 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Thanks, fixed in r62774. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ _

[issue2630] repr() should not escape non-ASCII characters

2008-05-06 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: On Tue, May 6, 2008 at 1:26 AM, Marc-Andre Lemburg wrote: > So you've limited the codec design to just doing Unicode<->bytes > conversions ? Yes. This was quite a conscious decision that was not taken lightly, with lots of community input

[issue2774] ctypes documentation not effective

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

[issue1674032] Make threading.Event().wait(timeout=3) return isSet

2008-05-06 Thread Tim Lesher
Changes by Tim Lesher <[EMAIL PROTECTED]>: -- assignee: -> georg.brandl components: +Documentation, Library (Lib) -Interpreter Core nosy: +georg.brandl _ Tracker <[EMAIL PROTECTED]> __

[issue2774] ctypes documentation not effective

2008-05-06 Thread Bill Janssen
New submission from Bill Janssen <[EMAIL PROTECTED]>: Once again I'm reading through the ctypes documentation and finding it wildly confusing/contradictory. For instance, there's no discussion of how ctypes types interact with malloc and free. The tutorial section is discursive and rambling. T

[issue2773] Wrong description of 'g' conversion type of string formatting operator %

2008-05-06 Thread Artur Zaprzała
New submission from Artur Zaprzała <[EMAIL PROTECTED]>: Description of 'g' and 'G' conversion types of string formatting operator at http://www.python.org/doc/2.5.2/lib/typesseq-strings.html is: Floating point format. Uses exponential format if exponent is greater than -4 or less than precision

[issue1674032] Make threading.Event().wait(timeout=3) return isSet

2008-05-06 Thread Tim Lesher
Tim Lesher <[EMAIL PROTECTED]> added the comment: This one-line change to threading.py makes Event.wait() return isSet(). Also includes the corresponding update to documentation in threading.rst. -- keywords: +patch nosy: +tlesher Added file: http://bugs.python.org/file10203/event-wait-

[issue2772] Add PendingDeprecationWarning for % formatting

2008-05-06 Thread Eric Smith
Eric Smith <[EMAIL PROTECTED]> added the comment: Right. But is it worth adding per-thread machinery to this? I was going to do that, but it seemed like overkill. Upon further reflection, however, I think you may be right. I'll remove the "easy" keyword! -- keywords: -easy

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

2008-05-06 Thread Bob Ippolito
Bob Ippolito <[EMAIL PROTECTED]> added the comment: loads will take unicode or str. if it's str then it assumes utf-8, otherwise the explicitly specified encoding. All of the string instances generated by loads will be unicode objects (some of them may be str objects if they're all ASCII as an op

[issue2772] Add PendingDeprecationWarning for % formatting

2008-05-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: > Do I need to acquire the GIL here? No, the GIL has already been acquired. The problem with the static variable is that while the main thread is PyErr_WarnEx(), another thread may gain focus. And it will not trigger the warning. -

[issue2772] Add PendingDeprecationWarning for % formatting

2008-05-06 Thread Eric Smith
New submission from Eric Smith <[EMAIL PROTECTED]>: Per http://mail.python.org/pipermail/python-3000/2008-April/013094.html, add a PendingDeprecationWarning to 3.0 for % formatting. The attached patch implements this for 3.0. For 2.6, it should only be a PendingDeprecationWarning if -3 warnings

[issue1588] str.format() wrongly formats complex() numbers (Py30a2)

2008-05-06 Thread Eric Smith
Changes by Eric Smith <[EMAIL PROTECTED]>: -- nosy: +eric.smith __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe:

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

2008-05-06 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: The Python 3.0 port is going to be tricky. Can somebody with more knowledge about the code please annotate which methods accept/return bytes and/or unicode? __ Tracker <[EMAIL PROTECTED]>

[issue2598] "{ +(}".format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format

2008-05-06 Thread Eric Smith
Changes by Eric Smith <[EMAIL PROTECTED]>: -- assignee: -> eric.smith nosy: +eric.smith __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list

[issue2275] urllib2 header capitalization

2008-05-06 Thread Martin McNickle
Martin McNickle <[EMAIL PROTECTED]> added the comment: This looks good. I would suggest that the unredirected_hdrs would use the CaseInsensitiveDict too. There is still the problem (from the test documentation) that accessing .headers directly will only show a subset of headers i.e. it won't sh

[issue2630] repr() should not escape non-ASCII characters

2008-05-06 Thread atsuo ishimoto
atsuo ishimoto <[EMAIL PROTECTED]> added the comment: > No need to change anything, the diff is just too big for the code > review tool (Rietveld), but since it consists only of numbers we don't > need to review it anyway. :) I wonder why unicodename_db.h have not updated after makeunicodeda

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-06 Thread Martin McNickle
Changes by Martin McNickle <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10201/add_header_complete.patch __ Tracker <[EMAIL PROTECTED]> __ ___

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-06 Thread Martin McNickle
Changes by Martin McNickle <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10200/add_header_complete.patch __ Tracker <[EMAIL PROTECTED]> __ _

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-05-06 Thread Martin McNickle
Martin McNickle <[EMAIL PROTECTED]> added the comment: I decided that the user should have full control over the headers sent. Any call to add_header() or add_redirected_header() will now check if a header with that same name has been set in the Request before (in both the header and the unredir

[issue1751] Fast BytesIO implementation + misc changes

2008-05-06 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Since nothing happened for almost one month here, perhaps it would be better to merge Alexandre's changes as they are? We'll see quickly if unexpected things happen :-) It would also allow to progress on other issues, e.g. #2523. Also, I sta

[issue2630] repr() should not escape non-ASCII characters

2008-05-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg <[EMAIL PROTECTED]> added the comment: On 2008-05-06 00:07, Guido van Rossum wrote: > Guido van Rossum <[EMAIL PROTECTED]> added the comment: > > On Fri, Apr 18, 2008 at 1:46 AM, Marc-Andre Lemburg > <[EMAIL PROTECTED]> wrote: >> On 2008-04-18 05:35, atsuo ishimoto wrote: >>

[issue2632] performance problem in socket._fileobject.read

2008-05-06 Thread Ralf Schmitt
Ralf Schmitt <[EMAIL PROTECTED]> added the comment: the above easy_install now works for me. thanks. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-li

[issue2628] ftplib Persistent data connection

2008-05-06 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: rather than using the array.array for your three byte header with manual parsing, please use struct.unpack. Whats a good way to test that this works? It'd be nice to have a unit test (a test_ftplib_net.py perhaps?) though I realize ftplib

[issue2707] Tiny fix for os.walk docstring

2008-05-06 Thread Gregory P. Smith
Gregory P. Smith <[EMAIL PROTECTED]> added the comment: fixed in trunk r62756 and release25-maint r62757. thanks for the report. -- assignee: -> gregory.p.smith keywords: +easy nosy: +gregory.p.smith resolution: -> fixed status: open -> closed versions: +Python 2.5 __