[issue23794] http package should support HTTP/2

2015-03-28 Thread Cory Benfield

Cory Benfield added the comment:

I'm happy to talk about bringing hyper's HTTP/2 layer into http.client. It's 
worth noting that at this point I have no current plans to build a server into 
hyper, though if there was interest in using hyper as a baseline then I could 
take a swing at it.

--

___
Python tracker 

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



[issue23720] __del__() order is broken since 3.4.0

2015-03-28 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy:  -terry.reedy

___
Python tracker 

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



[issue23797] Mac OS X locale setup in thread happens sometime after run() is called

2015-03-28 Thread Barry Alan Scott

New submission from Barry Alan Scott:

I'm seeing a random traceback when starting a new thread on Mac OS X 10.10.2 
with python 3.4.3 final.

Exception in thread Thread-1:
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/threading.py", 
line 920, in _bootstrap_inner
self.run()
  File 
"/Users/barry/wc/svn/pysvn-phoenix/WorkBench/Source/wb_background_thread.py", 
line 40, in run
self.app.log.info( 'BackgroundThread locale %r' % (locale.getlocale(),) )
  File 
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/locale.py", 
line 575, in getlocale
return _parse_localename(localename)
  File 
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/locale.py", 
line 484, in _parse_localename
raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8

Adding a time.sleep( 5 ) prevents the traceback.

Using _locale.setlocale( locale.LC_ALL, None ) to see the state with locale.py 
interfering it looks like the locale is being initialised in the thread after 
run() is called. (Make no sense to me, but I can reproduce).

I have failed to create a small script to show this bug.

--
messages: 239458
nosy: barry-scott
priority: normal
severity: normal
status: open
title: Mac OS X locale setup in thread happens sometime after run() is called
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



[issue22672] float arguments in scientific notation not supported by argparse

2015-03-28 Thread Evgeny Kapun

Changes by Evgeny Kapun :


--
nosy: +abacabadabacaba

___
Python tracker 

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



[issue23794] http package should support HTTP/2

2015-03-28 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue17515] Add sys.setasthook() to allow to use a custom AST optimizer

2015-03-28 Thread Brett Cannon

Brett Cannon added the comment:

The closing of this issue inspired me to think of a better way to do this, and 
I think providing something in importlib.util that accepted a NodeTransformer 
as an argument to a function that compiled source files to bytecode files would 
fill this issue thanks to PEP 488. It would mean that nothing is done 
dynamically and everything is done offline, but that also means startup costs 
are gone in regards to bytecode generation and it gets people to actually think 
about optimizations of Python instead of it just being an afterthought.

importlib.util.compile(path: Union[str, pathlib.Path], transformer: 
ast.NodeTransformer = None, *, optimization: Union[str, int] = None) -> 
pathlib.Path

--

___
Python tracker 

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



[issue23792] help crash leaves terminal in raw mode

2015-03-28 Thread R. David Murray

R. David Murray added the comment:

SIGINT *is* keyboard interrupt.  Since less at least seems to ignore SIGQUIT I 
suppose also ignoring that would be reasonable, since the user (should) by 
analogy expect that behavior while the pager is active.  Note, however, that 
the signals we are ignoring are in the parent process, not the child as is the 
case for system.  So one can argue that letting the python process die when 
SIGQUIT is received would also be reasonable, and arguably is the less 
surprising option.

--

___
Python tracker 

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



[issue23797] Mac OS X locale setup in thread happens sometime after run() is called

2015-03-28 Thread R. David Murray

R. David Murray added the comment:

This is probably related to or effectively a duplicate of issue 18378, which 
looks to be an Apple bug.

Do you have the problem if you remove the getlocale() call?

--
components: +Macintosh
nosy: +ned.deily, r.david.murray, ronaldoussoren

___
Python tracker 

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



[issue23798] NameError in the encode fixer

2015-03-28 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

==
ERROR: test_all_project_files (lib2to3.tests.test_all_fixers.Test_all)
--
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/lib2to3/tests/test_all_fixers.py", line 25, 
in test_all_project_files
self.refactor.refactor_file(filepath)
  File "/home/serhiy/py/cpython/Lib/lib2to3/refactor.py", line 354, in 
refactor_file
tree = self.refactor_string(input, filename)
  File "/home/serhiy/py/cpython/Lib/lib2to3/refactor.py", line 386, in 
refactor_string
self.refactor_tree(tree, name)
  File "/home/serhiy/py/cpython/Lib/lib2to3/refactor.py", line 460, in 
refactor_tree
new = fixer.transform(node, results)
  File "/home/serhiy/py/cpython/Lib/lib2to3/fixes/fix_encode.py", line 50, in 
transform
if negation:
NameError: name 'negation' is not defined

--

Variable 'negation' is never set.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 239462
nosy: benjamin.peterson, serhiy.storchaka
priority: normal
severity: normal
status: open
title: NameError in the encode fixer
type: behavior
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



[issue23731] Implement PEP 488

2015-03-28 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue23550] Add to unicodedata a function to query the "Quick_Check" property for a character

2015-03-28 Thread Hammerite

Hammerite added the comment:

For good measure, here is a patch that makes all of Berker's suggested 
stylistic changes, but applies them to the pre-existing code in 
makeunicodedata.py and unicodedata.c. So all of the existing docstrings are 
converted from '"...\n\' to '"...\n"' form, and the other property name arrays 
that were non-static are made static.

--
Added file: http://bugs.python.org/file38719/quick_check_4.diff

___
Python tracker 

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



[issue23771] Timeouts on "x86 Ubuntu Shared 3.x" buildbot

2015-03-28 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue23797] Mac OS X locale setup in thread happens sometime after run() is called

2015-03-28 Thread Ned Deily

Ned Deily added the comment:

The behavior noted in Issue18378 isn't an Apple bug; it's a GNU vs BSD 
difference.  Can you avoid the problem by calling locale.getlocale() in the 
main program before creating any threads?

--

___
Python tracker 

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



[issue23799] Join started threads in tests

2015-03-28 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

When a test starts many threads in a loop, there is a chance that the starting 
thread will fail due to lack of memory. In this case all started threads left 
dangling and make MemotyError even more probably. They also can provoke dim 
error messages in this and in following tests. Proposed patch adds new helper 
function test.support.start_threads() that starts threads and then join started 
threads.

Some tests even hang without this patch.

--
components: Tests
files: test_support_start_threads.patch
keywords: patch
messages: 239465
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Join started threads in tests
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file38720/test_support_start_threads.patch

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-28 Thread Cyd Haselton

Cyd Haselton added the comment:

Ryan,
For now I'll make the edits to pyconfig.h manually after downloading the zip 
from the tip and running configure with necessary params.

I'll do my best to get this done this weekend, but it may have to wait until 
next.

--

___
Python tracker 

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



[issue23800] Support POSIX uselocale interface for thread-specific locale settings

2015-03-28 Thread Ned Deily

New submission from Ned Deily:

POSIX 2008 provides a system interface, uselocale, to set locales individually 
on a thread basis rather than just process global, as currently supported with 
locale.setlocale().  uselocale is supported in most current GNU libc, BSD, and 
OS X releases.  While there is currently a third-party package available in 
PyPI, it currently doesn't claim to support Python 3 and it would be good to 
have uselocale as part of the standard library where available.

http://pubs.opengroup.org/stage7tc1/functions/uselocale.html

https://github.com/wichert/xlocale

--
components: Library (Lib)
messages: 239467
nosy: lemburg, loewis, ned.deily
priority: normal
severity: normal
status: open
title: Support POSIX uselocale interface for thread-specific locale settings
type: enhancement
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



[issue23787] sum() function docstring lists arguments incorrectly

2015-03-28 Thread Wolfgang Maier

Wolfgang Maier added the comment:

>This implies sum() should accept str, unicode, list, tuple, bytearray, buffer, 
>and xrange.

and in fact it *does* accept all these as input. It just refuses to add the 
elements of the sequence if these elements are of certain types. Of course, the 
elements of a string are strings themselves so this does not work:

>>> sum('abc', '')
Traceback (most recent call last):
  File "", line 1, in 
sum('abc', '')
TypeError: sum() can't sum strings [use ''.join(seq) instead]


compare with a bytes sequence in Python3, where the elements are ints:

>>> sum(b'abc', 0)
294


but strings are also perfectly accepatble as input if you do not try to add 
their str elements, but something else:

>>> class X (int):
def __add__(self, other):
return X(ord(other) + self)

>>> sum('abc', X(0))
294

=> the docs are right and there is no issue here.

--
nosy: +wolma

___
Python tracker 

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



[issue23771] Timeouts on "x86 Ubuntu Shared 3.x" buildbot

2015-03-28 Thread Davin Potts

Davin Potts added the comment:

@haypo:  Could you please take a look at applying my patches from issue23713 to 
address an intermittent multiprocessing test failure?  I don't know that it is 
the sole cause, but it is indeed one potential source of the misbehavior.

--
nosy: +davin

___
Python tracker 

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



[issue23771] Timeouts on "x86 Ubuntu Shared 3.x" buildbot

2015-03-28 Thread Davin Potts

Davin Potts added the comment:

@haypo: I didn't think that one through -- the consequences of that fragile 
test are not a hang.  It's unrelated.

--

___
Python tracker 

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



[issue23801] cgi.FieldStorage has different (wrong?) behavior on Python3 than Python2

2015-03-28 Thread Donald Stufft

New submission from Donald Stufft:

While working on PyPI 2.0 (which is currently running Python 3) I discovered 
that ``setup.py upload`` was causing an exception. After tracing things I 
determined that the reason for this is that Python 3 fails to handle leading 
whitespace in a multipart body.

I've attached a minimum reproducer that runs without error on Python 2.6 and 
Python 2.7 which fails on Python 3.2, 3.3, and 3.4.

If I go into the cgi.py module and add a print() statement that will print the 
header of each part, I get output that looks like:

b'GHSKFJDLGDS7543FJKLFHRE75642756743254\r\nContent-Disposition: 
form-data; name="protcol_version"\r\n\r\n'
b'Content-Disposition: form-data; name="summary"\r\n\r\n'
b'Content-Disposition: form-data; name="home_page"\r\n\r\n'
b'Content-Disposition: form-data; name="filetype"\r\n\r\n'
b'Content-Disposition: form-data; name="content"; 
filename="jasmin-13.13.13.tar.gz"\r\n\r\n'

The first line of that is obviously suspicious since it includes the inner 
boundary marker. Looking at the Python 3.x code it throws away the first line 
off the fp and then proceeds to process the rest of the fp. However in this 
case the first line is just a blank b'\r\n'. Looking at the Python 2.7 code it 
throws away an entire first part, not just the first line.

I'm guessing that the "read first line and throw it away code" needs to 
continue reading lines until it's read enough lines to get to the boundary 
marker.

--
files: reproduce.py
messages: 239471
nosy: dstufft
priority: normal
severity: normal
status: open
title: cgi.FieldStorage has different (wrong?) behavior on Python3 than Python2
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file38721/reproduce.py

___
Python tracker 

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



[issue23801] cgi.FieldStorage has different (wrong?) behavior on Python3 than Python2

2015-03-28 Thread Donald Stufft

Donald Stufft added the comment:

Added a patch that fixes this issue by reading lines until we find the line 
that is our expected boundary marker.

--
keywords: +patch
Added file: http://bugs.python.org/file38722/cgi-read-until-boundary.diff

___
Python tracker 

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



[issue23802] patch: __deepcopy__ memo dict argument usage

2015-03-28 Thread Daniel Shahaf

New submission from Daniel Shahaf:

In the 'copy' module documentation, it wasn't fully clear to me how 
__deepcopy__ implementations should treat the memo dict argument.  The attached 
patch clarifies that __deepcopy__ implementations should treat the memo dict 
argument as an opaque type.

--
assignee: docs@python
components: Documentation
files: opaque.diff
keywords: patch
messages: 239473
nosy: danielsh, docs@python
priority: normal
severity: normal
status: open
title: patch: __deepcopy__ memo dict argument usage
type: enhancement
Added file: http://bugs.python.org/file38723/opaque.diff

___
Python tracker 

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



[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-03-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The test_urandom_fd_non_inheritable is constantly failed on AMD64 OpenIndiana 
2.7 buildbot.

http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%202.7/builds/2727/steps/test/logs/stdio
==
FAIL: test_urandom_fd_non_inheritable (test.test_os.URandomTests)
--
Traceback (most recent call last):
  File 
"/export/home/buildbot/64bits/2.7.cea-indiana-amd64/build/Lib/test/test_support.py",
 line 387, in wrapper
return func(*args, **kw)
  File 
"/export/home/buildbot/64bits/2.7.cea-indiana-amd64/build/Lib/test/test_os.py", 
line 601, in test_urandom_fd_non_inheritable
self.assertEqual(open_fds - set(range(3)), set())
AssertionError: Items in the first set but not the second:
4

--

--
nosy: +jcea

___
Python tracker 

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