[issue23410] Document more BaseHTTPRequestHandler attributes

2015-02-16 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue23410] Document more BaseHTTPRequestHandler attributes

2015-02-16 Thread Demian Brecht

Demian Brecht added the comment:

Added Library component as there are a few newly added tests as well though and 
cosmetic changes were made to server.py.

--
components: +Library (Lib)

___
Python tracker 

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



[issue23410] Document more BaseHTTPRequestHandler attributes

2015-02-16 Thread Demian Brecht

Demian Brecht added the comment:

LGTM

--

___
Python tracker 

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client

2015-02-16 Thread Demian Brecht

Demian Brecht added the comment:

> But it is not natural to do things like this (based on headers sent by 
> Firefox)

Good point.

> Otherwise, retaining the one_value.encode('latin-1') call is confusing when 
> later on it rejects non-ASCII-encoded characters.

I’m a little torn on this one given one of the SHOULD clauses in RFC 7230 about 
recipients treating headers with non-ASCII characters as opaque data. However, 
I’ve read a number of occasions where users are using latin-1 in practice (and 
it /is/ only a SHOULD clause), so I think it’s likely better to err on the side 
of caution and allow for the latin-1 charset at least.

As for utf-8 though, I think that once we start getting into the realm of other 
application protocols, that’s something that should have to be extended by the 
client implementation and not something that should be changed in the base HTTP 
implementation.

The odd part of the API though now is the fact that it’s variadic. I really 
have no strong opinion on whether elements should be tab or space delimited and 
the RFC doesn’t seem to lean either way. I think I’m still leaning towards 
space delimiting to give users the ability to write in either form 
(putheader(‘Authorization’, ‘Bearer’, ‘token’) or putheader(‘Authorization’, 
‘Bearer token’)). As another minor argument for it, it’s also likely a little 
nicer for logging. I think that optimally, the API would be a single value as 
you’d suggested, but I’d be concerned about the extent of backwards 
compatibility issues if that were to be done.

I’ll try to get some time tomorrow to make those changes, so it still leaves 
time for further debate :)

--

___
Python tracker 

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



[issue23237] Interrupts are lost during readline PyOS_InputHook processing (reopening)

2015-02-16 Thread Michiel de Hoon

Changes by Michiel de Hoon :


--
nosy: +haypo

___
Python tracker 

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



[issue23410] Document more BaseHTTPRequestHandler attributes

2015-02-16 Thread Martin Panter

Martin Panter added the comment:

Posting patch v3. It is based on Demian’s suggested wording for the requestline 
attribute, but adjusted to match the other entries, and to mention the empty 
string.

--
Added file: http://bugs.python.org/file38157/http-attributes.v3.patch

___
Python tracker 

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client

2015-02-16 Thread Martin Panter

Martin Panter added the comment:

But it is not natural to do things like this (based on headers sent by Firefox):

putheader("User-Agent", "Mozilla/5.0", "(X11;", "Linux", "x86_64;", "rv:25.0)", 
"Gecko/20100101", "Firefox/25.0")
putheader("Accept-Encoding", "gzip,", "deflate")

A way to properly encode different kinds of header values would be nice, but I 
don’t think the current putheader() API is it.

Also, I still think it would be good to allow non-ASCII characters in header 
values. At least when an already-encoded byte string is supplied. For instance, 
RTSP is based on HTTP but uses UTF-8 as a default encoding, rather than HTTP’s 
Latin-1. Otherwise, retaining the one_value.encode('latin-1') call is confusing 
when later on it rejects non-ASCII-encoded characters.

--

___
Python tracker 

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



[issue22834] Unexpected FileNotFoundError when current directory is removed

2015-02-16 Thread Martin Panter

Martin Panter added the comment:

I don’t have a Solaris to test this, but maybe changing the first half of the 
test to the following would work:

dir = tempfile.TemporaryDirectory()
self.addCleanup(dir.cleanup)  # In case removal after chdir() fails
self.addCleanup(os.chdir, os.getcwd())
os.chdir(dir.name)
try:
dir.cleanup()
except OSError as err:  # Invalid argument on Solaris
self.skipTest("Couldn't remove current directory: {}".format(err))

with util.import_state(...)

--

___
Python tracker 

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



[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2015-02-16 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2015-02-16 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

Let's just Won't Fix this.  Use a contextlib.ExitStack.

--

___
Python tracker 

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



[issue23471] 404 Not Found when downloading Python 3.4.3rc1 Documentation

2015-02-16 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +larry

___
Python tracker 

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



[issue22555] Tracking issue for adjustments to binary/text boundary handling

2015-02-16 Thread Nick Coghlan

Nick Coghlan added the comment:

Slavek et al - you folks may be interested in this one, as it tracks several 
issues that I consider relevant to the Python 2 -> 3 migration effort.

Redoing the list in a way that should render the strike-throughs for closed 
issues:

* Improved Windows console Unicode support (see
https://pypi.python.org/pypi/win_unicode_console for details)
* Changing the encoding and error handling of an existing stream
(issue 15216)
* Allowing "backslashreplace" to be used on input (issue 22286)
* Adding "codecs.convert_surrogates" (issue 18814)
* Adding "wsgiref.util.dump_wsgistr" and "wsgiref.util.load_wsgistr" (issue 
22264)
* Adding "bytes.hex", "bytearray.hex" and "memoryview.hex" (issue 9951)
* Adding a binary data formatting mini-language (depends on issue 9951, likely 
needs to be escalated to a full PEP for design discussion visibility) (issue 
22385)

--
nosy: +bkabrda, encukou, rkuska

___
Python tracker 

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



[issue21548] pydoc -k IndexError on empty docstring

2015-02-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9436f43b6df2 by Benjamin Peterson in branch '3.4':
fix pydoc.apropos and pydoc.synopsis on modules with empty docstrings (#21548)
https://hg.python.org/cpython/rev/9436f43b6df2

New changeset 534b26837a13 by Benjamin Peterson in branch 'default':
merge 3.4 (#21548)
https://hg.python.org/cpython/rev/534b26837a13

--
nosy: +python-dev

___
Python tracker 

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client

2015-02-16 Thread Demian Brecht

Changes by Demian Brecht :


--
versions:  -Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue22107] tempfile module misinterprets access denied error on Windows

2015-02-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It is best that we can do. How else we can check filesystem permissions? Only 
trying to create a file, But we just tried this and it failed.

--

___
Python tracker 

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



[issue21548] pydoc -k IndexError on empty docstring

2015-02-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
nosy: +serhiy.storchaka
stage: patch review -> commit review

___
Python tracker 

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



[issue20015] Allow 1-character ASCII unicode where 1-character str is required

2015-02-16 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage: patch review -> resolved

___
Python tracker 

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



[issue20015] Allow 1-character ASCII unicode where 1-character str is required

2015-02-16 Thread Guido van Rossum

Guido van Rossum added the comment:

Let's not do this. The time to meddle with Python 2.7 details is long gone.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue19985] Not so correct error message when initializing Struct with ill argument

2015-02-16 Thread Martin Panter

Martin Panter added the comment:

Closely related:

* Issue 16349: document byte string format argument support
* Issue 21071: should the Struct.format property be bytes or text?

--
nosy: +vadmium

___
Python tracker 

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



[issue23450] Possible loss of data warnings building 3.5 Visual Studio Windows 8.1 64 bit

2015-02-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f47d683b6c9e by Serhiy Storchaka in branch 'default':
Fixed sizeof tests for ElementTree (issue #23450).
https://hg.python.org/cpython/rev/f47d683b6c9e

--

___
Python tracker 

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



[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-02-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch.

The difference between string and bytes formatting is that %c with out of the 
range integer raises OverflowError for str and TypeError for bytes. May be 
ValueError is more suitable in both cases.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file38156/bytes_int_format.patch

___
Python tracker 

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



[issue22107] tempfile module misinterprets access denied error on Windows

2015-02-16 Thread Roger Upole

Roger Upole added the comment:

os.access doesn't check filesystem permissions, so the patch will not catch the 
condition that creates the problem.

--

___
Python tracker 

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



[issue22980] C extension naming doesn't take bitness into account

2015-02-16 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a patch adding the bitness to the ABI tag under Linux. This is 
permitted by PEP 3149: """Python implementations MAY include additional flags 
in the file name tag as appropriate""".

--
Added file: http://bugs.python.org/file38155/abi_bitness.patch

___
Python tracker 

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



[issue20598] argparse docs: '7'.split() is confusing magic

2015-02-16 Thread Julian Berman

Julian Berman added the comment:

+1 to lists all over, this is just confusing.

--
nosy: +Julian

___
Python tracker 

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



[issue22980] C extension naming doesn't take bitness into account

2015-02-16 Thread Antoine Pitrou

Antoine Pitrou added the comment:

So, PEP 3149 claims EXT_SUFFIX will always contain the ABI tag, but 
configure.ac makes it Linux-specific (?!):

AC_SUBST(EXT_SUFFIX)
case $ac_sys_system in
Linux*|GNU*)
EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
*)
EXT_SUFFIX=${SHLIB_SUFFIX};;
esac

--

___
Python tracker 

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



[issue18932] Optimize selectors.EpollSelector.modify()

2015-02-16 Thread Charles-François Natali

Charles-François Natali added the comment:

Does anyone have a realistic use case where modify() is actually a
non-negligible part?

--

___
Python tracker 

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



[issue23450] Possible loss of data warnings building 3.5 Visual Studio Windows 8.1 64 bit

2015-02-16 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue23450] Possible loss of data warnings building 3.5 Visual Studio Windows 8.1 64 bit

2015-02-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a84ae2ccd220 by Serhiy Storchaka in branch 'default':
Issue #23450: Fixed possible integer overflows.
https://hg.python.org/cpython/rev/a84ae2ccd220

New changeset 1eee26b74e4b by Serhiy Storchaka in branch 'default':
Issue #23450: Silenced compiler warnings and added asserts in peephole 
optimizer.
https://hg.python.org/cpython/rev/1eee26b74e4b

--

___
Python tracker 

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



[issue21257] Document parse_headers function of http.client

2015-02-16 Thread Demian Brecht

Changes by Demian Brecht :


--
nosy: +demian.brecht

___
Python tracker 

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



[issue5054] CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed

2015-02-16 Thread Demian Brecht

Changes by Demian Brecht :


--
nosy: +demian.brecht

___
Python tracker 

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



[issue5053] http.client.HTTPMessage.getallmatchingheaders() always returns []

2015-02-16 Thread Demian Brecht

Changes by Demian Brecht :


--
nosy: +demian.brecht

___
Python tracker 

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client

2015-02-16 Thread Demian Brecht

Demian Brecht added the comment:

> Maybe join them with tabs rather than spaces then, since it was previously 
> "\r\n\t". This way it is even closer to before.

After thinking about this a little more, I think I'd prefer to keep
spaces rather than tabs. The reason being is that, in my mind, now that
continuations have been made obsolete it's more natural to do something
like this:

putheader('Authorization', 'Bearer', 'my_token')

than

putheader('Authorization', 'Bearer my_token')

I realize it's a semantic change from previous behavior, but it seems to
me to be preferable given the latest RFCs. I'd think that at some point
in the future, we'd want to remove \x20 from the valid header value
range to entirely conform to the spec. This is the first step in
allowing for graceful deprecation.

--
Added file: http://bugs.python.org/file38154/issue22928_1.patch

___
Python tracker 

___diff -r d12c7938c4b0 Doc/library/http.client.rst
--- a/Doc/library/http.client.rst   Mon Feb 16 13:33:32 2015 +0200
+++ b/Doc/library/http.client.rst   Mon Feb 16 09:42:20 2015 -0800
@@ -292,10 +292,10 @@
 
 .. method:: HTTPConnection.putheader(header, argument[, ...])
 
-   Send an :rfc:`822`\ -style header to the server.  It sends a line to the 
server
-   consisting of the header, a colon and a space, and the first argument.  If 
more
-   arguments are given, continuation lines are sent, each consisting of a tab 
and
-   an argument.
+   Send an :rfc:`7230`\ -style header to the server.  It sends a line to the 
server
+   consisting of the header, a colon and a space, and the first argument. If
+   more arguments are given, they are appended to the header value, each
+   prepended with a single space.
 
 
 .. method:: HTTPConnection.endheaders(message_body=None)
diff -r d12c7938c4b0 Lib/http/client.py
--- a/Lib/http/client.pyMon Feb 16 13:33:32 2015 +0200
+++ b/Lib/http/client.pyMon Feb 16 09:42:20 2015 -0800
@@ -71,6 +71,7 @@
 import http
 import io
 import os
+import re
 import socket
 import collections
 from urllib.parse import urlsplit
@@ -87,6 +88,7 @@
 
 _UNKNOWN = 'UNKNOWN'
 
+
 # connection states
 _CS_IDLE = 'Idle'
 _CS_REQ_STARTED = 'Request-started'
@@ -107,6 +109,35 @@
 _MAXLINE = 65536
 _MAXHEADERS = 100
 
+# Header name/value ABNF (http://tools.ietf.org/html/rfc7230#section-3.2)
+#
+# VCHAR  = %x21-7E
+# obs-text   = %x80-FF
+# header-field   = field-name ":" OWS field-value OWS
+# field-name = token
+# field-value= *( field-content / obs-fold )
+# field-content  = field-vchar [ 1*( SP / HTAB ) field-vchar ]
+# field-vchar= VCHAR / obs-text
+#
+# obs-fold   = CRLF 1*( SP / HTAB )
+#; obsolete line folding
+#; see Section 3.2.4
+
+# token  = 1*tchar
+#
+# tchar  = "!" / "#" / "$" / "%" / "&" / "'" / "*"
+#/ "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
+#/ DIGIT / ALPHA
+#; any VCHAR, except delimiters
+#
+# VCHAR defined in http://tools.ietf.org/html/rfc5234#appendix-B.1
+
+_HEADER_LEGAL_NAME = re.compile(b'^[!#$%&\'*+-.^_`|~a-zA-z0-9]+$')
+# 0x20 (sp) is included in the valid character range for backwards
+# compatibility, where header values with spaces (i.e. auth headers) are passed
+# through to putheader as single values
+_HEADER_LEGAL_VALUE = re.compile(b'^\s*[\x20-\x7E]*\s*$')
+
 
 class HTTPMessage(email.message.Message):
 # XXX The only usage of this method is in
@@ -1000,13 +1031,32 @@
 
 if hasattr(header, 'encode'):
 header = header.encode('ascii')
+
+if not _HEADER_LEGAL_NAME.match(header):
+raise ValueError('Invalid header name {}'.format(header))
+
 values = list(values)
 for i, one_value in enumerate(values):
 if hasattr(one_value, 'encode'):
-values[i] = one_value.encode('latin-1')
+encoded_value = one_value.encode('latin-1')
 elif isinstance(one_value, int):
-values[i] = str(one_value).encode('ascii')
-value = b'\r\n\t'.join(values)
+encoded_value = str(one_value).encode('ascii')
+else:
+encoded_value = one_value
+
+if not _HEADER_LEGAL_VALUE.match(encoded_value):
+raise ValueError(
+'Invalid header value {}'.format(encoded_value))
+
+values[i] = encoded_value
+
+# http://tools.ietf.org/html/rfc7230#section-3.2.4 states that line
+# folding is obsolete, unless message/http MIME type is used and rules
+# are conformed to. otherwise, spaces should be used. it might be a
+# good idea to put validation for this rule in sometime in the future.
+# as it currently stands, there's no way to determine the MIME type of
+# the message at this point.
+   

[issue18986] Add a case-insensitive case-preserving dict

2015-02-16 Thread Demian Brecht

Demian Brecht added the comment:

Some refactoring that I'm working on for http.client could use this (currently 
I have it as part of my patch set). I haven't run into any issues using it and 
it's definitely useful. Would be nice to get this merged.

--
nosy: +demian.brecht

___
Python tracker 

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



[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-02-16 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue23457] make test failures

2015-02-16 Thread David Edelsohn

David Edelsohn added the comment:

A Python3 installation will not overwrite a Python2 installation because they 
are different major releases and not completely compatible.  If Firefox needs 
Python2, you should build the latest, stable release of Python 2.7.

I previously used AIX workstations, but now access AIX servers remotely from 
Linux workstations.  If you log in remotely to an AIX system, you can access 
all of your scripts.

--

___
Python tracker 

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



[issue23446] Use PyMem_New instead of PyMem_Malloc

2015-02-16 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue18295] Possible integer overflow in PyCode_New()

2015-02-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It is possible to reproduce original bug without hacking the code object or 
bytecode:

>>> eval('lambda %s, *args, **kwargs: (lambda:args)' % (', '.join('a%d'%i for i 
>>> in range(253)),))(*range(256))()
(253, 254, 255)
>>> eval('lambda %s, *args, **kwargs: (lambda:args)' % (', '.join('a%d'%i for i 
>>> in range(254)),))(*range(256))()
(254, 255)
>>> eval('lambda %s, *args, **kwargs: (lambda:args)' % (', '.join('a%d'%i for i 
>>> in range(255)),))(*range(256))()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in 
NameError: free variable 'args' referenced before assignment in enclosing scope

>>> eval('lambda %s, *args, **kwargs: (lambda:kwargs)' % (', '.join('a%d'%i for 
>>> i in range(253)),))(*range(256))()
{}
>>> eval('lambda %s, *args, **kwargs: (lambda:kwargs)' % (', '.join('a%d'%i for 
>>> i in range(254)),))(*range(256))()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in 
NameError: free variable 'kwargs' referenced before assignment in enclosing 
scope
>>> eval('lambda %s, *args, **kwargs: (lambda:kwargs)' % (', '.join('a%d'%i for 
>>> i in range(255)),))(*range(256))()
0

--

___
Python tracker 

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



[issue16361] HTTPS/TLS Problem in Python 3.3

2015-02-16 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Python 3.3 no longer receives Windows releases, so closing this issue as out of 
date. Phil, if the issue persists in a newer Python version, please re-report.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue23434] RFC6266 support (Content-Disposition for HTTP)

2015-02-16 Thread Myroslav Opyr

Myroslav Opyr added the comment:

Hi David,

According to "Test Cases for HTTP Content-Disposition header field" overview 
[1], this is not about email headers, but only about HTTP headers. It look like 
email standards and http standars are different in this area.

I do know that my patch is poor. It is just proof of concept, to show that 
there is an issue in stdlib and one of the possible fast patches to get 
functionality needed.

Regards,

Myroslav

Ref:
 [1] http://greenbytes.de/tech/tc2231/

--

___
Python tracker 

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



[issue23446] Use PyMem_New instead of PyMem_Malloc

2015-02-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d83884b3a427 by Serhiy Storchaka in branch '2.7':
Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integer
https://hg.python.org/cpython/rev/d83884b3a427

New changeset 036a2aceae93 by Serhiy Storchaka in branch '3.4':
Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integer
https://hg.python.org/cpython/rev/036a2aceae93

New changeset d12c7938c4b0 by Serhiy Storchaka in branch 'default':
Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integer
https://hg.python.org/cpython/rev/d12c7938c4b0

--
nosy: +python-dev

___
Python tracker 

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



[issue20015] Allow 1-character ASCII unicode where 1-character str is required

2015-02-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What is your decision Guido and Benjamin?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue23471] 404 Not Found when downloading Python 3.4.3rc1 Documentation

2015-02-16 Thread Berker Peksag

Berker Peksag added the comment:

I thought this was fixed by issue 22484

--
nosy: +berker.peksag

___
Python tracker 

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



[issue23471] 404 Not Found when downloading Python 3.4.3rc1 Documentation

2015-02-16 Thread STINNER Victor

STINNER Victor added the comment:

I confirm that all links on this page lead to HTTP 404 errors:
https://docs.python.org/3/download.html

Same error for "dev" (3.5) version:
https://docs.python.org/dev/download.html

Python 2 doc can be downloaded:
https://docs.python.org/2/download.html

--
nosy: +haypo

___
Python tracker 

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



[issue23471] 404 Not Found when downloading Python 3.4.3rc1 Documentation

2015-02-16 Thread SilentGhost

SilentGhost added the comment:

This is the page: https://docs.python.org/3/download.html also true about the 
3.5 at https://docs.python.org/3.5/download.html
All the links in the table result in 404. Clearly the files are not at 
https://docs.python.org/3/archives/

--
nosy: +SilentGhost
versions: +Python 3.5

___
Python tracker 

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



[issue23471] 404 Not Found when downloading Python 3.4.3rc1 Documentation

2015-02-16 Thread Daniel

New submission from Daniel:

Via Chrome on Android 4.4.

--
assignee: docs@python
components: Documentation
messages: 236095
nosy: docs@python, stringsonfire
priority: normal
severity: normal
status: open
title: 404 Not Found when downloading Python 3.4.3rc1 Documentation
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue23470] OpenBSD buildbot uses wrong stdlib

2015-02-16 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Looks as OpenBSD buildbot imports xml.sax.saxutils from wrong place.

http://buildbot.python.org/all/builders/x86%20OpenBSD%205.5%202.7/builds/511/steps/test/logs/stdio

==
ERROR: test_xmlgen_encoding_bytes (test.test_sax.StringXmlgenTest)
--
Traceback (most recent call last):
  File "/home/python-builds/2.7.borja-openbsd-x86/build/Lib/test/test_sax.py", 
line 297, in test_xmlgen_encoding_bytes
gen.characters(u"\u20ac".encode(encoding))
  File "/usr/local/lib/python2.7/site-packages/_xmlplus/sax/saxutils.py", line 
309, in characters
writetext(self._out, content)
  File "/usr/local/lib/python2.7/site-packages/_xmlplus/sax/saxutils.py", line 
188, in writetext
stream.write(escape(text, entities))
  File "/home/python-builds/2.7.borja-openbsd-x86/build/Lib/codecs.py", line 
357, in write
data, consumed = self.encode(object, self.errors)
  File 
"/home/python-builds/2.7.borja-openbsd-x86/build/Lib/encodings/iso8859_15.py", 
line 12, in encode
return codecs.charmap_encode(input,errors,encoding_table)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa4 in position 0: ordinal 
not in range(128)

saxutils.py is imported from /usr/local/lib/python2.7/ instead of the build 
directory. The error that causes UnicodeDecodeError was fixed in issue17606.

May be other test failures have the same cause.

--
components: Tests
messages: 236094
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: OpenBSD buildbot uses wrong stdlib
type: behavior
versions: Python 2.7

___
Python tracker 

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