[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion

Xavion added the comment:

Okay, I've modified the title to match what I've written below.

I've just run some further tests on this problem.  The attached archive 
contains code samples and the output generated (both with and without garbage 
collection).

As you can see, the memory stays constant in the first case.  In the second, 
the presence of the loop is probably what throws a spanner in the works.  
Garbage collection seems to make the outcome slightly worse (in the second 
case).

The situation isn't as bad as I first reported, but the memory does nonetheless 
keep increasing in the second case (which it probably shouldn't).

--
title: The 'subprocess' module leaks roughly 4 KiB of memory per call -> The 
'subprocess' module leaks memory when called in certain ways
Added file: http://bugs.python.org/file44708/Memory-Leak-Test.zip

___
Python tracker 

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



[issue28186] Autogenerated tabs / trailing whitespace

2016-09-17 Thread Francisco Couzo

Changes by Francisco Couzo :


Added file: http://bugs.python.org/file44709/autogenerated_whitespace2.patch

___
Python tracker 

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



[issue28145] Fix whitespace in C source code

2016-09-17 Thread Francisco Couzo

Francisco Couzo added the comment:

I'm closing this issue since I've created new issues for each case, please 
refer to #28184, #28185, and #28186.

--
status: open -> closed

___
Python tracker 

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



[issue28186] Autogenerated tabs / trailing whitespace

2016-09-17 Thread Francisco Couzo

Changes by Francisco Couzo :


Removed file: http://bugs.python.org/file44707/autogenerated_whitespace.patch

___
Python tracker 

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



[issue27761] Private _nth_root function loses accuracy

2016-09-17 Thread Martin Panter

Changes by Martin Panter :


--
nosy:  -martin.panter

___
Python tracker 

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



[issue28139] Misleading Indentation in C source code

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a2bfec367cef by Martin Panter in branch '2.7':
Issue #28139: Fix messed up indentation
https://hg.python.org/cpython/rev/a2bfec367cef

New changeset 0e2a891639dd by Martin Panter in branch '3.5':
Issue #28139: Fix messed up indentation
https://hg.python.org/cpython/rev/0e2a891639dd

New changeset 1e052a70a70a by Martin Panter in branch '3.6':
Issue #28139: Merge indentation fixes from 3.5 into 3.6
https://hg.python.org/cpython/rev/1e052a70a70a

New changeset c49084a28969 by Martin Panter in branch 'default':
Issue #28139: Merge indentation fixes from 3.6
https://hg.python.org/cpython/rev/c49084a28969

--

___
Python tracker 

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



[issue28187] Check return value of _PyBytes_Resize

2016-09-17 Thread Berker Peksag

New submission from Berker Peksag:

There are a couple of instances that don't check return value of 
_PyBytes_Resize in Modules/. I noticed this while working on issue 25270.

Patch attached.

--
components: Extension Modules
files: pybytes_resize.diff
keywords: patch
messages: 276778
nosy: berker.peksag, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Check return value of _PyBytes_Resize
type: behavior
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file44710/pybytes_resize.diff

___
Python tracker 

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



[issue28187] Check return value of _PyBytes_Resize

2016-09-17 Thread Martin Panter

Martin Panter added the comment:

Can the resize fail if the buffer is only being strunk? I haven’t looked 
closely, but maybe that’s why some of the cases don’t check for failure.

--
nosy: +martin.panter

___
Python tracker 

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



[issue28187] Check return value of _PyBytes_Resize

2016-09-17 Thread Christian Heimes

Christian Heimes added the comment:

Yes, it can fail for multiple reasons: wrong type, ref count != 1, realloc() 
fails to allocate a smaller area.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue28187] Check return value of _PyBytes_Resize

2016-09-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please regenerate the patch for Rietveld Berker?

_PyBytes_Resize(&res, r) always sets res to NULL if fails. Thus the following 
code is correct. No need to check the return value.

if (n > r)
_PyBytes_Resize(&res, r);
return res;

--

___
Python tracker 

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



[issue28187] Check return value of _PyBytes_Resize

2016-09-17 Thread Berker Peksag

Changes by Berker Peksag :


Added file: http://bugs.python.org/file44711/pybytes_resize_regenerated.diff

___
Python tracker 

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



[issue28176] Fix callbacks race in asyncio.SelectorLoop.sock_connect

2016-09-17 Thread Berker Peksag

Berker Peksag added the comment:

Would increasing timeout to 10.0 be sufficient? Should we wrap the test with 
@support.reap_threads?

--
nosy: +berker.peksag
status: pending -> open
versions: +Python 3.5, Python 3.7

___
Python tracker 

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



[issue26149] Suggest PyCharm Community as an editor for Unix platforms

2016-09-17 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch. I left some comment on Rietveld: 
http://bugs.python.org/review/26149/#ps18589

--
stage: needs patch -> patch review
versions: +Python 3.7

___
Python tracker 

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



[issue28187] Check return value of _PyBytes_Resize

2016-09-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In all cases _PyBytes_Resize is followed by return. Original code is correct. 
In either way NULL is returned if _PyBytes_Resize fails.

--

___
Python tracker 

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



[issue28128] Improve the warning message for invalid escape sequences

2016-09-17 Thread Nick Coghlan

Nick Coghlan added the comment:

Eric's basic approach sounds fine to me.

The "pre-compiled .pyc files won't trigger SyntaxWarning" problem isn't new, as 
it exists for the old 3.5 warnings as well (-B prevents writing bytecode, which 
may be handy while working on this. Unfortunately, there's no equivalent to 
prevent reading it except deleting the offending bytecode file):

  $ python3 -B -c "import syntax_warning" 
  /home/ncoghlan/devel/py36/syntax_warning.py:3: SyntaxWarning: name 'x' is 
assigned to before global declaration
global x
  $ python3 -c "import syntax_warning" 
  /home/ncoghlan/devel/py36/syntax_warning.py:3: SyntaxWarning: name 'x' is 
assigned to before global declaration
global x
  $ python3 -c "import syntax_warning" 
  $ rm __pycache__/syntax_warning.cpython-35.pyc 
  $ python3 -B -c "import syntax_warning" 
  /home/ncoghlan/devel/py36/syntax_warning.py:3: SyntaxWarning: name 'x' is 
assigned to before global declaration
global x

As long as folks are running their tests at least once in fresh environments 
they'll see the warning.

--

___
Python tracker 

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



[issue28179] Segfault in test_recursionlimit_fatalerror

2016-09-17 Thread Xiang Zhang

Xiang Zhang added the comment:

This snippet also crashes in Py3.5

--
nosy: +larry, xiang.zhang
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



[issue28179] Segfault in test_recursionlimit_fatalerror

2016-09-17 Thread Berker Peksag

Berker Peksag added the comment:

What do you mean by crash? I think the purpose of the test is to crash the 
interpreter:

def test_recursionlimit_fatalerror(self):
# A fatal error occurs if a second recursion limit is hit when 
recovering
# from a first one.

...

self.assertIn(
b"Fatal Python error: Cannot recover from stack overflow",
err)

test_sys passes for me in Python 3.5, but not in Python 3.6:

==
FAIL: test_recursionlimit_fatalerror (test.test_sys.SysModuleTest)
--
Traceback (most recent call last):
  File "/home/berker/projects/cpython/default/Lib/test/test_sys.py", line 281, 
in test_recursionlimit_fatalerror
err)
AssertionError: b'Fatal Python error: Cannot recover from stack overflow' not 
found in b''

--

Running the snippet from msg276686 in Python 3.6:

$ ./python -V
Python 3.6.0b1+

$ ./python a.py  
Segmentation fault (core dumped)

In Python 3.5:

$ ./python -V
Python 3.5.2+

$ ./python a.py 
Fatal Python error: Cannot recover from stack overflow.

Current thread 0x7f5965eaf700 (most recent call first):
  File "a.py", line 5 in f
  File "a.py", line 5 in f
  File "a.py", line 5 in f
[...]

--

___
Python tracker 

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



[issue28187] Check return value of _PyBytes_Resize

2016-09-17 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the review, Serhiy! Good point, closing this as 'not a bug'.

--
resolution:  -> not a bug
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



[issue28183] Clean up and speed up dict iteration

2016-09-17 Thread Xiang Zhang

Xiang Zhang added the comment:

Serhiy, I don't understand your patch. You delete the logic about split table 
and then iterating split table actually fails.

>>> class C:
... pass
... 
>>> a, b = C(), C()
>>> a.a, a.b = 1, 2
>>> list(b.__dict__)
['a', 'b']
>>> 

Without attributes now b also get entries when iterating.

--

___
Python tracker 

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



[issue23749] asyncio missing wrap_socket (starttls)

2016-09-17 Thread Alex Grönholm

Alex Grönholm added the comment:

So is this going to make it into 3.6...?

--
nosy: +Alex Grönholm

___
Python tracker 

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



[issue28075] os.stat fails when access is denied

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eabb86463462 by Berker Peksag in branch '3.5':
Issue #28075: Check for ERROR_ACCESS_DENIED in Windows implementation of 
os.stat()
https://hg.python.org/cpython/rev/eabb86463462

New changeset 4071a7cf6437 by Berker Peksag in branch '3.6':
Issue #28075: Merge from 3.5
https://hg.python.org/cpython/rev/4071a7cf6437

New changeset b04d5864e59a by Berker Peksag in branch 'default':
Issue #28075: Merge from 3.6
https://hg.python.org/cpython/rev/b04d5864e59a

--
nosy: +python-dev

___
Python tracker 

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



[issue28075] os.stat fails when access is denied

2016-09-17 Thread Berker Peksag

Berker Peksag added the comment:

Thanks, Eryk.

--
nosy: +berker.peksag
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7

___
Python tracker 

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



[issue21516] pathlib.Path(...).is_dir() crashes on some directories (Windows)

2016-09-17 Thread Berker Peksag

Berker Peksag added the comment:

This is resolved by issue 28075.

--
nosy: +berker.peksag
resolution:  -> out of date
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



[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread R. David Murray

R. David Murray added the comment:

Could you post files instead of a zip, please?  It will be easier to review.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue28139] Misleading Indentation in C source code

2016-09-17 Thread Martin Panter

Changes by Martin Panter :


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



[issue27973] urllib.urlretrieve() fails on second ftp transfer

2016-09-17 Thread Sohaib Ahmad

Changes by Sohaib Ahmad :


Removed file: http://bugs.python.org/file44692/urllib.patch

___
Python tracker 

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



[issue27973] urllib.urlretrieve() fails on second ftp transfer

2016-09-17 Thread Sohaib Ahmad

Sohaib Ahmad added the comment:

I finally found the actual problem causing the failure of second download. 
urlretrieve() works with FTP in PASV mode, and in PASV mode after sending the 
file to client, the FTP server sends an ACK that the file has been transferred. 
After the fix of issue1067702 socket was being closed without receiving this 
ACK.

Now, when a user tries to download the same file or another file from same 
directory, the key (host, port, dirs) remains the same so open_ftp() skips ftp 
initialization. Because of this skipping, previous FTP connection is reused and 
when new commands are sent to the server, server first sends the previous ACK. 
This causes a domino effect and each response gets delayed by one and we get an 
exception from parse227().

Expected response:
*cmd* 'RETR Contents-udeb-ppc64el.gz'
*resp* '150 Opening BINARY mode data connection for 
Contents-udeb-ppc64el.gz (26555 bytes).'
*resp* '226 Transfer complete.'

*cmd* 'TYPE I'
*resp* '200 Switching to Binary mode.'
*cmd* 'PASV'
*resp* '227 Entering Passive Mode (130,239,18,173,137,59).'

Actual response:
*cmd* 'RETR Contents-udeb-ppc64el.gz'
*resp* '150 Opening BINARY mode data connection for 
Contents-udeb-ppc64el.gz (26555 bytes).'

*cmd* 'TYPE I'
*resp* '226 Transfer complete.'
*cmd* 'PASV'
*resp* '200 Switching to Binary mode.'

I am attaching a new patch (urllib.patch) which fixes this problem by clearing 
the FTP server responses first if an existing connection is being used to 
download a file. Please review and let me know if it looks good.

--
Added file: http://bugs.python.org/file44712/urllib.patch

___
Python tracker 

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



[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-09-17 Thread Xiang Zhang

Xiang Zhang added the comment:

Victor, v3 now applies your suggestion.

--
Added file: http://bugs.python.org/file44713/issue28123_v3.patch

___
Python tracker 

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



[issue28188] os.putenv should support bytes arguments on Windows

2016-09-17 Thread Eryk Sun

New submission from Eryk Sun:

This suggestion may be controversial: os.putenv should decode bytes arguments 
as UTF-8, the new Windows filesystem encoding. Moreover, os.environb should 
also be implemented. This would be consistent with bytes support in os.spawnve 
and os.execve.

The controversial aspect, I think, is that this doesn't allow using arbitrary 
encodings for environment-variable names and values. The statement in the docs 
that os.environb allows one "to use a different encoding" than the filesystem 
encoding would have to be modified with a caveat that on wide-character 
platforms, such as Windows, using the filesystem encoding is mandatory.

--
messages: 276797
nosy: eryksun
priority: normal
severity: normal
stage: needs patch
status: open
title: os.putenv should support bytes arguments on Windows
type: enhancement
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue28188] os.putenv should support bytes arguments on Windows

2016-09-17 Thread Eryk Sun

Changes by Eryk Sun :


--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file44714/issue_28188_01.patch

___
Python tracker 

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



[issue26149] Suggest PyCharm Community as an editor for Unix platforms

2016-09-17 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks for the feedback, Berker :)
I added some introductory statements, and added link to 
https://wiki.python.org/moin/IntegratedDevelopmentEnvironments

I'll be open to other suggestions as well

Thanks.

--
Added file: http://bugs.python.org/file44715/docupdate3.patch

___
Python tracker 

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



[issue26149] Suggest PyCharm Community as an editor for Unix platforms

2016-09-17 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Forgot to change the title to Editors and IDEs.
Updated now.

Thanks.

--
Added file: http://bugs.python.org/file44716/docupdate4.patch

___
Python tracker 

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



[issue28178] allow to cache_clear(some_key) in lru_cache

2016-09-17 Thread Nick Coghlan

Nick Coghlan added the comment:

I'm wary of adding too much complexity to the standard cache API, especially 
when it's something that isn't found in 
http://boltons.readthedocs.io/en/latest/cacheutils.html either.

I do think it could be a good idea to provide some "See Also" links to 
alternate caching libraries for folks that are looking for features that 
standard implementation doesn't provide.

--

___
Python tracker 

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



[issue28189] dictitems_contains swallows compare errors

2016-09-17 Thread Xiang Zhang

New submission from Xiang Zhang:

Now, when compare errors raised during `in`, dict.keys(), dict.values() and set 
all propagate the errors. But dict.items() will swallow the errors(only key 
compare):

>>> class BadEq:
... def __hash__(self):
... return 7
... def __eq__(self, other):
... raise RuntimeError
... 
>>> k1, k2, v1, v2 = BadEq(), BadEq(), BadEq(), BadEq()
>>> d = {k1: v1}
>>> k2 in d.keys()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 5, in __eq__
RuntimeError
>>> v2 in d.values()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 5, in __eq__
RuntimeError
>>> k2 in {k1}
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 5, in __eq__
RuntimeError
>>> (k2, v2) in d.items()
False
>>> (k2, v1) in d.items()
False

dictitems_contains.patch tries to fix this.

--
components: Interpreter Core
files: dictitems_contains.patch
keywords: patch
messages: 276801
nosy: haypo, serhiy.storchaka, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: dictitems_contains swallows compare errors
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file44717/dictitems_contains.patch

___
Python tracker 

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



[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-09-17 Thread Jim Fulton

Jim Fulton added the comment:

Yes, that change addresses this issue. Thanks!

Will this be backported?

--
resolution:  -> fixed

___
Python tracker 

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



[issue27222] redundant checks and a weird use of goto statements in long_rshift

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 21b70c835b5b by Mark Dickinson in branch 'default':
Issue #27222: various cleanups in long_rshift. Thanks Oren Milman.
https://hg.python.org/cpython/rev/21b70c835b5b

--
nosy: +python-dev

___
Python tracker 

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



[issue27222] redundant checks and a weird use of goto statements in long_rshift

2016-09-17 Thread Mark Dickinson

Mark Dickinson added the comment:

Thanks for the patch and the thorough analysis!

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



[issue28178] allow to cache_clear(some_key) in lru_cache

2016-09-17 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue28178] allow to cache_clear(some_key) in lru_cache

2016-09-17 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I concur with Nick that the API needs to be relatively simple.

The availability of a fast ordered dictionary now makes it very easy for people 
to roll their own customizations.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue28190] Cross-build _curses failed if host ncurses headers and target ncurses headers have different layouts

2016-09-17 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

In changeset 919259054621 (from issue12567) and 707761d59a4a (from issue15268), 
/usr/include/ncursesw was added to include paths in setup.py and configure.ac. 
This is wrong and breaks cross-compiling. For example, if   host has 
/usr/include/ncursesw/ncurses.h and target has $SYSROOT/include/ncurses.h, the 
build fails. An example can be found in [1].

My patch removes all references to /usr/include/ncursesw and uses a robust 
detection, which is suitable for both native builds and cross builds.

Added the authors of aforementioned changesets.

[1] https://s3.amazonaws.com/archive.travis-ci.org/jobs/159936249/log.txt

--
components: Build, Cross-Build
files: ncurses.patch
keywords: patch
messages: 276806
nosy: Alex.Willmer, Chi Hsuan Yen, doko, haypo
priority: normal
severity: normal
status: open
title: Cross-build _curses failed if host ncurses headers and target ncurses 
headers have different layouts
type: compile error
versions: Python 3.7
Added file: http://bugs.python.org/file44718/ncurses.patch

___
Python tracker 

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



[issue28190] Cross-build _curses failed if host ncurses headers and target ncurses headers have different layouts

2016-09-17 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Hmmm, I don't know why Rietveld failed to recognize changes in configure. Maybe 
it's because I've modified the patch file manually?

--

___
Python tracker 

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




[issue28179] Segfault in test_recursionlimit_fatalerror

2016-09-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I also got the same result on 3.5 as 3.6.

--

___
Python tracker 

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



[issue28179] Segfault in test_recursionlimit_fatalerror

2016-09-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

And the test passes on Windows on both versions.

--

___
Python tracker 

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



[issue28191] Support RFC4985 SRVName in SAN name

2016-09-17 Thread Christian Heimes

New submission from Christian Heimes:

The standard subject alternative DNS name contains only a relationship between 
a cert and a host name. A host may have multiple services like HTTPS web 
server, IMAP server, mail servers etc. https://tools.ietf.org/html/rfc4985 
defines a mechanism to define a relationship between a X.509 cert, a DNS name 
and a service, e.g. _https.www.example.org for service https on www.example.org.

OpenSSL is not yet able to convert a RFC4985 SRVName to a string. I have a 
patch, https://github.com/tiran/cpython/commits/feature/ssl_srvname

--
assignee: christian.heimes
components: SSL
messages: 276810
nosy: christian.heimes
priority: normal
severity: normal
stage: patch review
status: open
title: Support RFC4985 SRVName in SAN name
type: security
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue28183] Clean up and speed up dict iteration

2016-09-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good catch Xiang Zhang! I missed this point. Here is fixed patch.

$ ./python -m perf timeit -s "d = dict.fromkeys(range(10**6))" -- "list(d)"
Python 3.5:Median +- std dev: 33.8 ms +- 0.7 ms
Python 3.6 unpatched:  Median +- std dev: 37.8 ms +- 0.5 ms
Python 3.6 patched:Median +- std dev: 34.0 ms +- 0.6 ms

$ ./python -m perf timeit -s "d = dict.fromkeys(range(10**6)); v = d.values()" 
-- "list(v)"
Python 3.5:Median +- std dev: 26.2 ms +- 0.7 ms
Python 3.6 unpatched:  Median +- std dev: 28.0 ms +- 0.6 ms
Python 3.6 patched:Median +- std dev: 26.1 ms +- 0.8 ms

$ ./python -m perf timeit -s "d = dict.fromkeys(range(10**6)); v = d.items()" 
-- "list(v)"
Python 3.5:Median +- std dev: 232 ms +- 6 ms
Python 3.6 unpatched:  Median +- std dev: 259 ms +- 6 ms
Python 3.6 patched:Median +- std dev: 249 ms +- 6 ms

$ ./python -m perf timeit -s "d = dict.fromkeys(range(10**6))" -- "set(d)"
Python 3.5:Median +- std dev: 68.3 ms +- 1.8 ms
Python 3.6 unpatched:  Median +- std dev: 68.1 ms +- 2.5 ms
Python 3.6 patched:Median +- std dev: 63.7 ms +- 1.5 ms

$ ./python -m perf timeit -s "from _testcapi import test_dict_iteration as t" 
-- "t()"
Python 3.5:Median +- std dev: 3.31 ms +- 0.10 ms
Python 3.6 unpatched:  Median +- std dev: 3.51 ms +- 0.09 ms
Python 3.6 patched:Median +- std dev: 3.43 ms +- 0.05 ms

--
Added file: http://bugs.python.org/file44719/dict_iter2.patch

___
Python tracker 

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



[issue28178] allow to cache_clear(some_key) in lru_cache

2016-09-17 Thread Raymond Hettinger

Raymond Hettinger added the comment:

FYI, here is a starting point for rolling your own variants.  The OrderedDict 
makes this effortless.  http://pastebin.com/LDwMwtp8

--

___
Python tracker 

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



[issue24780] difflib.ndiff produces unreadable output when input missing trailing newline

2016-09-17 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +loewis, tim.peters

___
Python tracker 

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



[issue27441] redundant assignments to ob_size of new ints that _PyLong_New returned

2016-09-17 Thread Mark Dickinson

Mark Dickinson added the comment:

> Am I missing anything that might cause my patches to introduce a performance 
> penalty?

It's at least conceivable that code like

   Py_SIZE(v) = negative ? -ndigits : ndigits;

might be compiled to something branchless on some platforms (with some sets of 
compiler flags). The assembly you show demonstrates that that doesn't happen on 
your machine, but that doesn't say anything about other current or future 
machines.

I also prefer the original form for readability; so I agree with Serhiy that we 
shouldn't change it without evidence that the change improves performance.

I'll remove the two obviously redundant `Py_SIZE(v) = ...` operations in 
PyLong_FromUnsignedLong and PyLong_FromUnsignedLongLong.

--
assignee:  -> mark.dickinson

___
Python tracker 

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



[issue27441] redundant assignments to ob_size of new ints that _PyLong_New returned

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 27a6ecf84f72 by Mark Dickinson in branch 'default':
Issue #27441: Remove some redundant assignments to ob_size in longobject.c. 
Thanks Oren Milman.
https://hg.python.org/cpython/rev/27a6ecf84f72

--
nosy: +python-dev

___
Python tracker 

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



[issue27441] redundant assignments to ob_size of new ints that _PyLong_New returned

2016-09-17 Thread Mark Dickinson

Mark Dickinson added the comment:

Changes to PyLong_FromUnsignedLong and PyLong_FromUnsignedLongLong applied. 
I've left the others; for the small int initialisation, that code isn't 
performance critical anyway, and I'm not entirely comfortable with assuming 
that PyObject_INIT_VAR will always handle negative sizes correctly. (The 
(ab)use of the sign bit of the ob_size field is something that's particular to 
the int type.)

--

___
Python tracker 

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



[issue27441] redundant assignments to ob_size of new ints that _PyLong_New returned

2016-09-17 Thread Mark Dickinson

Changes by Mark Dickinson :


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



[issue28192] Don't import readline in isolated mode

2016-09-17 Thread Steve Dower

New submission from Steve Dower:

When running in isolated mode, readline should not be automatically imported 
(as it could conceivably be arbitrary code).

--
assignee: steve.dower
messages: 276816
nosy: steve.dower
priority: normal
severity: normal
stage: needs patch
status: open
title: Don't import readline in isolated mode
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue27111] redundant variables in long_add and long_sub

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0e585bce0bb1 by Mark Dickinson in branch 'default':
Issue #27111: Minor simplication to long_add and long_sub fast path code. 
Thanks Oren Milman.
https://hg.python.org/cpython/rev/0e585bce0bb1

--
nosy: +python-dev

___
Python tracker 

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



[issue27111] redundant variables in long_add and long_sub

2016-09-17 Thread Mark Dickinson

Mark Dickinson added the comment:

Applied; thanks. (I left the braces in, following PEP 7 ("braces are strongly 
preferred").

--
nosy: +mark.dickinson
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



[issue27111] redundant variables in long_add and long_sub

2016-09-17 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee:  -> mark.dickinson

___
Python tracker 

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



[issue5309] distutils doesn't parallelize extension module compilation

2016-09-17 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

I have 2 complaints about this:

1 - doc is missing: the only way to be aware of this is either by reading the 
3.6 what's new doc or by checking the cmdline helper

2 - -j "N" parameter could be optional: if not specified os.cpu_count() can be 
used.

--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue28192] Don't import readline in isolated mode

2016-09-17 Thread Steve Dower

Steve Dower added the comment:

Should also allow users to explicitly call site.enablerlcompleter() if they 
really want it.

--

___
Python tracker 

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



[issue28183] Clean up and speed up dict iteration

2016-09-17 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Also consider adding __length_hint__ to the various mapping views.  That would 
help with a common case of listing the view.

--

___
Python tracker 

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



[issue26384] UnboundLocalError in socket._sendfile_use_sendfile

2016-09-17 Thread Berker Peksag

Berker Peksag added the comment:

Thanks, Serhiy. Here's an updated patch.

--
versions: +Python 3.7
Added file: http://bugs.python.org/file44720/issue26384_v2.diff

___
Python tracker 

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



[issue28183] Clean up and speed up dict iteration

2016-09-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Dict iterators already have __length_hint__. Dict views have __len__.

--

___
Python tracker 

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



[issue28192] Don't import readline in isolated mode

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b0350f351752 by Steve Dower in branch '3.6':
Issue #28192: Don't import readline in isolated mode
https://hg.python.org/cpython/rev/b0350f351752

--
nosy: +python-dev

___
Python tracker 

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



[issue28138] Windows _sys.path file should allow import site

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7b47c98f24da by Steve Dower in branch '3.6':
Issue #28137: Renames Windows path file to ._pth
https://hg.python.org/cpython/rev/7b47c98f24da

--
nosy: +python-dev

___
Python tracker 

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



[issue28137] Windows sys.path file should be renamed

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7b47c98f24da by Steve Dower in branch '3.6':
Issue #28137: Renames Windows path file to ._pth
https://hg.python.org/cpython/rev/7b47c98f24da

--
nosy: +python-dev

___
Python tracker 

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



[issue28138] Windows _sys.path file should allow import site

2016-09-17 Thread Steve Dower

Changes by Steve Dower :


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



[issue28137] Windows sys.path file should be renamed

2016-09-17 Thread Steve Dower

Steve Dower added the comment:

Decided to go with "DLLNAME._pth" or "EXENAME._pth", since using ".pth" with 
"import site" causes files to be reevaluated.

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



[issue26384] UnboundLocalError in socket._sendfile_use_sendfile

2016-09-17 Thread Berker Peksag

Changes by Berker Peksag :


Added file: http://bugs.python.org/file44721/issue26384_v3.diff

___
Python tracker 

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



[issue26384] UnboundLocalError in socket._sendfile_use_sendfile

2016-09-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--

___
Python tracker 

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



[issue28192] Don't import readline in isolated mode

2016-09-17 Thread Christian Heimes

Christian Heimes added the comment:

+1, but your patch is missing Misc/NEWS and a merge to 'default'. The code in 
Modules/main.c is getting harder to read, too.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue28192] Don't import readline in isolated mode

2016-09-17 Thread Christian Heimes

Changes by Christian Heimes :


--
components: +Interpreter Core
type: behavior -> security

___
Python tracker 

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



[issue28183] Clean up and speed up dict iteration

2016-09-17 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Yes, I missed seeing that.

--

___
Python tracker 

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



[issue28192] Don't import readline in isolated mode

2016-09-17 Thread Steve Dower

Steve Dower added the comment:

The NEWS change slipped into my following commit, and I just did the one merge.

Since you're here, any ideas on how to test this? Adding a readline.py during 
the test suite will affect any tests running in parallel...

--

___
Python tracker 

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



[issue28192] Don't import readline in isolated mode

2016-09-17 Thread Steve Dower

Steve Dower added the comment:

Also, I think PEP 432 is the way to go about simplifying Py_Main, and I'm keen 
to see it happen (presumably for 3.7). But the time constraints make it hard, 
which is why Nick hasn't gotten it done yet either.

--

___
Python tracker 

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



[issue28192] Don't import readline in isolated mode

2016-09-17 Thread Christian Heimes

Christian Heimes added the comment:

The robot didn't mention your merge because the tracker id was not in the 
submit messages. I just saw it on python-cvs.

How about a test in subprocess? You could drop a readline.py into 
Lib/tests/somedirectory and run sys.executable with 
cwd='Lib/tests/somedirectory').

--

___
Python tracker 

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



[issue28193] Consider using lru_cache for the re.py caches

2016-09-17 Thread Raymond Hettinger

New submission from Raymond Hettinger:

The last time we applied the LRU cache to the re.py module, the overhead of the 
pure python version resulted in a net performance decrease.  But now we have a 
highly performance C version and should consider reinstating the code.

--
assignee: serhiy.storchaka
components: Library (Lib)
messages: 276832
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Consider using lru_cache for the re.py caches
type: performance
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue24416] Return a namedtuple from date.isocalendar()

2016-09-17 Thread Raymond Hettinger

Raymond Hettinger added the comment:

+1 This looks like a reasonable and useful API improvement.

--
nosy: +rhettinger

___
Python tracker 

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



[issue10109] itertools.product with infinite iterator cause MemoryError.

2016-09-17 Thread Robert Xiao

Robert Xiao added the comment:

I think this _is_ a bug. Most of the itertools are quite thrifty with memory, 
and exceptions are explicitly documented.

The itertools generally only require memory proportional to the number of 
iterations consumed. However, `itertools.product` requires an enormous up-front 
memory cost even if only a few iterations are performed. There are good reasons 
to extract only a few iterations from a `product` - for example, a search 
procedure where only the first item in the product is infinite:

for year, day in product(count(2010), range(365)):
if rare_event(year, day):
break

Or, in an application I recently tried, to count occurrences of something up to 
a limit:

prod = product(count(), range(n))
filtered = ifilter(pred, prod)
want = list(islice(filtered, 101))
if len(want) > 100:
print "Too many matches"

Having `product` greedily consume all of its input iterators is rather 
antithetical to the notion of itertools being lazy generators, and it breaks 
efficient composability with the other itertools.

The fix should be fairly straightforward: like tee, maintain lists of items 
already generated as the input iterators are exhausted, and add a note that 
"product"'s memory usage may slowly grow over time (as opposed to growing to 
maximum size immediately).

--
nosy: +nneonneo

___
Python tracker 

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



[issue26384] UnboundLocalError in socket._sendfile_use_sendfile

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 78efbf499611 by Berker Peksag in branch '3.5':
Issue #26384: Fix UnboundLocalError in socket._sendfile_use_sendfile
https://hg.python.org/cpython/rev/78efbf499611

New changeset 2156aa4050c7 by Berker Peksag in branch '3.6':
Issue #26384: Merge from 3.5
https://hg.python.org/cpython/rev/2156aa4050c7

New changeset 0d440fda8604 by Berker Peksag in branch 'default':
Issue #26384: Merge from 3.6
https://hg.python.org/cpython/rev/0d440fda8604

--
nosy: +python-dev

___
Python tracker 

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



[issue28193] Consider using lru_cache for the re.py caches

2016-09-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Since that time the logic of re._compile() was changed. Now it can't just be 
wrapped with lru_cache().

--

___
Python tracker 

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



[issue26384] UnboundLocalError in socket._sendfile_use_sendfile

2016-09-17 Thread Berker Peksag

Changes by Berker Peksag :


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



[issue28164] _PyIO_get_console_type fails for various paths

2016-09-17 Thread Steve Dower

Steve Dower added the comment:

I'll make it case insensitive, but unfortunately I can't find a good way to 
check that a handle is actually a real console handle or what type it is. Plus 
the way iomodule is designed we'd need to open it twice, which I'd rather not 
do.

--
assignee:  -> steve.dower

___
Python tracker 

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



[issue28163] WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle

2016-09-17 Thread Steve Dower

Steve Dower added the comment:

I'll pass the "correct" flags, since the docs don't specify that they aren't 
used, which means one day they might become relevant.

--
assignee:  -> steve.dower

___
Python tracker 

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



[issue28162] WindowsConsoleIO readall() fails if first line starts with Ctrl+Z

2016-09-17 Thread Steve Dower

Steve Dower added the comment:

Unfortunately, very hard to test this because it requires interacting with an 
actual console. But it's an easy fix.

--
assignee:  -> steve.dower
stage: test needed -> needs patch

___
Python tracker 

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



[issue16293] curses.ungetch raises OverflowError when given -1

2016-09-17 Thread Berker Peksag

Berker Peksag added the comment:

This looks like a bug in ncurses 5.7 and a duplicate of issue 15037.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> curses.unget_wch and test_curses fail when linked with ncurses 
5.7 and earlier
type:  -> behavior

___
Python tracker 

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



[issue10109] itertools.product with infinite iterator cause MemoryError.

2016-09-17 Thread Tim Peters

Tim Peters added the comment:

I see nothing wrong with combinatorial generators materializing their inputs 
before generation.  Perhaps it should be documented clearly.  It's certainly 
not limited to `product()`.  For example,

>>> for i in itertools.combinations(itertools.count(), 2):
... print(i)

dies with MemoryError too.  But I expected that ;-)

--
nosy: +tim.peters

___
Python tracker 

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



[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion

Changes by Xavion :


Removed file: http://bugs.python.org/file44708/Memory-Leak-Test.zip

___
Python tracker 

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



[issue28163] WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d0bab9fda568 by Steve Dower in branch '3.6':
Issue #28161: Opening CON for write access fails
https://hg.python.org/cpython/rev/d0bab9fda568

New changeset 187a114b9ef4 by Steve Dower in branch 'default':
Issue #28161: Opening CON for write access fails
https://hg.python.org/cpython/rev/187a114b9ef4

--
nosy: +python-dev

___
Python tracker 

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



[issue28161] Opening CON for write access fails

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d0bab9fda568 by Steve Dower in branch '3.6':
Issue #28161: Opening CON for write access fails
https://hg.python.org/cpython/rev/d0bab9fda568

New changeset 187a114b9ef4 by Steve Dower in branch 'default':
Issue #28161: Opening CON for write access fails
https://hg.python.org/cpython/rev/187a114b9ef4

--
nosy: +python-dev

___
Python tracker 

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



[issue28162] WindowsConsoleIO readall() fails if first line starts with Ctrl+Z

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d0bab9fda568 by Steve Dower in branch '3.6':
Issue #28161: Opening CON for write access fails
https://hg.python.org/cpython/rev/d0bab9fda568

New changeset 187a114b9ef4 by Steve Dower in branch 'default':
Issue #28161: Opening CON for write access fails
https://hg.python.org/cpython/rev/187a114b9ef4

--
nosy: +python-dev

___
Python tracker 

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



[issue28164] _PyIO_get_console_type fails for various paths

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d0bab9fda568 by Steve Dower in branch '3.6':
Issue #28161: Opening CON for write access fails
https://hg.python.org/cpython/rev/d0bab9fda568

New changeset 187a114b9ef4 by Steve Dower in branch 'default':
Issue #28161: Opening CON for write access fails
https://hg.python.org/cpython/rev/187a114b9ef4

--
nosy: +python-dev

___
Python tracker 

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



[issue28161] Opening CON for write access fails

2016-09-17 Thread Steve Dower

Changes by Steve Dower :


--
resolution:  -> fixed
stage: test needed -> 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



[issue28163] WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle

2016-09-17 Thread Steve Dower

Changes by Steve Dower :


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



[issue28164] _PyIO_get_console_type fails for various paths

2016-09-17 Thread Steve Dower

Changes by Steve Dower :


--
resolution:  -> fixed
stage: test needed -> 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



[issue28162] WindowsConsoleIO readall() fails if first line starts with Ctrl+Z

2016-09-17 Thread Steve Dower

Steve Dower added the comment:

The fix here was changing "n > 0 && buf[len] == '\x1a'" into "n == 0 || 
buf[len] == '\x1a'" when returning an empty bytes. Previously we were falling 
into the conversion code which wasn't happy with n == 0.

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



[issue28191] Support RFC4985 SRVName in SAN name

2016-09-17 Thread Christian Heimes

Changes by Christian Heimes :


--
keywords: +patch
Added file: http://bugs.python.org/file44722/Add-RFC4985-SRVName-to-SAN.patch

___
Python tracker 

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



[issue27354] SSLContext.load_verify_locations cannot handle paths on Windows which cannot be encoded using mbcs

2016-09-17 Thread Steve Dower

Steve Dower added the comment:

I haven't tracked it down in 1.1, but in 1.0.2 OpenSSL handles ASCII, UTF-8 and 
mbcs/ANSI paths explicitly: 
https://github.com/openssl/openssl/blob/OpenSSL_1_0_2-stable/crypto/bio/bss_file.c#L138

So for 3.6 and later, if we're encoding the paths with fsencode(), it'll be 
fine, but we could also use utf-8 unconditionally.

Doing a search of the codebase though, there's only the one place that does 
this and everywhere else just uses fopen() without attempting to decode. I 
don't think we're exposing many of those publicly though.

--

___
Python tracker 

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



[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion

Xavion added the comment:

I put them into an archive so that the folder hierarchy would be preserved.  
Doing it that way makes it faster for you guys to run the tests at your end.

Nonetheless, I will post the seven (7) files individually as well.  It doesn't 
look like I can upload more than one at a time, so get ready for a few emails!

--
Added file: http://bugs.python.org/file44723/Memory-Leak-Test.zip

___
Python tracker 

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



[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion

Changes by Xavion :


Added file: http://bugs.python.org/file44725/Test-1.py

___
Python tracker 

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



[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion

Changes by Xavion :


Added file: http://bugs.python.org/file44724/Test.sh

___
Python tracker 

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



[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion

Changes by Xavion :


Added file: http://bugs.python.org/file44728/Test-1-gc.log

___
Python tracker 

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



[issue28165] The 'subprocess' module leaks memory when called in certain ways

2016-09-17 Thread Xavion

Changes by Xavion :


Added file: http://bugs.python.org/file44727/Test-1-no-gc.log

___
Python tracker 

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



  1   2   >