[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 tracker rep...@bugs.python.org
http://bugs.python.org/issue20138
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue20221
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tjre...@udel.edu:


--
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 rep...@bugs.python.org
http://bugs.python.org/issue20145
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rdmur...@bitdance.com:


--
nosy: +r.david.murray

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



[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 tjre...@udel.edu:


--
nosy: +orsenthil

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



[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 tracker rep...@bugs.python.org
http://bugs.python.org/issue20138
___diff -r 52fbc7bb78ad Lib/test/test_wsgiref.py
--- a/Lib/test/test_wsgiref.py  Sat Jan 11 00:16:50 2014 +0100
+++ b/Lib/test/test_wsgiref.py  Sat Jan 11 11:42:06 2014 +0200
@@ -286,7 +286,7 @@
 def testAppURIs(self):
 self.checkAppURI(http://127.0.0.1/;)
 self.checkAppURI(http://127.0.0.1/spam;, SCRIPT_NAME=/spam)
-self.checkAppURI(http://127.0.0.1/sp%C3%A4m;, SCRIPT_NAME=/späm)
+self.checkAppURI(http://127.0.0.1/sp%E4m;, SCRIPT_NAME=/späm)
 self.checkAppURI(http://spam.example.com:2071/;,
 HTTP_HOST=spam.example.com:2071, SERVER_PORT=2071)
 self.checkAppURI(http://spam.example.com/;,
@@ -300,15 +300,19 @@
 def testReqURIs(self):
 self.checkReqURI(http://127.0.0.1/;)
 self.checkReqURI(http://127.0.0.1/spam;, SCRIPT_NAME=/spam)
-self.checkReqURI(http://127.0.0.1/sp%C3%A4m;, SCRIPT_NAME=/späm)
+self.checkReqURI(http://127.0.0.1/sp%E4m;, SCRIPT_NAME=/späm)
 self.checkReqURI(http://127.0.0.1/spammity/spam;,
 SCRIPT_NAME=/spammity, PATH_INFO=/spam)
+self.checkReqURI(http://127.0.0.1/spammity/sp%E4m;,
+SCRIPT_NAME=/spammity, PATH_INFO=/späm)
 self.checkReqURI(http://127.0.0.1/spammity/spam;ham;,
 SCRIPT_NAME=/spammity, PATH_INFO=/spam;ham)
 self.checkReqURI(http://127.0.0.1/spammity/spam;cookie=1234,5678;,
 SCRIPT_NAME=/spammity, PATH_INFO=/spam;cookie=1234,5678)
 self.checkReqURI(http://127.0.0.1/spammity/spam?say=ni;,
 SCRIPT_NAME=/spammity, PATH_INFO=/spam,QUERY_STRING=say=ni)
+self.checkReqURI(http://127.0.0.1/spammity/spam?s%E4y=ni;,
+SCRIPT_NAME=/spammity, PATH_INFO=/spam,QUERY_STRING=s%E4y=ni)
 self.checkReqURI(http://127.0.0.1/spammity/spam;, 0,
 SCRIPT_NAME=/spammity, PATH_INFO=/spam,QUERY_STRING=say=ni)
 
diff -r 52fbc7bb78ad Lib/wsgiref/util.py
--- a/Lib/wsgiref/util.py   Sat Jan 11 00:16:50 2014 +0100
+++ b/Lib/wsgiref/util.py   Sat Jan 11 11:42:06 2014 +0200
@@ -57,14 +57,14 @@
 if environ['SERVER_PORT'] != '80':
 url += ':' + environ['SERVER_PORT']
 
-url += quote(environ.get('SCRIPT_NAME') or '/')
+url += quote(environ.get('SCRIPT_NAME') or '/', encoding='latin1')
 return url
 
 def request_uri(environ, include_query=True):
 Return the full request URI, optionally including the query string
 url = application_uri(environ)
 from urllib.parse import quote
-path_info = quote(environ.get('PATH_INFO',''),safe='/;=,')
+path_info = quote(environ.get('PATH_INFO',''), safe='/;=,', 
encoding='latin1')
 if not environ.get('SCRIPT_NAME'):
 url += path_info[1:]
 else:
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

:-(

--

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



[issue19886] Better estimated memory requirements for bigmem tests

2014-01-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed
versions: +Python 2.7

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



[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 mentions the three possible layers of file wrapping. Although, looking 
at the code just now, the TextIOWrapper is added separately by the “subprocess” 
module, and uses write_through=True.

--
nosy: +vadmium

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



[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.
http://hg.python.org/cpython/rev/05e84d3ecd1e

New changeset e7d922d8ee03 by Serhiy Storchaka in branch 'default':
tkinter.Text.debug() now always returns 0/1.
http://hg.python.org/cpython/rev/e7d922d8ee03

--

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



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

2014-01-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +barry

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



[issue2226] Small _abcoll Bugs / Oddities

2014-01-11 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
nosy: +mark.dickinson

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



[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 directory x/z on drive c: and directory y 
on drive d:, then execute following commands:

cd c:/x
cd d:/y
cd c:z

What is resulting current working directory?

Here is a patch which implements this algorithm.

--
Added file: http://bugs.python.org/file33417/ntpath_join_2.patch

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



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

--
assignee: docs@python
components: Documentation
messages: 207908
nosy: docs@python, naoki
priority: normal
severity: normal
status: open
title: unittest.mock-examples doc uses builtin file which is removed in Python 3
versions: Python 3.3, Python 3.4, Python 3.5

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



[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:z')

returns 'c:z'

 Could anyone please check it? Create directory x/z on drive c: and directory 
 y on drive d:, then execute following commands:
 cd c:/x
 cd d:/y
 cd c:z

 What is resulting current working directory?

c:\cd c:/x

c:\xcd e:\y

c:\xcd c:z
Het systeem kan het opgegeven pad niet vinden. # file not found, in Dutch

c:\xcd c:\z



Yes, there is a seperate current directory for each drive, but cd does not 
switch drives. (cd e:\f does not mean you actually go to e:\f - it just changes 
the current directory on the e:-drive). I don't think those semantics are 
sensible for joining paths...

--
nosy: +valhallasw

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



[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\zcd c:/x
c:\xcd e:/y
c:\xcd 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

--

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



[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 rep...@bugs.python.org
http://bugs.python.org/issue20138
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

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



[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 rep...@bugs.python.org
http://bugs.python.org/issue13355
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue20186
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.hello)' will always return '(*args, **keywords)'

I'm attaching a patch that fixes that, so the signature for the above example 
will be '(self, b=1)'.

--
components: Library (Lib)
files: signature_partialmeth_01.patch
keywords: patch
messages: 207915
nosy: brett.cannon, larry, ncoghlan, yselivanov
priority: normal
severity: normal
status: open
title: inspect.signature does not support new functools.partialmethod
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file33418/signature_partialmeth_01.patch

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



[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 rep...@bugs.python.org
http://bugs.python.org/issue20189
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

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



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

--
nosy: +yselivanov

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



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

--
keywords: +patch
nosy: +yselivanov
Added file: http://bugs.python.org/file33420/getargsspec_01.patch

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



[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 rep...@bugs.python.org
http://bugs.python.org/issue20138
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue20189
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue16490
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-01-11 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman

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



[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) that use 
PyArg_UnpackTuple().  Shall I create Derby issues #19 and #20, or do you have a 
better idea?

2) For FUNC1 / 1A / 2 macros: right now you'd have to just copy and paste over 
and over.  There might be something you could do with a [python] block where 
you automatedly reuse the existing sigantures.  I was thinking about having 
Clinic support it directly, maybe with the syntax:

/*[clinic input]
func_name = existing_func_name

docstring goes here
[...]*/

You'd skip the parameters and the return annotation.  You could only reuse 
functions from the current file.  Would that be a big boon to you?

--

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



[issue17481] inspect.getfullargspec could use __signature__

2014-01-11 Thread Claudiu.Popa

Changes by Claudiu.Popa pcmantic...@gmail.com:


--
nosy: +Claudiu.Popa

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



[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, but if the patch as-is 
improves over the status quo - can't it just be applied? It's not as if this is 
the last and only chance to make changes...

--
versions: +Python 3.1, Python 3.2, Python 3.5
Added file: http://bugs.python.org/file33421/issue17814.patch

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



[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

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



[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.3
http://hg.python.org/cpython/rev/1638360eea41

--

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



[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), but that describes the old 
legacy method based on static type declarations. New code should instead use 
the dynamic mechanism defined in PEP 384 
(http://www.python.org/dev/peps/pep-0384/#type-objects).

See also http://docs.python.org/3/c-api/type.html#PyType_FromSpec

Note that PyType_Spec isn't defined in the C API docs *at all*.

--
assignee: docs@python
components: Documentation
messages: 207927
nosy: docs@python, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: C API docs need a clear defining custom extension types section
type: enhancement
versions: Python 3.3, Python 3.4, Python 3.5

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



[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 rep...@bugs.python.org
http://bugs.python.org/issue19097
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue19995
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue19996
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 UnpackTuple 
could have been replaced by ParseTuple.  See for example math_hypot: it uses 
UnpackTuple to get two objects, and then immediately calls PyFloat_AsDouble on 
them.  I've converted these using 'd' and not 'O' specifiers.

 I just did a quick check, and there are 96 entry points (by my count) 
 that use PyArg_UnpackTuple().  Shall I create Derby issues #19 and 
 #20, or do you have a better idea?

Probably better to add them to the issues that cover their modules, otherwise 
people might get confused.

 2) For FUNC1 / 1A / 2 macros: right now you'd have to just copy and 
 paste over and over.  There might be something you could do with a 
 [python] block where you automatedly reuse the existing sigantures.  
 I was thinking about having Clinic support it directly, maybe with 
 the syntax:

 /*[clinic input]
 func_name = existing_func_name
 
 docstring goes here
 [...]*/
 
 You'd skip the parameters and the return annotation.  You could only 
 reuse functions from the current file.  Would that be a big boon to you?

That sounds good.

On the other hand, if clinic expanded cpp macros we could... *:-)

--

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