[issue24358] Should compression file-like objects provide .fileno(), misleading subprocess?

2015-06-02 Thread Serhiy Storchaka

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


--
nosy: +benjamin.peterson, pitrou, stutzbach

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-06-02 Thread Mike Frysinger

Mike Frysinger added the comment:

also, it looks like this bug is in python-3.3.  not sure what the status of 
that branch is, but maybe the backport from 3.4 would be easy ?

--

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



[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-06-02 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
assignee:  - ncoghlan

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



[issue24360] improve argparse.Namespace __repr__ for invalid identifiers.

2015-06-02 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +berker.peksag
stage:  - patch review

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



[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid - process mapping.

2015-06-02 Thread Mike Frysinger

Mike Frysinger added the comment:

the original report on our side w/bunches of tracebacks: http://crbug.com/481223

with that traceback in hand, it's pretty trivial to write a reproduction :).  
attached!

i couldn't figure out how to make it work w/out completely execing a new python 
instance.  i suspect the internals were communicating and thus defeating the 
race.

the unshare() might need some checks so that it skips on older kernels or ones 
with pidns support disabled.  but i don't have any such system anymore ;).

if all goes well, it should fail fairly quickly:
$ python3.3 ./test.py 
Traceback (most recent call last):
  File string, line 1, in module
  File /usr/lib64/python3.3/multiprocessing/__init__.py, line 187, in Event
return Event()
  File /usr/lib64/python3.3/multiprocessing/synchronize.py, line 293, in 
__init__
self._cond = Condition(Lock())
  File /usr/lib64/python3.3/multiprocessing/synchronize.py, line 174, in 
__init__
self._wait_semaphore = Semaphore(0)
  File /usr/lib64/python3.3/multiprocessing/synchronize.py, line 84, in 
__init__
SemLock.__init__(self, SEMAPHORE, value, SEM_VALUE_MAX)
  File /usr/lib64/python3.3/multiprocessing/synchronize.py, line 48, in 
__init__
sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
FileExistsError: [Errno 17] File exists
failed

and doesn't take that long to pass:
$ time python3.4 ./test-issue24303.py 
passed!
real0m1.715s

--
Added file: http://bugs.python.org/file39594/test-issue24303.py

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



[issue24266] raw_input + readline: Ctrl+C during search breaks readline

2015-06-02 Thread sping

sping added the comment:

I guess supporting older upstream versions would be nice in this case.

--

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



[issue24365] Conditionalize 3.5 additions to the stable ABI

2015-06-02 Thread Petr Viktorin

Petr Viktorin added the comment:

I meant stable ABI, of course

--
title: Conditionalize 3.5 additions to the stable API - Conditionalize 3.5 
additions to the stable ABI

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



[issue24355] Provide a unittest api for controlling verbosity in tests

2015-06-02 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +ezio.melotti, michael.foord, rbcollins

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



[issue24365] Conditionalize 3.5 additions to the stable ABI

2015-06-02 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


--
nosy: +ncoghlan
stage:  - patch review

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



[issue7559] TestLoader.loadTestsFromName swallows import errors

2015-06-02 Thread R. David Murray

R. David Murray added the comment:

It looks to me like this is complete, so closing.

--

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



[issue24352] Provide a way for assertLogs to optionally not hide the logging output

2015-06-02 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +ezio.melotti, michael.foord, rbcollins

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



[issue24362] Simplify the fast nodes resize logic in C OrderedDict.

2015-06-02 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


--
nosy: +yselivanov

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



[issue20155] Regression test test_httpservers fails, hangs on Windows

2015-06-02 Thread R. David Murray

R. David Murray added the comment:

Terry: the slowdown might be IPV6 handling, which was a bit broken on windows.

In any case, I think the slowdown should be treated as a separate issue if you 
care about it, so I'm going to close this.  (I think it would be great if 
someone would do a review of the test suite looking for things to speed 
up...maybe we could add that to the devguide as a what-can-I-work-on project...)

--
resolution:  - fixed
status: open - closed

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



[issue24365] Conditionalize 3.5 additions to the stable API

2015-06-02 Thread Petr Viktorin

New submission from Petr Viktorin:

I have sent patches to 3.5 that add new stable API, and later I learned [0] 
that additions should be conditional on the value of Py_LIMITED_API.
This patch adds #ifdef blocks for what was added in issues #24268 and #24345.


[0] https://mail.python.org/pipermail/python-dev/2015-June/140425.html

--
components: Extension Modules, Interpreter Core
files: guard-stable-api.patch
keywords: patch
messages: 244684
nosy: encukou
priority: normal
severity: normal
status: open
title: Conditionalize 3.5 additions to the stable API
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file39596/guard-stable-api.patch

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



[issue22725] improve documentation for enumerate() (built-in function)

2015-06-02 Thread R. David Murray

R. David Murray added the comment:

Per Raymond's last message, closing this as rejected.

--
assignee: rhettinger - docs@python
stage: needs patch - resolved

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



[issue23171] csv.writer.writerow() does not accept generator (must be coerced to list)

2015-06-02 Thread R. David Murray

R. David Murray added the comment:

Looks like Serhiy forgot to close this, so closing it.

--
assignee: serhiy.storchaka - 

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



[issue24266] raw_input + readline: Ctrl+C during search breaks readline

2015-06-02 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue23171] csv.writer.writerow() does not accept generator (must be coerced to list)

2015-06-02 Thread R. David Murray

R. David Murray added the comment:

No, I just had a stale tab :( :(

--

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



[issue19699] Update zipimport for PEP 451

2015-06-02 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue23440] Extend http.server.SimpleHTTPRequestHandler testing

2015-06-02 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
stage: patch review - commit review

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



[issue24369] Using OrderedDict.move_to_end during iteration is problematic.

2015-06-02 Thread Eric Snow

New submission from Eric Snow:

While the dict/OrderedDict iterators already check for additions and deletions, 
using the OrderedDict.move_to_end during iteration can lead to surprising 
results.

The following results in an infinite loop:

od = OrderedDict.fromkeys('abc')
last = None
for k in od:
if last is not None:
od.move_to_end(last)
last = k

Ideally we could disallow changing order during iteration, just like we 
disallow deletion.  Since we've gone 3 minor versions already, would it be too 
late to break backward compatibility on this point?

--
components: Library (Lib)
messages: 244718
nosy: eric.snow, rhettinger
priority: high
severity: normal
stage: test needed
status: open
title: Using OrderedDict.move_to_end during iteration is problematic.
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Michael Del Monte

Michael Del Monte added the comment:

I don't want to speak out of school and you guys certainly know what you're 
doing, but it seems a shame to go through these gyrations -- lookahead plus 
unreading lines -- only to preserve the ability to parse email headers, when 
HTTP really does follow a different spec.  My suggestion would be to examine 
the header and decide, if it's HTTP, to just ignore nonconforming lines; and if 
it's email, then the problem is already solved (as email doesn't have encoding 
rules that would cause problems later).  

My fear would be that you'll eventually get that nonconforming line with 
leading whitespace, which will lead right back to the same error.

--

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



[issue24368] Some C OrderedDict methods need to support keyword arguments.

2015-06-02 Thread Eric Snow

Eric Snow added the comment:

Here's a patch with tests.

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file39601/issue24368-kwargs.diff

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



[issue24368] Some C OrderedDict methods need to support keyword arguments.

2015-06-02 Thread Eric Snow

New submission from Eric Snow:

Several methods were implemented using PyArg_UnpackTuple and need to use 
PyArg_ParseTupleAndKeywords instead.

--
assignee: eric.snow
components: Library (Lib)
messages: 244716
nosy: eric.snow
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Some C OrderedDict methods need to support keyword arguments.
type: behavior
versions: Python 3.5, Python 3.6

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



[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-06-02 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue24361] OrderedDict: crash with threads

2015-06-02 Thread Eric Snow

Eric Snow added the comment:

FYI, this doesn't crash when I have the patch from issue24362 applied.

--
assignee:  - eric.snow

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



[issue24270] PEP 485 (math.isclose) implementation

2015-06-02 Thread Yury Selivanov

Yury Selivanov added the comment:

Can this issue be closed now?

--
nosy: +yselivanov

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



[issue24252] IDLE removes elements from tracebacks.

2015-06-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Your message arrived as I was just starting on this issue, wondering whether 
the exclusion of threading and queue blocks is proper and wishing for an easy 
test example, such as you provided. It verifies the issue in 3.x.  It also 
answers the question: trimming queue blocks is not acceptible.  (Many threading 
functions also raise various exceptions.) Informative tracebacks are a major 
python feature.  So Idle should be conservative about trimming tracebacks.

The attached 3.4 patch solves queue and threading problems by deleting them 
from the exclude list.  It attempts to solve your pdb problem by conditionally 
removing bdb.py also.  Could you patch your Idle, by hand if necessary, and 
test?

--
keywords: +patch
stage: needs patch - patch review
versions: +Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file39600/tb-trim.diff

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



[issue24367] Idle hangs when you close the debugger while debugging

2015-06-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Previous issue has a patch that needs independent review.

--
resolution:  - duplicate
stage:  - resolved
status: open - closed
superseder:  - IDLE - shell becomes unresponsive if debugger windows is closed 
while active.

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread R. David Murray

R. David Murray added the comment:

No, the point is to do best practical error recovery when faced with dirty 
data that may be dirty in various ways, and it doesn't really matter whether it 
is http headers or email headers.  A line with leading whitespace is treated as 
part of the preceding header line now, and this is the way it should behave, 
since the older http standards adopted that behavior from rfc822.  You will 
note that the standard referenced by Ian is explicit about that, in the 
obs-fold clause.  That is, we are required by the standard to support that 
behavior, which is why I posit that the best recovery is to assume an invalid 
line followed by what look like headers is in fact an incorrectly folded 
obs-fold continuation line.  That this will also conform to the email standard 
is a not-accidental consequence of how these standards evolved.  (That is, 
email and http header handling are *not* different specs in the sense of 
being disjoint, they are derivatives of a common ancestor spec and some effort 
is
  spent keeping them interoperable, to my understanding.)

--

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Martin Panter

Martin Panter added the comment:

Regarding the suggested fix for Python 2, make sure it does not prematurely end 
the parsing on empty folded lines (having only tabs and spaces in them). E.g. 
according to RFC 7230 this should be a single header field:

bHeader: obsolete but\r\n
b\r\n
bstill valid\r\n

I suspect the RFC doesn’t say anything specifically about this case. In general 
the guidance seems to be things like:

* User agents should be tolerant of errors received in the protocol
* Proxies should fix up errors when forwarding messages upstream
* Servers should often reject errors in requests with 400 Bad Request 
(presumably to avoid the possibility of a downstream proxy being tricked by the 
protocol error and not triggering some security filter)

In the case of the bank web site, the last lines of the header are:

X-Frame-Options: SAMEORIGIN\r\n
Set-Cookie: mb-CookieP=; HttpOnly; \r\n
Secure\r\n
Set-Cookie: mb-CookieP=; HttpOnly; Secure\r\n
\r\n

It is obvious that this case could be treated as a folded (continuation) line. 
But in general I think it would be better to ignore the erroneous line, or to 
record it as a defect so that the server module or other user can check it.

Looking at the Python 3 code, both the client and server call 
http.client._parse_headers(), which sensibly reads each line until it sees a 
blank line (Lib/http/client.py:197). But then after jumping through some more 
hoops we parse it again until we find a line that fails the regular expression 
at Lib/email/feedparser.py:37. The remaining lines become the “payload” of the 
HTTP header:

 with urlopen(http://www.merrickbank.com/;) as response:
... response.info().get_payload()
... 
'Secure\r\nSet-Cookie: mb-CookieP=; HttpOnly; Secure\r\n\r\n'

What might be nice is a way to reuse the email header field parsing code, 
without worrying about the “From” line stuff, or the payload stuff.

--
nosy: +vadmium

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



[issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update

2015-06-02 Thread R. David Murray

R. David Murray added the comment:

Yes, this is fixed, as the issue resolution says.  If you are curious about the 
fix, follow the links to the commits starting in msg197116.

--
nosy: +r.david.murray

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



[issue4753] Faster opcode dispatch on gcc

2015-06-02 Thread David Bolen

David Bolen added the comment:

Oops, sorry, I had just followed the commit comment to this issue.  For the 
record here, it looks like Benjamin has committed an update (5e8fa1b13516) that 
resolves the problem.

--

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



[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-06-02 Thread Larry Hastings

Larry Hastings added the comment:

Then you may fire when ready.

--

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



[issue18003] lzma module very slow with line-oriented reading.

2015-06-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Nous disions que tu aurais probablement à valider ce changement, mais que nous 
pourrions peut-être aussi le faufiler discrètement dans la base de code, vu que 
tu ne lis pas ces message.

--

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



[issue24366] Simple indentation

2015-06-02 Thread Daniel

Changes by Daniel danielciugur...@yahoo.com:


--
files: indent.patch
keywords: patch
nosy: li4ick
priority: normal
severity: normal
status: open
title: Simple indentation
versions: Python 3.6
Added file: http://bugs.python.org/file39597/indent.patch

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



[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-06-02 Thread Eric Snow

Eric Snow added the comment:

Hmm.  Looks like the fix in setuptools/pkg_resources is 17.0. [1]  The bundled 
pip to which we just updated is 7.0.3, which appears to bundle pkg_resources 
15.0. [2]  So unless I've misunderstood, the hack will have to linger for a bit 
longer.

Here's a patch for when we get there.

[1] https://bitbucket.org/pypa/setuptools/commits/tag/17.0
[2] https://github.com/pypa/pip/blob/7.0.3/pip/_vendor/README.rst

--
keywords: +patch
nosy: +dstufft
stage: needs patch - patch review
Added file: http://bugs.python.org/file39599/issue24320-remove-hack.diff

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



[issue24365] Conditionalize 3.5 additions to the stable ABI

2015-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c835dd16539a by Yury Selivanov in branch '3.5':
Issue 24365: Conditionalize PEP 489 additions to the stable ABI
https://hg.python.org/cpython/rev/c835dd16539a

New changeset fd265fa89c36 by Yury Selivanov in branch 'default':
Issue 24365: Merge 3.5
https://hg.python.org/cpython/rev/fd265fa89c36

--
nosy: +python-dev

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



[issue24252] IDLE removes elements from tracebacks.

2015-06-02 Thread ppperry

ppperry added the comment:

This problem also occurs in other situati, such as when trying to get items 
from an empty queue
 import Queue
 Q = Queue.Queue()
 q.get_nowait()
Traceback (most recent call last):
  File pyshell#16, line 1, in module
q.get_nowait()
Empty
In that case, it doesn't really matter, though.

--

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



[issue24342] coroutine wrapper reentrancy

2015-06-02 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


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

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



[issue24362] Simplify the fast nodes resize logic in C OrderedDict.

2015-06-02 Thread Eric Snow

Eric Snow added the comment:

Here's a patch that adds stores the hash on each node.  This eliminates the 
need to call PyObject_Hash when rebuilding the fast nodes table during a 
resize.  The patch also drops a superfluous while loop.

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file39598/issue24362-odict-resize.diff

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



[issue18003] lzma module very slow with line-oriented reading.

2015-06-02 Thread Larry Hastings

Larry Hastings added the comment:

Quoi? Je comprends que le français.

--

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



[issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update

2015-06-02 Thread Etienne Le Sueur

Etienne Le Sueur added the comment:

Thanks, I had missed that message.

On 6/2/15 4:39 PM, R. David Murray wrote:
 R. David Murray added the comment:

 Yes, this is fixed, as the issue resolution says.  If you are curious about 
 the fix, follow the links to the commits starting in msg197116.

 --
 nosy: +r.david.murray

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue18458
 ___

--

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



[issue18003] lzma module very slow with line-oriented reading.

2015-06-02 Thread Larry Hastings

Larry Hastings added the comment:

If I understand this correctly, I can ignore everything up to May 2015, as it 
has to do with line-reading a compressed binary file (!) being slow.

Then, Martin Panter proposes a new optimization in May 2015, which is to simply 
add __iter__ methods to gzip.GzipFile and lzma.LZMAFile.

Is this right?

--

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread R. David Murray

R. David Murray added the comment:

I think there may be a way to accomplish this in a reasonably straightforward 
fashion in python3 given that feedparser has an 'unreadline' function.  The 
python2 case is probably going to be a more complicated change.  And I agree 
that multiple lines should be examined.

There is also the question of what to do with the extra data.  I think the 
correct approach is to treat a line that does not conform as a line that is 
missing the leading whitespace that would make it a continuation line.  It 
looks like that would certainly be correct for the case in hand.

--

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



[issue24367] Idle hangs when you close the debugger while debugging

2015-06-02 Thread ppperry

New submission from ppperry:

[DEBUG ON]
 some_code
(debugger closed before pressing any buttons)
[DEBUG OFF]
 more_code
(no response)

--
components: IDLE
messages: 244707
nosy: kbk, ppperry, roger.serwy, terry.reedy
priority: normal
severity: normal
status: open
title: Idle hangs when you close the debugger while debugging
type: behavior

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



[issue18003] lzma module very slow with line-oriented reading.

2015-06-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This looks good to me. Larry would probably have to validate it for 3.5, 
although we may try to sneak it in (he isn't reading :-D).

--
nosy: +larry

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



[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-06-02 Thread Larry Hastings

Larry Hastings added the comment:

Sounds okay in theory.  Is the bug in question now tested in our regression 
suite?

--

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Cory Benfield

Cory Benfield added the comment:

This is one of those bugs that's actually super tricky to correctly fix.

The correct path is to have the goal of conservatively accepting as many 
headers as possible. Probably this means looking ahead to the next few lines 
and seeing if they appear to roughly keep a header structure (\r\n line breaks 
and colon separated values). However, I'm not entirely sure how to structure 
that sentiment in code at this time.

--
nosy: +Lukasa

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Demian Brecht

Changes by Demian Brecht demianbre...@gmail.com:


--
nosy: +demian.brecht

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



[issue24365] Conditionalize 3.5 additions to the stable ABI

2015-06-02 Thread Nick Coghlan

Nick Coghlan added the comment:

Looks good to me.

--

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



[issue24342] coroutine wrapper reentrancy

2015-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 19d613c2cd5f by Yury Selivanov in branch '3.5':
Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefully
https://hg.python.org/cpython/rev/19d613c2cd5f

New changeset 8a6db1679a23 by Yury Selivanov in branch 'default':
Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefully
https://hg.python.org/cpython/rev/8a6db1679a23

--
nosy: +python-dev

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



[issue24366] Simple indentation

2015-06-02 Thread Roundup Robot

New submission from Roundup Robot:

New changeset 035aa81c2ba8 by Yury Selivanov in branch '3.3':
Issue 24366: Indent code (thanks to li4ick for reporting).
https://hg.python.org/cpython/rev/035aa81c2ba8

New changeset 95d1f38e540e by Yury Selivanov in branch '3.4':
Issue 24366: Merge 3.3
https://hg.python.org/cpython/rev/95d1f38e540e

New changeset 67f0843a2ecf by Yury Selivanov in branch '3.5':
Issue 24366: Merge 3.4
https://hg.python.org/cpython/rev/67f0843a2ecf

New changeset 54459fdf2bca by Yury Selivanov in branch 'default':
Issue 24366: Merge 3.5
https://hg.python.org/cpython/rev/54459fdf2bca

--
nosy: +python-dev

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



[issue24366] Simple indentation

2015-06-02 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


--
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue24365] Conditionalize 3.5 additions to the stable ABI

2015-06-02 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


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

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



[issue24369] Using OrderedDict.move_to_end during iteration is problematic.

2015-06-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The C version should defend itself against any key-changes during iteration 
(see the state counter used in deque objects for an example of how to do this). 
  The pure python version of OrderedDict has only minimal defenses against 
mutating during iteration, and it should be left as-is.

FWIW, surprising is in the eye of the beholder.  When it comes to mutating 
containers during iteration, all kinds of things can happen (that is why 
databases implement reader and writer locks).  

The following results in an infinite loop:

s = list('abc')
for k in s:
s.append(k)

--
assignee:  - rhettinger
priority: high - normal
versions:  -Python 3.4

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



[issue24368] Some C OrderedDict methods need to support keyword arguments.

2015-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 38ffea158630 by Eric Snow in branch '3.5':
Issue #24368: Support keyword arguments in OrderedDict methods.
https://hg.python.org/cpython/rev/38ffea158630

--
nosy: +python-dev

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



[issue24368] Some C OrderedDict methods need to support keyword arguments.

2015-06-02 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


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

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread R. David Murray

R. David Murray added the comment:

Since the email package has the correct logic for handling the blank 
continuation line case (even in Python2) (because, again, that derives from the 
original email standard), it might be reasonable to use feedparser's 
headersonly mode.  If necessary we can introduce a (private) variation that 
actually stops parsing the stream at the end of the headers.  (This would be a 
non-public API on feedparser for 2.7 and 3.4/5, and a public one in 3.6.)  
Since feedparser was itself a rewrite of the mimetools code httplib is using 
and theoretically backward compatible with it in behavior, this should not in 
theory introduce any behavior changes (famous last words?).  

The problem here is the good chance that someone is depending on the internal 
implementation of HTTPMessage.  So, I'm not at all sure about this suggestion.
 
And yes, the email package in python3 records header defects.  However, I think 
it is better to treat the no-leading-blank non-header as an incorrectly folded 
continuation line rather than discarding the data.  The data is in the headers 
section for *some* reason, and IMO that is the only reasonable guess as to why.

--

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



[issue24369] Using OrderedDict.move_to_end during iteration is problematic.

2015-06-02 Thread Eric Snow

Eric Snow added the comment:

Sounds good.  Thanks, Raymond.

--

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



[issue24342] coroutine wrapper reentrancy

2015-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d11cb1218489 by Yury Selivanov in branch '3.5':
Issue 24342: No need to use PyAPI_FUNC for _PyEval_ApplyCoroutineWrapper
https://hg.python.org/cpython/rev/d11cb1218489

New changeset b83fbc13ae1e by Yury Selivanov in branch 'default':
Issue 24342: No need to use PyAPI_FUNC for _PyEval_ApplyCoroutineWrapper
https://hg.python.org/cpython/rev/b83fbc13ae1e

--

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



[issue24370] OrderedDict behavior is unclear with misbehaving keys.

2015-06-02 Thread Eric Snow

New submission from Eric Snow:

How well does OrderedDict need to behave in the face of keys with unstable 
hashes (e.g. define __hash__ with varying results across calls)?  I would 
expect the behavior to be undefined (though non-crashing).  Here's an example 
of a misbehaving key:

class Key:
def __hash__(self):
return randrange(1)

FWIW, dict does pretty well even with bad keys.  The pure Python OrderedDict 
does okay.

--
assignee: eric.snow
components: Library (Lib)
messages: 244727
nosy: eric.snow, rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: OrderedDict behavior is unclear with misbehaving keys.
type: behavior
versions: Python 3.5, Python 3.6

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



[issue5319] stdout error at interpreter shutdown fails to return OS error status

2015-06-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't know how acceptable it is to add a return value to Py_Finalize(). Can 
it break the stable ABI?

--
nosy: +loewis, steve.dower

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



[issue24361] OrderedDict: crash with threads

2015-06-02 Thread Stefan Krah

New submission from Stefan Krah:

I tried to disprove my own claim of unreachable code in resize()/get_index() 
using a convoluted threaded test case.

The code still fails to be reached, but another segfault turned up.

--
components: Extension Modules
files: crash-th.py
messages: 244661
nosy: Arfrever, BreamoreBoy, Jim.Jewett, Mark.Shannon, Ryan.Gonzalez, alex, 
asvetlov, benjamin.peterson, christian.heimes, eric.araujo, eric.smith, 
eric.snow, ezio.melotti, flox, gregory.p.smith, introom, josh.r, mrabarnett, 
ncoghlan, ned.deily, pitrou, python-dev, rhettinger, scoder, serhiy.storchaka, 
skrah, tonn81, westurner, yselivanov
priority: normal
severity: normal
stage: needs patch
status: open
title: OrderedDict: crash with threads
type: crash
versions: Python 3.6
Added file: http://bugs.python.org/file39595/crash-th.py

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



[issue24358] Should compression file-like objects provide .fileno(), misleading subprocess?

2015-06-02 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Blech, typo earlier since they produce the *compressed* data (likely useless) 
when read as subprocess stdin. Context should make it obvious, but trying to 
be clear.

--

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



[issue23239] SSL match_hostname does not accept IP Address

2015-06-02 Thread Christian Heimes

Christian Heimes added the comment:

The patch has a couple of issues

1) match_hostname()'s doc string needs to be updated. It still contains but IP 
addresses are not accepted for *hostname*

2) The stdlib uses server_hostname for SNI and matching. An IP address in the 
SNI TLS extension violates RF 3546 https://tools.ietf.org/html/rfc3546#page-9

   Literal IPv4 and IPv6 addresses are not permitted in HostName.

3) The code doesn't match IP addresses in dNSName and DNS names in IP Address 
fields. Hynek's service identity module and Mozilla's NSS [1] agree with you. 
As far as I have studied OpenSSL 1.0.2, it has a different opinion. I'm in 
favor for the current check. I suggest to document the decision in the code and 
raise a more explicit exception. The current message is a bit confusing:

  ssl.CertificateError: hostname '127.0.0.1' doesn't match '127.0.0.1'

4) The code doesn't check the CN field for IP address as NSS does. [2]


In order to fix 2) and make the check more explicit I like to suggest an API 
change. Don't convert the host name to an IP address implicitly. If the user 
wants to validate an IP address, then she must pass in an ipaddress object as 
server_hostname. In that case SSLSocket.server_hostname is set to the ipaddress 
object. socket._wrap_socket() is called with server_hostname=None for 
ipaddress. That fixes the RFC violation.


[1] cert_VerifySubjectAltName() 
https://dxr.mozilla.org/mozilla-central/source/security/nss/lib/certdb/certdb.c#1427
[2] CERT_VerifyCertName 
https://dxr.mozilla.org/mozilla-central/source/security/nss/lib/certdb/certdb.c#1769

--
resolution: fixed - 
status: closed - open

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



[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-06-02 Thread Nick Coghlan

Nick Coghlan added the comment:

Adding the --disable-pip-version-check option doesn't make the warning go 
away, and apparently the already passed --no-index flag is supposed to imply 
that one anyway:

==
--disable-pip-version-check

Don't periodically check PyPI to determine whether a new version of pip is 
available for download. Implied with --no-index.
==

Filed https://github.com/pypa/pip/issues/2860, reassigning to Donald and adding 
Paul to the nosy list.

--
assignee: ncoghlan - dstufft
nosy: +paul.moore

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



[issue16991] Add OrderedDict written in C

2015-06-02 Thread Stefan Krah

Stefan Krah added the comment:

It's fine to open other issues, but I'm not happy with the resize()/get_index() 
situation.  Currently I can't come up even with an informal proof that it'll 
always work (and see #24361).

I think these functions really *need* 100% code coverage.

--

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



[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f39e9bcd789b by Donald Stufft in branch '3.5':
Merge the fix for #24267
https://hg.python.org/cpython/rev/f39e9bcd789b

New changeset 6dffea6134ad by Donald Stufft in branch 'default':
Merge the fix for #24267
https://hg.python.org/cpython/rev/6dffea6134ad

--

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



[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aaa015dde686 by Donald Stufft in branch '3.4':
Closes #24267 - Does not check version on ensurepip uninstall
https://hg.python.org/cpython/rev/aaa015dde686

--
nosy: +python-dev
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue16991] Add OrderedDict written in C

2015-06-02 Thread Eric Snow

Eric Snow added the comment:

Addressing the concerns with resize()/get_index() is next on my list.  I had 
meant to open up an issue on it last night but it was getting pretty late for 
me and it slipped my mind.  I've opened issue24362 to track that work.

--

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



[issue24362] Simplify the fast nodes resize logic in C OrderedDict.

2015-06-02 Thread Eric Snow

New submission from Eric Snow:

Between comments on issue16991 and review comments there, it's clear that the 
implementation of _odict_resize and _odict_get_index in Objects/odictobject.c 
are too complicated to be a long-term solution.  simplifying the approach to 
avoid recursion should help substantially.

--
assignee: eric.snow
components: Library (Lib)
messages: 244667
nosy: eric.snow, skrah
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Simplify the fast nodes resize logic in C OrderedDict.
versions: Python 3.5, Python 3.6

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



[issue5319] stdout error at interpreter shutdown fails to return OS error status

2015-06-02 Thread Steve Dower

Steve Dower added the comment:

Going from void to int is fine for when the return value is ignored. However, 
those who check the return value will see garbage on earlier versions.

As always, safest to add a new function here. Or make the stable version 
continue to be void - it won't affect the exports.

--

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Ian Cordasco

Ian Cordasco added the comment:

Also I'm marking this as affecting 3.3, 3.4, and 3.5. I haven't tested against 
3.5, but it definitely fails on 3.4. I hope to be able to test against 3.5.0b2 
tonight

--
versions: +Python 3.3, Python 3.4, Python 3.5

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



[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 02d214716367 by Donald Stufft in branch '2.7':
Issue #24267 - Ensure that pip version check is disabled on uninstall
https://hg.python.org/cpython/rev/02d214716367

--

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Ian Cordasco

Ian Cordasco added the comment:

FWIW, the proper section to reference now is 3.2 in RFC 7230 
(https://tools.ietf.org/html/rfc7230#section-3.2)

--
nosy: +icordasc

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Michael Del Monte

New submission from Michael Del Monte:

Initially reported at https://github.com/kennethreitz/requests/issues/2622

Closely related to http://bugs.python.org/issue19996

An HTTP response with an invalid header line that contains non-blank characters 
but *no* colon (contrast http://bugs.python.org/issue19996 in which it 
contained a colon as the first character) causes the same behavior.

httplib.HTTPMessage.readheaders() oddly does not appear even to attempt to 
follow RFC 2616, which requires the header to terminate with a blank line.  The 
invalid header line, which admittedly also breaks RFC 2616, is at least 
non-blank and should not terminate the header.  Yet readheaders() takes it as 
an indicator that the header is over and then fails properly to process the 
rest of the response.

The problem is exacerbated by a chunked encoding, which will not be properly 
received if the encoding header is not seen because readheaders() terminates 
early.  An example (why are banks always the miscreants here?) is:

p = response.get(http://www.merrickbank.com/;)

My recommended fix would be to insert these lines at httplib:327

# continue reading headers on non-blank lines
elif not len(line.strip()):
continue
# break only on blank lines


This would cause readheaders() to terminate only on a non-blank non-header 
non-comment line, in accordance with RFC 2616.

--
components: Library (Lib)
messages: 244672
nosy: mgdelmonte
priority: normal
severity: normal
status: open
title: httplib fails to handle semivalid HTTP headers
type: behavior
versions: Python 2.7

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread R. David Murray

R. David Murray added the comment:

The current behavior probably comes out of the RFC822 world, where when seeing 
a line that doesn't look like a header the error recovery is to treat that line 
as the beginning of the body (ie: assume the blank line is missing).

Is there in fact any guidance on what the optimal error recovery strategy is 
for http?  I've actually considered trying to make the error recovery in email 
smarter, by seeing if the *next* line looks like a header before making the 
decision.

--
nosy: +r.david.murray

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



[issue24364] Not all defects pass through email policy

2015-06-02 Thread R. David Murray

New submission from R. David Murray:

This is a note to myself.  While looking at another issue I noticed that I 
never completed the work to make sure that all message defects discovered by 
feedparser are passed through the policy defect handler.  The fix is simple, 
the time consuming part is writing the tests.

--
components: email
keywords: easy
messages: 244679
nosy: barry, r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: Not all defects pass through email policy
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread Michael Del Monte

Michael Del Monte added the comment:

Thanks.  Also I meant to have said, ...to terminate only on a *blank* 
non-header non-comment line, in accordance with RFC 2616 (and 7230).

I note that the RFCs require CRLF to terminate but in my experience you can get 
all manner of blank lines, so accepting len(line.strip())==0 is going to 
accommodate servers that give CRCR or LFLF or (and I have seen this) LFCRLF.

--

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



[issue23078] unittest.mock patch autospec doesn't work on staticmethods

2015-06-02 Thread Felipe

Felipe added the comment:

Regarding Claudiu's comment about `staticmethod(x)` or `classmethod(x)` not 
being callable, would it suffice to add a specific check of the form 
`(isinstance(x, (classmethod, staticmethod)) and _callable(x.__func__))`?

Separately, would it be better to include the check for `staticmethod` and 
`classmethod` objects (with an underlying callable) inside the `_callable` 
function? Not sure if this would break anything, but it seems like conceptually 
the issue is with the definition of a callable object, not the selection of 
mock type to use.

--
nosy: +fov

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
components: +email
keywords: +easy
nosy: +barry
stage:  - needs patch

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



[issue24363] httplib fails to handle semivalid HTTP headers

2015-06-02 Thread R. David Murray

R. David Murray added the comment:

Ah, in fact that's exactly where it comes from, since httplib uses the email 
header parsing code.  In python3 we are actually using the email package to 
parse the headers (which is sensible) (in 2.7 it is a copy of code from the old 
mimelib with some tweaks).  Fixing this in python3 is best done by making the 
error recovery enhancement(s) I mentioned in the email package.  

Please note that changing this behavior has the potential to break working 
code.  That is, just as we have here a server that is out of spec and sending 
invalid links in the middle of headers, we may have a server that is out of 
spec by not sending the blank delimiter, which is currently being handled 
correctly.  Thus I don't think your simple fix is advisable, instead I think 
we should pursue the more complicated look ahead fix.

--
versions:  -Python 3.3

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



[issue24266] raw_input + readline: Ctrl+C during search breaks readline

2015-06-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The patch is two lines, but I do not know our general policy for working around 
bugs in external modules.  I do know that Idle has workarounds for tk bugs (or 
'os-dependencies').

--

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



[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-06-02 Thread Eric Snow

Eric Snow added the comment:

https://hg.python.org/cpython/rev/5c4ba50f6a57

I'll see if that does it.

@Larry, would you be opposed to dropping the hack for beta 3?  That would mean 
just deleting the last 2 lines in Lib/importlib/_bootstrap_external.py.

--

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



[issue24266] raw_input + readline: Ctrl+C during search breaks readline

2015-06-02 Thread R. David Murray

R. David Murray added the comment:

I believe that in general we do do workarounds if they don't make the code too 
complicated and upstream hasn't solved the problem (or we need to support older 
upstream versions).

--
nosy: +r.david.murray

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



[issue24360] improve argparse.Namespace __repr__ for invalid identifiers.

2015-06-02 Thread Matthias Bussonnier

New submission from Matthias Bussonnier:

The argparse Namespace can be missleading in case where the args names are not 
valid identifiers, eg thinks like a closing bracket:

In [5]: Namespace(a=1, **{')':3})
Out[5]: Namespace()=3, a=1)

more funny:

In [3]: Namespace(a=1, **{s:3})
Out[3]: Namespace(a=1, b=2), Namespace(c=3)

for `s = 'b=2), Namespace(c'`


With this patch the args that are not valid identifiers are shown in ** 
unpacked-dict, which has the side effect of almost always having 
repr(eval(repr(obj)))== repr(obj). I'm sure we can find counter example with 
quotes and triple-quoted string... but anyway.


with this patch (indentation mine for easy comparison):

 from argparse import Namespace
 Namespace(a=1, **{')': 3})
Namespace(a=1, **{')': 3})

Which is I think what most user would expect.

Test passes locally (except SSL cert, network thingies, curses and 
threaded_lru_cache) which look unrelated and is most likely due to my machine.

--
components: Library (Lib)
files: improve-namespace-repr.patch
keywords: patch
messages: 244655
nosy: mbussonn
priority: normal
severity: normal
status: open
title: improve argparse.Namespace __repr__ for invalid identifiers.
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file39593/improve-namespace-repr.patch

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



[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-06-02 Thread Ned Deily

Ned Deily added the comment:

All of the 3.x buildbots are broken again due to the pip 7.0.3 update.

==
FAIL: test_with_pip (test.test_venv.EnsurePipTest)
--
Traceback (most recent call last):
  File 
/var/lib/buildbot/slaves/profile-opt-bot/3.5.gps-debian-profile-opt/build/Lib/test/test_venv.py,
 line 390, in test_with_pip
self.assertEqual(err, )
AssertionError: You are using pip version 7.0.1, however[102 chars]d.\n != ''
- You are using pip version 7.0.1, however version 7.0.3 is available.
- You should consider upgrading via the 'pip install --upgrade pip' command.

--
nosy: +ned.deily
priority: normal - critical
versions: +Python 3.4, Python 3.6

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



[issue24308] Test failure: test_with_pip (test.test_venv.EnsurePipTest in 3.x

2015-06-02 Thread Ned Deily

Ned Deily added the comment:

This is covered by Issue24267; let's track it there.

--
nosy: +ned.deily
resolution:  - duplicate
stage:  - resolved
status: open - closed
superseder:  - test_venv.EnsurePipTest.test_with_pip triggers version check 
over network

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