[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-11 Thread Armin Ronacher
Armin Ronacher added the comment: Two things wrong with your example: a) PATH_INFO on Python 3 must not be bytes b) PATH_INFO on Python 3 must be latin1 transfer encoded. See unicode_to_wsgi and wsgi_to_bytes functions in PEP . -- ___ Python tr

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-11 Thread Tabrez Mohammed
Tabrez Mohammed added the comment: Sorry, I realize I didn't mention this in the original post. I'm getting this compiler warning when building my Python extension, not when building Python itself. -- ___ Python tracker

[issue20145] unittest.assert*Regex functions should verify that expected_regex has a valid type

2014-01-11 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +ezio.melotti, michael.foord stage: -> test needed type: behavior -> enhancement versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker _

[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-11 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-11 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: OK, now I understand the issue. Here is a patch which fixes wsgiref.application_uri() and wsgiref.request_uri(). -- keywords: +patch Added file: http://bugs.python.org/file33416/wsgiref_latin1.patch ___ Python trac

[issue20190] dict() in dict(foo='bar').keys() raises

2014-01-11 Thread Martin Häcker
Martin Häcker added the comment: Well, if that's the case, then this bug indeed can be closed. You switched from list as the base type to set and that has to be dealt with on application side. Still this is surprising, but there's not much that can be done. :-( -- ___

[issue19886] Better estimated memory requirements for bigmem tests

2014-01-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed versions: +Python 2.7 ___ Python tracker ___

[issue17814] Popen.stdin/stdout/stderr documentation should mention object type

2014-01-11 Thread Martin Panter
Martin Panter added the comment: The patch specifies the stream types are either BufferedReader/Writer, TextIOWrapper, or None. However they can also be plain FileIO in my experience (Python 3.3 with bufsize=0). Maybe it would be simpler to defer to the documentation for open(), which already

[issue6157] Tkinter.Text: changes for bbox, debug, and edit methods.

2014-01-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7dab4feec126 by Serhiy Storchaka in branch '2.7': tkinter.Text.debug() now always returns 0/1. http://hg.python.org/cpython/rev/7dab4feec126 New changeset 05e84d3ecd1e by Serhiy Storchaka in branch '3.3': tkinter.Text.debug() now always returns 0/1.

[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue2226] Small _abcoll Bugs / Oddities

2014-01-11 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue19456] ntpath doesn't join paths correctly when a drive is present

2014-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I just discovered that perhaps ntpath.join should be even more clever. Windows supports current directories for every drive separately, so perhaps ntpath.join('c:/x', 'd:/y', 'c:z') should return 'c:/x\\z', not 'c:/z'. Could anyone please check it? Create di

[issue20222] unittest.mock-examples doc uses builtin file which is removed in Python 3

2014-01-11 Thread INADA Naoki
New submission from INADA Naoki: http://docs.python.org/3.3/library/unittest.mock-examples.html#mocking-chained-calls > Let’s assume the object it returns is ‘file-like’, so we’ll ensure that our > response object uses the builtin file as its spec. and > >>> mock_response = Mock(spec=file) -

[issue19456] ntpath doesn't join paths correctly when a drive is present

2014-01-11 Thread Merlijn van Deen
Merlijn van Deen added the comment: > so perhaps ntpath.join('c:/x', 'd:/y', 'c:z') should return 'c:/x\\z', not > 'c:/z'. 'c:z' is consistent with what .NET's System.IO.Path.Combine does: via http://ironpython.net/try/ : import System.IO.Path; print System.IO.Path.Combine('c:/x', 'd:/y', 'c:

[issue19456] ntpath doesn't join paths correctly when a drive is present

2014-01-11 Thread Merlijn van Deen
Merlijn van Deen added the comment: Sorry, I was a bit too quick - I forgot to create c:\x\z. Now this is the result: c:\x\z>cd c:/x c:\x>cd e:/y c:\x>cd c:z c:\x\z> However, the behavior does not work in, for example, a 'Save as...' window, where c:z will always return "illegal filename" --

[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: > SCRIPT_NAME="/spammity", PATH_INFO="/späm") Has the policy of limiting stdlib code to ascii chars, including \ escapes, except where needed for tests, been changed? -- ___ Python tracker

[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > > SCRIPT_NAME="/spammity", PATH_INFO="/späm") > Has the policy of limiting stdlib code to ascii chars, including \ escapes, > except where needed for tests, been changed? This character is already used in this file. --

[issue13355] random.triangular error when low = high=mode

2014-01-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Serhiy] > Raymond, could you please make a decision Yes, I will this week. -- ___ Python tracker ___ __

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-11 Thread Georg Brandl
Georg Brandl added the comment: Looking at _csv.c, I see a few functions using PyArg_UnpackTuple. They should be converted too, no? -- nosy: +georg.brandl ___ Python tracker __

[issue20223] inspect.signature does not support new functools.partialmethod

2014-01-11 Thread Yury Selivanov
New submission from Yury Selivanov: new and handy functools.partialmethod doesn't fully support inspect.signature. For instance, for the following code: class Spam: def say(self, a, b=1): print(a) hello = functools.partialmethod(say, 'hello') the 'signature(Spam

[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-11 Thread Yury Selivanov
Yury Selivanov added the comment: Larry, Congrats on the amazing job you did with the arguments clinic. And if you need any assistance with 'inspect.signature' I'd be glad to help. -- nosy: +yselivanov ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-11 Thread Georg Brandl
Georg Brandl added the comment: Attached part 1 of mathmodule (17 functions). I'm looking forward to a suggestion for handling the rest (see FUNC1/1A/2 macros :) -- keywords: +patch Added file: http://bugs.python.org/file33419/mathmodule_part1.patch ___

[issue17373] Add inspect.Signature.from_callable()

2014-01-11 Thread Yury Selivanov
Yury Selivanov added the comment: Hi Eric, I'm not sure why do you want this. Having "Signature.from_callable" does not allow you to change behaviour of 'inspect.signature' function. More over, it creates a confusion about what API should be used - 'inspect.signature' or 'inspect.Signature.fr

[issue17481] inspect.getfullargspec could use __signature__

2014-01-11 Thread Yury Selivanov
Yury Selivanov added the comment: Please consider the attached patch (getargsspec_01.patch). It modifies 'getargspec' and 'getfullargspec' to use the 'inspect.signature' API. The entire test suite passes just fine. This also will address issue #16490. I can also update the docs, if it's neces

[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: And those examples were only in test. Use of latin-1 to have a literal text for round trip is ok. The patch looks good to me. -- ___ Python tracker _

[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-11 Thread Larry Hastings
Larry Hastings added the comment: Yury: Thanks! I don't need any help right now though--just a review on this patch ;-) -- ___ Python tracker ___ __

[issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins

2014-01-11 Thread Yury Selivanov
Yury Selivanov added the comment: This is related to issue #17481 -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mai

[issue16508] include the "object" type in the lists of documented types

2014-01-11 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-11 Thread Larry Hastings
Larry Hastings added the comment: 1) Wow. I never knew about PyArg_UnpackTuple. You're right, those should be converted too. Hooray, more entry points to convert. I'll write something up for the howto about UnpackTuple. I just did a quick check, and there are 96 entry points (by my count) t

[issue17481] inspect.getfullargspec could use __signature__

2014-01-11 Thread Claudiu.Popa
Changes by Claudiu.Popa : -- nosy: +Claudiu.Popa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue17814] Popen.stdin/stdout/stderr documentation should mention object type

2014-01-11 Thread Nikolaus Rath
Nikolaus Rath added the comment: Thanks for looking at this Martin! I have attached an updated patch that includes a reference to open and slightly changed language. But please, let's not have the best be the enemy of the good here. There will probably always be room for further improvement,

[issue19097] bool(cgi.FieldStorage(...)) may be False unexpectedly

2014-01-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2d6e7a5659f0 by Senthil Kumaran in branch '2.7': Adding test coverage for cgi.FieldStorage based on the scenario mentioned in issue #19097 http://hg.python.org/cpython/rev/2d6e7a5659f0 -- nosy: +python-dev _

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2014-01-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset a3e49868cfd0 by Senthil Kumaran in branch '3.3': Issue #19092 - Raise a correct exception when cgi.FieldStorage is given an http://hg.python.org/cpython/rev/a3e49868cfd0 New changeset 1638360eea41 by Senthil Kumaran in branch 'default': merge from 3

[issue20224] C API docs need a clear "defining custom extension types" section

2014-01-11 Thread Nick Coghlan
New submission from Nick Coghlan: The main C API docs don't clearly explain how to define new types, so people almost always cargo cult an existing legacy type definition instead (I know I do). The extending and embedding docs have a guide (http://docs.python.org/3/extending/newtypes.html), b

[issue19097] bool(cgi.FieldStorage(...)) may be False unexpectedly

2014-01-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: This is fixed in all active branches (2.7,3,3 and 3.4). I have addressed all review comments. Thanks. -- resolution: -> fixed status: open -> closed ___ Python tracker _

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 22e55bd5583c by Ethan Furman in branch 'default': Issue19995: issue deprecation warning for non-integer values to %c, %o, %x, %X http://hg.python.org/cpython/rev/22e55bd5583c -- ___ Python tracker

[issue19996] httplib infinite read on invalid header

2014-01-11 Thread Cory Benfield
Cory Benfield added the comment: Is there anything I can do to help move this forward? I appreciate you're all busy so I'm happy for this to take as long as it takes, I just wanted to make sure it's not blocked behind me. -- ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-11 Thread Georg Brandl
Georg Brandl added the comment: > Wow. I never knew about PyArg_UnpackTuple. You're right, those > should be converted too. Hooray, more entry points to convert. > I'll write something up for the howto about UnpackTuple. One thing to note is that (at least in math) many instances of UnpackTu