[issue26456] import _tkinter + TestForkInThread leaves zombie with stalled thread

2016-03-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 613196986c09 by Martin Panter in branch '2.7':
Issue #26456: Force all child threads to terminate in TestForkInThread
https://hg.python.org/cpython/rev/613196986c09

--
nosy: +python-dev

___
Python tracker 

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



[issue26486] Backport some tests to 2.7

2016-03-07 Thread Martin Panter

Martin Panter added the comment:

I suspect this change is causing some buildbot failures (and failures on my 
computer). E.g. 
.

==
FAIL: test_int_pickling_efficiency (test.test_cpickle.cPickleTests)
--
Traceback (most recent call last):
  File "/media/disk/home/proj/python/cpython/Lib/test/pickletester.py", line 
1509, in test_int_pickling_efficiency
self.assertEqual(sorted(sizes), sizes)
AssertionError: Lists differ: [5, 5, 6, 6, 8, 8, 8, 14, 14, ... != [5, 5, 6, 6, 
8, 8, 8, 16, 18, ...

First differing element 7:
14
16

- [5, 5, 6, 6, 8, 8, 8, 14, 14, 16, 18, 19, 21, 22, 24]
+ [5, 5, 6, 6, 8, 8, 8, 16, 18, 19, 21, 22, 24, 14, 14]

--
nosy: +martin.panter
status: closed -> open

___
Python tracker 

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



[issue26492] Exhausted array iterator should left exhausted

2016-03-07 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Can you add just one patch to seq_test.py?

--

___
Python tracker 

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



[issue26039] More flexibility in zipfile interface

2016-03-07 Thread Martin Panter

Martin Panter added the comment:

Acquiring a lock in open(mode="w") and releasing it in close() doesn’t seem 
like a particularly useful feature to me. Maybe it would be better (and equally 
compatible?) to just use the lock in the internal write() or writestr() 
implementations.

--

___
Python tracker 

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



[issue26465] Upgrade OpenSSL shipped with python installers

2016-03-07 Thread Ned Deily

Changes by Ned Deily :


--
components: +Build
stage:  -> needs patch
versions:  -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



[issue26465] Upgrade OpenSSL shipped with python installers

2016-03-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bca936a0e829 by Ned Deily in branch '2.7':
Issue #26465: Update OS X installer build to use OpenSSL 1.0.2g.
https://hg.python.org/cpython/rev/bca936a0e829

New changeset 0628189fe42b by Ned Deily in branch '3.5':
Issue #26465: Update OS X installer build to use OpenSSL 1.0.2g.
https://hg.python.org/cpython/rev/0628189fe42b

New changeset 60430bdcb426 by Ned Deily in branch 'default':
Issue #26465: merge from 3.5
https://hg.python.org/cpython/rev/60430bdcb426

--
nosy: +python-dev

___
Python tracker 

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



[issue22110] enable extra compilation warnings

2016-03-07 Thread Ned Deily

Ned Deily added the comment:

See Issue #24324 which modifies configure to not use -Wunreachable-code with 
gcc for the reasons stated there and by Arfrever above.

--
nosy: +ned.deily

___
Python tracker 

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



[issue24324] Remove -Wunreachable-code flag

2016-03-07 Thread Ned Deily

Ned Deily added the comment:

Thanks for the suggested patches.  I used a somewhat different approach in an 
attempt to retain the benefit of the unreachable code warning when using other 
(non-GCC) compilers, in particular, llvm clang where the warnings do seem to be 
useful.

--
nosy: +ned.deily
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
versions: +Python 3.6 -Python 2.7

___
Python tracker 

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



[issue24324] Remove -Wunreachable-code flag

2016-03-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8fecf6e17616 by Ned Deily in branch 'default':
Issue #24324: merge from 3.5
https://hg.python.org/cpython/rev/8fecf6e17616

--

___
Python tracker 

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



[issue24324] Remove -Wunreachable-code flag

2016-03-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 61f8f7610a88 by Ned Deily in branch '3.5':
Issue #24324: Do not enable unreachable code warnings when using
https://hg.python.org/cpython/rev/61f8f7610a88

--
nosy: +python-dev

___
Python tracker 

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



[issue26478] dict views don't implement subtraction correctly

2016-03-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 309f3559a729 by Benjamin Peterson in branch '2.7':
properly use PyObject_CallMethod in dictview binary operations (closes #26478)
https://hg.python.org/cpython/rev/309f3559a729

--

___
Python tracker 

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



[issue26509] spurious ConnectionAbortedError logged on Windows

2016-03-07 Thread Sebastien Bourdeauducq

New submission from Sebastien Bourdeauducq:

https://github.com/python/asyncio/issues/319

On Windows, asyncio servers sometimes print such log messages when clients 
disconnect:

```
ERROR:master:asyncio:Fatal write error on pipe transport
protocol: 
transport: <_ProactorSocketTransport fd=756>
Traceback (most recent call last):
  File "C:\Users\User\Miniconda3\lib\asyncio\proactor_events.py", line 283, in 
_loop_writing
self._write_fut = self._loop._proactor.send(self._sock, data)
  File "C:\Users\User\Miniconda3\lib\asyncio\windows_events.py", line 450, in 
send
ov.WSASend(conn.fileno(), buf, flags)
ConnectionAbortedError: [WinError 10053] An established connection was aborted 
by the software on your host machine.
```

I guess that this line:
https://github.com/python/asyncio/blob/39c135baf73762830148236da622787052efba19/asyncio/proactor_events.py#L291

should be changed to also catch ``ConnectionAbortedError``, as this exception 
also happens when connections are closed on Windows, in addition to 
``ConnectionResetError``.

--
components: asyncio
messages: 261321
nosy: gvanrossum, haypo, sebastien.bourdeauducq, yselivanov
priority: normal
severity: normal
status: open
title: spurious ConnectionAbortedError logged on Windows
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



[issue26507] Use highest pickle protocol in multiprocessing

2016-03-07 Thread Davin Potts

Davin Potts added the comment:

As described in issue23403, it is possible for independent processes to 
communicate to one another through multiprocessing.  Thus changing the default 
triggers complications and is arguably much less interesting than having 
control over what protocol (or mechanism) is to be used for pickling.

--
nosy: +davin

___
Python tracker 

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



[issue26508] Infinite crash leading to DoS

2016-03-07 Thread pablo sacristan

New submission from pablo sacristan:

import ctypes, struct, sys, os
while 1:
os.system('python /Users/pabstersac/Desktop/Python\ Files/crash.py') 
#Change to your full path to the file
inner = ()
outer = (inner,)
c_outer = (ctypes.c_char * sys.getsizeof(outer)).from_address(id(outer))
inner_index = c_outer[:].find(struct.pack('P', id(inner)))
c_outer[inner_index:inner_index+struct.calcsize('P')] = struct.pack('P', 
id(outer))
print outer
#construct and print a self-referencing tuple
run it and wait around 10 sec for it to happen, but once it starts you will be 
forced to force it to shut because it will keep on crashing infinitely which is 
extremely annoying, and even while it says it crashed it still runs and keeps 
on running infinitely, which if you do on an unexpecting victim, they will 
probably shut down the computer directly.
There are basically two problems here, the way you construct and then print a 
self-referencing tuple, and the way you handle when it is put in an infinite 
loop with itself calling its own file (which if you wait long enough will see 
the effect goes quicker every second, it goes up exponentially) and you don't 
stop it correctly.

--
files: crash.py
messages: 261319
nosy: pabstersac
priority: normal
severity: normal
status: open
title: Infinite crash leading to DoS
type: security
Added file: http://bugs.python.org/file42088/crash.py

___
Python tracker 

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



[issue26507] Use highest pickle protocol in multiprocessing

2016-03-07 Thread Ed Behn

Changes by Ed Behn :


Added file: http://bugs.python.org/file42087/patch

___
Python tracker 

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



[issue26507] Use highest pickle protocol in multiprocessing

2016-03-07 Thread Ed Behn

New submission from Ed Behn:

Currently, the default pickle protocol is used to return worker results in a 
multiprocessing pool. The highest protocol should be used because backwards 
compatibility is not an issue.

--
components: Extension Modules
files: patch
messages: 261318
nosy: ebehn
priority: normal
severity: normal
status: open
title: Use highest pickle protocol in multiprocessing
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42086/patch

___
Python tracker 

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



[issue25667] Supply dual-stack (IPv4/IPv6) socket bind routine

2016-03-07 Thread Jason R. Coombs

Jason R. Coombs added the comment:

No reason not to put it in the socket module. I was thinking originally that 
the socket module was C only, but on further reflection, it could easily be one 
of the "additional facilities implemented in Python". Great suggestion.

--

___
Python tracker 

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



[issue26501] bytes splitlines() method returns strings without decoding

2016-03-07 Thread Paul Moore

Paul Moore added the comment:

That's weird. I can confirm it's working for me on 3.5.1. I'll double check I 
wan't in 2.7 when I'm back at my work PC, but I didn't *think* I was. But 
regardless, there's clearly no bug here.

Apologies for the confusion.

--

___
Python tracker 

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



[issue25667] Supply dual-stack (IPv4/IPv6) socket bind routine

2016-03-07 Thread Josh Lee

Changes by Josh Lee :


--
nosy: +jleedev

___
Python tracker 

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



[issue26271] freeze.py makefile uses the wrong flags variables

2016-03-07 Thread Alex Willmer

Changes by Alex Willmer :


--
nosy: +Alex.Willmer

___
Python tracker 

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



[issue26493] Bad formatting in WinError 193 when using subprocess.check_call

2016-03-07 Thread Eryk Sun

Eryk Sun added the comment:

It would be possible for subprocess to replace "%1" with the filename parsed 
from the command line and then re-raise the exception. That said, it's not as 
if this is a deficiency in the Windows implementation relative to subprocess on 
POSIX. For example, in 3.4 on Linux it raises a generic ENOEXEC error:

>>> os.access('./test.txt', os.X_OK)
True
>>> subprocess.call(['./test.txt'])
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.4/subprocess.py", line 537, in call
with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error

It could provide the filename, for example:

>>> raise OSError(errno.ENOEXEC, os.strerror(errno.ENOEXEC), './test.txt')
Traceback (most recent call last):
  File "", line 1, in 
OSError: [Errno 8] Exec format error: './test.txt'

A new issue should be raised to fix the FormatMessage calls in the standard 
library that mistakenly leave out FORMAT_MESSAGE_IGNORE_INSERTS.

--
type: behavior -> enhancement

___
Python tracker 

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



[issue26505] [PATCH] Spelling of ANY in the license of Modules/getaddrinfo.c

2016-03-07 Thread Ned Deily

Ned Deily added the comment:

Thanks for noticing and for the patch, Alex!

--
nosy: +ned.deily
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue11477] Incorrect operand precedence when implementing sequences in C

2016-03-07 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage: needs patch -> patch review
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue26505] [PATCH] Spelling of ANY in the license of Modules/getaddrinfo.c

2016-03-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c6b0204c23c5 by Ned Deily in branch '2.7':
Issue #26505: Fix typos in getaddrinfo license text.
https://hg.python.org/cpython/rev/c6b0204c23c5

New changeset a6b07ad3d14d by Ned Deily in branch '3.5':
Issue #26505: Fix typos in getaddrinfo license text.
https://hg.python.org/cpython/rev/a6b07ad3d14d

New changeset 0d77a17567a4 by Ned Deily in branch 'default':
Issue #26505: merge from 3.5
https://hg.python.org/cpython/rev/0d77a17567a4

--
nosy: +python-dev

___
Python tracker 

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



[issue26506] hex() documentation: mention "%x" % int

2016-03-07 Thread Eric V. Smith

Eric V. Smith added the comment:

For 3.5 and 2.7, I'd suggest:
format(value, 'x')
or:
format(value, 'X')

Although you might disagree because of the verbosity. But at least you're not 
parsing a string at runtime. 

And for 3.6 with PEP-498:
f'{value:x}'

There are of course options for padding and adding the '0x', as well.

--
nosy: +eric.smith

___
Python tracker 

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



[issue26501] bytes splitlines() method returns strings without decoding

2016-03-07 Thread Zachary Ware

Zachary Ware added the comment:

Paul, I think you were in a Python 2 session:

$ python
Python 2.7.10 (v2.7.10:15c95b7d81dc, May 23 2015, 09:33:12) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> u'a\nb£'.encode('utf-8').splitlines()
['a', 'b\xc2\xa3']
>>> ^D
$ python3
Python 3.5.1 (v3.5.1:37a07cee5969, Dec  5 2015, 21:12:44) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> u'a\nb£'.encode('utf-8').splitlines()
[b'a', b'b\xc2\xa3']
>>>

--
nosy: +zach.ware
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue22367] Please add F_OFD_SETLK, etc support to fcntl.lockf

2016-03-07 Thread Hristo Venev

Hristo Venev added the comment:

This implements the open_file_descriptor argument and fixes a bug with 
converting to int when off_t is 64-bit but long is 32-bit.

--
keywords: +patch
Added file: http://bugs.python.org/file42085/0001-fcntl-support-F_OFD_.patch

___
Python tracker 

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



[issue26499] http.client.IncompleteRead from HTTPResponse read after part reading file

2016-03-07 Thread SilentGhost

SilentGhost added the comment:

As far as I'm able to track it, it was a refactoring in issue 19009 that is 
responsible for this regression (rev 49017c391564). I'm adding Kristján, so 
that he'd have a look at the attached fix and test.

--
keywords: +3.5regression, patch
nosy: +SilentGhost, kristjan.jonsson, serhiy.storchaka
stage:  -> patch review
versions: +Python 3.6
Added file: http://bugs.python.org/file42084/issue26499.diff

___
Python tracker 

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



[issue26506] hex() documentation: mention "%x" % int

2016-03-07 Thread STINNER Victor

New submission from STINNER Victor:

I regulary see Python code using hex(value)[2:], whereas "%x" % value does the 
same thing. We should mention "%x" % value in the hex() doc. Maybe also mention 
"%#X" % value to format in upper case?

--
assignee: docs@python
components: Documentation
messages: 261308
nosy: docs@python, haypo
priority: normal
severity: normal
status: open
title: hex() documentation: mention "%x" % int
versions: Python 3.6

___
Python tracker 

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



[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-03-07 Thread Steven.Painter

Changes by Steven.Painter :


--
nosy: +smpeepers

___
Python tracker 

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



[issue18156] Add an 'attr' attribute to AttributeError

2016-03-07 Thread Xiang Zhang

Xiang Zhang added the comment:

I'd like to ping this channel.

I post a question on 
https://groups.google.com/forum/#!topic/comp.lang.python/y8yDAAJJ9Sc to ask if 
it is possible to directly get the attribute from AttributeError, which leads 
me here.

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue26498] _io.so flat namespace

2016-03-07 Thread Ned Deily

Ned Deily added the comment:

An even more likely scenario: the Python executable you are using is coming 
from an older virtualenv.  If so, you need to update the virtualenv to include 
an up-to-date python executable.

--

___
Python tracker 

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



[issue26498] _io.so flat namespace

2016-03-07 Thread Ned Deily

Ned Deily added the comment:

Sorry, I am unable to reproduce the problem.  My guess is that somehow there is 
a version mismatch between the Python executable and the dynamic libraries.  
This *could* be caused by a number of things, like environment variable 
settings.  Suggest trying to isolate the problem by checking the following in a 
bash shell:

$ type python
python is hashed (/usr/local/bin/python)
$ which python
/usr/local/bin/python
$ ls -l $(which python)
lrwxr-xr-x  1 root  wheel  68 Jan  2 23:08 /usr/local/bin/python -> 
../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python
$ python -c 'import sys;print(sys.version)'
2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 12:54:16)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
$ /usr/local/bin/python2.7 -c 'import urllib2'
$ env | sort
# look for LD_* and DYLD_* variables
$ python -v -c 'import urllib2'

--
nosy: +ned.deily

___
Python tracker 

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



[issue24852] Python 3.5.0rc1 "HOWTO Use Python in the web" needs fix

2016-03-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b8ee8f79a024 by Berker Peksag in branch '3.5':
Issue #24852: Remove outdated "HOWTO Use Python in the web" document
https://hg.python.org/cpython/rev/b8ee8f79a024

New changeset ee1d44f7d3e7 by Berker Peksag in branch 'default':
Issue #24852: Remove outdated "HOWTO Use Python in the web" document
https://hg.python.org/cpython/rev/ee1d44f7d3e7

--
nosy: +python-dev

___
Python tracker 

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



[issue24852] Python 3.5.0rc1 "HOWTO Use Python in the web" needs fix

2016-03-07 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> fixed
stage: needs patch -> 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



[issue21034] Python docs reference the Distribute package which has been deprecated in favor of Setuptools

2016-03-07 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report, Jurko.

> +1 from me for just removing the bootstrapping instructions from this note.

Thanks, Nick.

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



[issue21034] Python docs reference the Distribute package which has been deprecated in favor of Setuptools

2016-03-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 50f593ed1469 by Berker Peksag in branch '3.5':
Issue #21034: Remove outdated paragraph from venv documentation
https://hg.python.org/cpython/rev/50f593ed1469

New changeset ac95719f1803 by Berker Peksag in branch 'default':
Issue #21034: Remove outdated paragraph from venv documentation
https://hg.python.org/cpython/rev/ac95719f1803

--
nosy: +python-dev

___
Python tracker 

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



[issue26505] [PATCH] Spelling of ANY in the license of Modules/getaddrinfo.c

2016-03-07 Thread Alex Willmer

New submission from Alex Willmer:

The license of Modules/getaddrinfo.c misspells ANY as GAI_ANY. I'm assuming a 
sed invocation was the cause. The same file later uses GAI_ANY as a wildcard 
for socket type, protocol and port.

It looks like this mistake was present when the code was first committed.

--
files: getaddrinfo-license-ANY.patch
keywords: patch
messages: 261301
nosy: Alex.Willmer
priority: normal
severity: normal
status: open
title: [PATCH] Spelling of ANY in the license of Modules/getaddrinfo.c
Added file: http://bugs.python.org/file42083/getaddrinfo-license-ANY.patch

___
Python tracker 

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



[issue26504] tclErr: invalid command name "PyAggImagePhoto"

2016-03-07 Thread Roger Mosher

New submission from Roger Mosher:

when trying to show a FigureCanvasTkAgg the program crashes.  Debugging 
eventually leads me to TkAgg.blit method where we find the following line:
tk.call(
"PyAggImagePhoto", photoimage,
id(data), colormode, id(bbox_array))

which generates a TclError, namely that "PyAggImagePhoto" is an invalid 
command.  I am using tkinter 8.6

Full details at: 
http://stackoverflow.com/questions/35829961/using-matplotlib-with-tkinter-tkagg

--
components: Tkinter
messages: 261300
nosy: r mosher
priority: normal
severity: normal
status: open
title: tclErr: invalid command name "PyAggImagePhoto"
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



[issue22367] Please add F_OFD_SETLK, etc support to fcntl.lockf

2016-03-07 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue26501] bytes splitlines() method returns strings without decoding

2016-03-07 Thread Wolfgang Maier

Wolfgang Maier added the comment:

oh and documentation is here:
https://docs.python.org/3.5/library/stdtypes.html?highlight=bytes.splitlines#bytes.splitlines

--

___
Python tracker 

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



[issue26501] bytes splitlines() method returns strings without decoding

2016-03-07 Thread Wolfgang Maier

Wolfgang Maier added the comment:

works for me too on Windows:

Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:38:48) [MSC v.1900 32 bit 
(Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> u'a\nb£'.encode('utf-8').splitlines()
[b'a', b'b\xc2\xa3']

--
nosy: +wolma

___
Python tracker 

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



[issue26503] argparse with required field , not having new line separator in -help dispaly

2016-03-07 Thread Mohankumar

New submission from Mohankumar:

We are using Python argsparse library here to display below --help message .
In --help option , new line option not handled correctly , Especially in 
"mandatory parameters" (required=True) better to place a new line before for 
better readability , Since it not having any separators like list brackets in 
"Non Mandatory parameters".

For example In below help , there must be a new line before "--protocol" and " 
--action" for better readability


Neutron firewall-rule-create [-h]
[-f 
{html,json,json,shell,table,value,yaml,yaml}]
[-c COLUMN] [--max-width ]
[--noindent] [--prefix PREFIX]
[--request-format {json,xml}]
[--tenant-id TENANT_ID] [--name NAME]
[--description DESCRIPTION] [--shared]
[--source-ip-address SOURCE_IP_ADDRESS]
[--destination-ip-address 
DESTINATION_IP_ADDRESS]
[--source-port SOURCE_PORT]
[--destination-port DESTINATION_PORT]
[--enabled {True,False}] --protocol
{tcp,udp,icmp,any} --action
{allow,deny,reject}

--
components: Library (Lib)
messages: 261297
nosy: mohankumar
priority: normal
severity: normal
status: open
title: argparse with required field , not having new line separator in -help 
dispaly
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



[issue26502] traceback.extract_tb breaks compatibility by returning FrameSummary

2016-03-07 Thread Petr Viktorin

New submission from Petr Viktorin:

According to the docs [0], traceback.extract_tb should return 4-tuples 
(filename, line number, function name, text).

[0] https://docs.python.org/3/library/traceback.html#traceback.extract_tb

Instead, since Python 3.5, it returns FrameSummary objects, which are not 
tuples, nor tuple subclasses, nor even sequences. (This broke some code in the 
wild that called len() on FrameSummary.)

Issue 25111 pointed out another tuple incompatibility, which was fixed. Should 
__len__ be added as well? Or the whole Sequence ABC?

I can provide a patch when those questions are answered.

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 261296
nosy: docs@python, encukou
priority: normal
severity: normal
status: open
title: traceback.extract_tb breaks compatibility by returning FrameSummary
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue22367] Please add F_OFD_SETLK, etc support to fcntl.lockf

2016-03-07 Thread Hristo Venev

Hristo Venev added the comment:

I'd like to use fd locks from python too.

--
nosy: +h.venev

___
Python tracker 

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



[issue15948] Unchecked return value of I/O functions

2016-03-07 Thread Марк Коренберг

Марк Коренберг added the comment:

In a common case,

if (write(thread.fd, thread.header, thread.header_len) == -1)

should be replaced with

if (write(thread.fd, thread.header, thread.header_len) != thread.header_len)

--
nosy: +mmarkk

___
Python tracker 

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



[issue26501] bytes splitlines() method returns strings without decoding

2016-03-07 Thread Марк Коренберг

Марк Коренберг added the comment:

$ python3.5
Python 3.5.0+ (default, Oct 11 2015, 09:05:38) 
[GCC 5.2.1 20151010] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> u'a\nb£'.encode('utf-8').splitlines()
[b'a', b'b\xc2\xa3']

--

___
Python tracker 

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



[issue26501] bytes splitlines() method returns strings without decoding

2016-03-07 Thread Марк Коренберг

Марк Коренберг added the comment:

No, I have checked, it returns list of `bytes` objects.

--
nosy: +mmarkk

___
Python tracker 

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



[issue26500] Document of star operator missing. It must be documented for better understanding.

2016-03-07 Thread Martin Panter

Martin Panter added the comment:

Previous report: Issue 19024.

--
nosy: +martin.panter

___
Python tracker 

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



[issue7370] BaseHTTPServer reinventing rfc822 date formatting

2016-03-07 Thread Berker Peksag

Berker Peksag added the comment:

There is an up-to-date patch for Python 3 in issue 747320. Closing this as a 
duplicate.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage: test needed -> resolved
status: open -> closed
superseder:  -> rfc2822 formatdate functionality duplication
type: behavior -> enhancement

___
Python tracker 

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



[issue26501] bytes splitlines() method returns strings without decoding

2016-03-07 Thread Paul Moore

New submission from Paul Moore:

See the following test (in Python 3.5):

>>> u'a\nb£'.encode('utf-8').splitlines()
['a', 'b\xc2\xa3']

I encode a string in UTF-8, then use the (bytes) splitlines function on it. The 
return value is a list of strings, containing encoded byte values.

The bytes object isn't even documented as having a splitlines method - and if 
it does, then it should be returning a list of bytes objects.

--
components: Interpreter Core
messages: 261289
nosy: paul.moore
priority: normal
severity: normal
status: open
title: bytes splitlines() method returns strings without decoding
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue26500] Document of star operator missing. It must be documented for better understanding.

2016-03-07 Thread Jaivish Kothari

New submission from Jaivish Kothari:

Star operator in python for unpacking could be documented for better 
understanding.

--
assignee: docs@python
components: Documentation
messages: 261288
nosy: docs@python, janonymous
priority: normal
severity: normal
status: open
title: Document of star operator missing. It must be documented for better 
understanding.
versions: Python 2.7, 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



[issue26499] http.client.IncompleteRead from HTTPResponse read after part reading file

2016-03-07 Thread Peter

New submission from Peter:

This is a regression in Python 3.5 tested under Linux and Mac OS X, spotted 
from a failing test in Biopython 
https://github.com/biopython/biopython/issues/773 where we would parse a file 
from the internet. The trigger is partially reading the network handle line by 
line (e.g. until an end record marker is found), and then calling handle.read() 
to fetch any remaining data. Self contained examples below.

Note that partially reading a file like this still works:


$ python3.5
Python 3.5.0 (default, Sep 14 2015, 12:13:24) 
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> from urllib.request import urlopen
>>> handle = urlopen("http://www.python.org";)
>>> chunk = handle.read(50)
>>> rest = handle.read()
>>> handle.close()


However, the following variants read a few lines and then attempt to call 
handle.read() and fail. The URL is not important (as long as it has over four 
lines in these examples).

Using readline,


>>> from urllib.request import urlopen
>>> handle = urlopen("http://www.python.org";)
>>> for i in range(4):
... line = handle.readline()
... 
>>> rest = handle.read()
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/xxx/lib/python3.5/http/client.py", line 446, in read
s = self._safe_read(self.length)
  File "/Users/xxx/lib/python3.5/http/client.py", line 594, in _safe_read
raise IncompleteRead(b''.join(s), amt)
http.client.IncompleteRead: IncompleteRead(46698 bytes read, 259 more expected)


Using line iteration via next,


>>> from urllib.request import urlopen
>>> handle = urlopen("http://www.python.org";)
>>> for i in range(4):
...  line = next(handle)
... 
>>> rest = handle.read()
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/xxx/lib/python3.5/http/client.py", line 446, in read
s = self._safe_read(self.length)
  File "/Users/xxx/lib/python3.5/http/client.py", line 594, in _safe_read
raise IncompleteRead(b''.join(s), amt)
http.client.IncompleteRead: IncompleteRead(46698 bytes read, 259 more expected)


Using line iteration directly,


>>> from urllib.request import urlopen
>>> count = 0
>>> handle = urlopen("http://www.python.org";)
>>> for line in handle:
... count += 1
... if count == 4:
... break
... 
>>> rest = handle.read()
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/xxx/lib/python3.5/http/client.py", line 446, in read
s = self._safe_read(self.length)
  File "/Users/xxx/lib/python3.5/http/client.py", line 594, in _safe_read
raise IncompleteRead(b''.join(s), amt)
http.client.IncompleteRead: IncompleteRead(46698 bytes read, 259 more expected)



These examples all worked on Python 3.3 and 3.4 so this is a regression.

--
components: Library (Lib)
messages: 261287
nosy: maubp
priority: normal
severity: normal
status: open
title: http.client.IncompleteRead from HTTPResponse read after part reading file
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



[issue21034] Python docs reference the Distribute package which has been deprecated in favor of Setuptools

2016-03-07 Thread Nick Coghlan

Nick Coghlan added the comment:

+1 from me for just removing the bootstrapping instructions from this note.

(The original reference to Distribute has already been replaced with a 
reference to Setuptools at some point since Jurko filed this issue)

--

___
Python tracker 

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



[issue17394] Add slicing support to collections.deque

2016-03-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The output now is a deque.

--
Added file: http://bugs.python.org/file42082/deque_slices_3.patch

___
Python tracker 

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