[issue15721] PEP 3121, 384 Refactoring applied to tkinter module

2015-11-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This change causes a crash when create instances of _tkinter classes 
(issue23815). If this will not be fixed I suggest to revert the patch.

--

___
Python tracker 

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



[issue23815] Segmentation fault when create _tkinter objects

2015-11-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Before issue15721 the tp_new was NULL, and this prevented from creating 
instances. After issue15721 the tp_new is inherited from object. An instance is 
created, but all internal pointers are NULLs. Following repr() dereferences 
NULL.

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



[issue1794] Hot keys must work in any keyboard layout

2015-11-15 Thread irdb

Changes by irdb :


--
nosy: +irdb

___
Python tracker 

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



[issue25594] enum instance attribute access possible

2015-11-15 Thread Ethan Furman

Changes by Ethan Furman :


Added file: http://bugs.python.org/file41048/issue25594.stoneleaf.03.patch

___
Python tracker 

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



[issue20220] test_datetime, test_tarfile, test_strptime time zone failures

2015-11-15 Thread Martin Panter

Martin Panter added the comment:

I discovered a way to trigger the test_strptime failure. In 3.6, if I rename 
the CacheTests class to ZCacheTests in in test_strptime.py, it seems to stop it 
running before the StrptimeTests class. Then you can trigger the failure it 
with:

./python -m test -u all -v test_{urllibnet,imaplib,strptime}

1. test_urllibnet loads the _strptime module and initializes the cache with the 
normal timezone info
2. test_imaplib temporarily sets TZ=STD-1DST, triggering the glibc bug
3. test_strptime tries parsing "STD" using the original time zone settings and 
fails

You have to stop CacheTests running before step 3, because it resets the 
_strptime cache.

Anyway, I am now fairly confident my patch will avoid the test_strptime failure 
as well, so I think it is worthwhile committing it. But I guess a bug should be 
reported to the glibc people too.

--

___
Python tracker 

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



[issue25615] Document unsorted behaviour of glob.glob

2015-11-15 Thread Dave Jones

Dave Jones added the comment:

Sounds good; the patch seems to apply cleanly to checkouts of 2.7, 3.4, and 3.5 
so I'm assuming I don't need to do anything else?

--

___
Python tracker 

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



[issue25626] Gzip fails for file over 2**32 bytes

2015-11-15 Thread Martin Panter

Martin Panter added the comment:

Thanks for the report. Can you confirm if this demo illustrates your problem? 
For me, I only have 2 GiB of memory so I get a MemoryError, which seems 
reasonable for my situation.

from gzip import GzipFile
from io import BytesIO
file = BytesIO()
writer = GzipFile(fileobj=file, mode="wb")
writer.write(b"data")
writer.close()
file.seek(0)
reader = GzipFile(fileobj=file, mode="rb")
data = reader.read(2**32)  # Ideally this should return b"data"

Assuming that triggers the OverflowError, then the heart of the problem is that 
the zlib.decompressobj.decompress() method does not accept such large numbers 
for the length limit:

>>> import zlib
>>> decompressor = zlib.decompressobj(wbits=16 + 15)
>>> decompressor.decompress(file.getvalue(), 2**32)
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: Python int too large for C unsigned int

I think the ideal fix would be to cap the limit at 2**32 - 1 in the zlib 
library. Would this be okay for a 3.5.1 bug fix release, or would it be 
considered a feature change?

Failing that, another option would be to cap the limit in the gzip library, and 
just document the zlib limitation. I already have a patch in Issue 23200 
documenting another quirk when max_length=0.

The same problem may also apply to the LZMA and bzip2 modules; I need to check.

--
keywords: +3.5regression
nosy: +martin.panter
type: crash -> behavior

___
Python tracker 

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



[issue25594] enum instance attribute access possible

2015-11-15 Thread SilentGhost

SilentGhost added the comment:

No further comments re the latest patch.

--

___
Python tracker 

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



[issue25626] Gzip fails for file over 2**32 bytes

2015-11-15 Thread Ben Cipollini

Ben Cipollini added the comment:

@Martin: yes, that reproduces the problem.

>I think the ideal fix would be to cap the limit at 2**32 - 1 in the zlib 
>library.

If this cap is implemented, is there any workaround how we can efficiently open 
gzipped files over 4GB? Such files exist, exist in high-priority, 
government-funded datasets, and neuroinformatics in Python requires a way to 
open them efficiently.

>another option would be to cap the limit in the gzip library

Again, these limitations are new in Python 3.5 and currently block us from 
using Python 3.5 to run neuroinformatics efficiently. Is there any chance to 
revert this new behavior, or any known memory-efficient workaround?

--

___
Python tracker 

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



[issue25251] Unknown MS Compiler version 1900

2015-11-15 Thread Ateik Al-Zehla

Ateik Al-Zehla added the comment:

how to apply patch file : patch.diff ? plz help

--
nosy: +Ateik Al-Zehla

___
Python tracker 

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



[issue25615] Document unsorted behaviour of glob.glob

2015-11-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

+1 for the doc update.

For future reference, the doc patches are much easier to review if you don't 
rewrap the text (we can easily do that part before applying the patch).

--
nosy: +rhettinger

___
Python tracker 

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



[issue25628] Make namedtuple "verbose" and "renanme" parameters into keyword only arguments

2015-11-15 Thread Raymond Hettinger

New submission from Raymond Hettinger:

This is a usability and readability improvement made possible by Python 3's 
keyword only arguments.

Usability is improved by getting a much less confusing response from the 
following mistake:

namedtuple('Point', 'x', 'y')
  ^--- invisibly goes to the "verbose" argument 

The "verbose" argument is normally used interactively (much like help() and 
dis()) or is used with a keyword argument, so it is unlikely that existing 
scripts will be much affected.  For the rare cases, the remediation is simple 
and improves code clarity (replacing "True" with "verbose=True").

--
components: Library (Lib)
files: namedtuple_keywords.diff
keywords: patch
messages: 254689
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Make namedtuple "verbose" and "renanme" parameters into keyword only 
arguments
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41049/namedtuple_keywords.diff

___
Python tracker 

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



[issue25615] Document unsorted behaviour of glob.glob

2015-11-15 Thread Dave Jones

Dave Jones added the comment:

Ah, sorry about that - force of habit. I did wonder if it was preferable to 
have a nicely wrapped patch, or to have a clean diff but obviously figured 
wrong! I'll know for future :)

--

___
Python tracker 

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



[issue25628] Make namedtuple "verbose" and "rename" parameters into keyword only arguments

2015-11-15 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
title: Make namedtuple "verbose" and "renanme" parameters into keyword only 
arguments -> Make namedtuple "verbose" and "rename" parameters into keyword 
only arguments

___
Python tracker 

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



[issue25627] distutils : file "bdist_rpm.py" allows Shell injection in "name"

2015-11-15 Thread R. David Murray

R. David Murray added the comment:

Since setup.py can run arbitrary python code, it is pointless to worry about 
this from a security perspective.  The change is otherwise not a bad idea, 
though, since it avoids filename quoting problems.  Is there any chance this 
would break existing setup.py files that do their own quoting of the filenames 
to get around the quoting problem?  I'm guessing not since the filename gets 
used in multiple contexts, and the other contexts probably require an unquoted 
filename. Which would make this a simple bug fix against bdist_rpm.

However, why not convert to using Popen?

--
nosy: +r.david.murray
type: security -> behavior
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



[issue25627] distutils : file "bdist_rpm.py" does not quote filenames when executing the rpm command

2015-11-15 Thread R. David Murray

Changes by R. David Murray :


--
title: distutils : file "bdist_rpm.py" allows Shell injection in "name" -> 
distutils : file "bdist_rpm.py" does not quote filenames when executing the rpm 
command

___
Python tracker 

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



[issue25629] Move set fill/used updates out of set_insert_clean()

2015-11-15 Thread Raymond Hettinger

New submission from Raymond Hettinger:

Will need to update the comment block over set_insert_clean() as well.

--
components: Interpreter Core
files: set_faster_resize2.diff
keywords: patch
messages: 254692
nosy: rhettinger
priority: normal
severity: normal
stage: patch review
status: open
title: Move set fill/used updates out of set_insert_clean()
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41050/set_faster_resize2.diff

___
Python tracker 

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



[issue25628] Make namedtuple "verbose" and "rename" parameters into keyword only arguments

2015-11-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I like the idea. But this is backward incompatible change. I would first add a 
warning.

Here is a patch. Yes, the code looks a little cumbersome, but this is only for 
one or two releases.

--
nosy: +serhiy.storchaka
stage:  -> patch review
Added file: http://bugs.python.org/file41051/namedtuple_keywords_deprecate.patch

___
Python tracker 

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



[issue16394] Reducing tee() memory footprint

2015-11-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Unlike the other "equivalents" in the docs, this one is further away from the 
actual implementation.  So, I think I should add a clarification that the 
example code is a "rough logical equivalent" but that actual implementation may 
have shared queues (Jython, PyPy, and IronPython are free to have their own 
implementation choices).

--
priority: normal -> low

___
Python tracker 

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



[issue25609] Add a ContextManager ABC and type

2015-11-15 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

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



[issue21134] Segfault when stringifying UnicodeEncodeError (or UnicodeDecodeError) created with __new__()

2015-11-15 Thread STINNER Victor

STINNER Victor added the comment:

> Do you have a patch Victor?

Nope.

--

___
Python tracker 

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



[issue25609] Add a ContextManager ABC and type

2015-11-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

-0 on this one.  This is slightly more useful than the other "one-trick-ponies" 
like Container, Hashable, and Iterable.  Those each provide some "recognition" 
capabilities using isinstance() but don't provide any useful "mixin" 
capabilities.  

In practice, I'm not seeing the "recognition" capabilities being used (i.e. no 
one is using "if isinstance(obj, Container)" in real code).  So adding another 
one-trick pony that won't get used is a bit of a waste.  

Also, this would add more clutter to the collections ABCs, obscuring the ones 
that actually have added value (i.e. MutableMapping has been a great success).  
The collections.abc module has become a dumping ground for ABCs that that don't 
really have anything to do with collections and aren't useful for day-to-day 
development (Awaitable, Coroutine, AsyncIterable, AsyncIterator, etc).

One idea is to have a separate module of generic recognition abcs that would be 
used in much the same way as the old types module.  Otherwise, the 
collections.abc module will continue unabated growth away from its original 
purpose as a small group of powerful mixin classes (Sequence, MutableSequence, 
Set, MutableSet, Mapping, MutableMapping, and the dict views).

--

___
Python tracker 

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



[issue25616] Extract OrderedDict tests into separate file

2015-11-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

If it helps with all the great work you're doing, go ahead and move the OD 
tests out to a separate file.

--

___
Python tracker 

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



[issue25611] test_deque failure on Gentoo and OpenIndiana buildbots on 2.7

2015-11-15 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



[issue25623] Keep the link to Python implementation of OrderedDict

2015-11-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I think we should stick with fixing bugs as found (even if that process spills 
into 3.5.2).  The current tests do a good job of making sure the basic 
functionality is in place and there has been use in the field.  Also, you've 
already done a good job fixing a few of the most egregious bugs.

Likewise should have an aversion to temporary APIs like _collections and to API 
changes between micro releases.  In general, this strategy is likely to cause 
more pain than it alleviates.  So, put me down for -1 on this one.

--

___
Python tracker 

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



[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2015-11-15 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> michael.foord

___
Python tracker 

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



[issue23564] Patch fixing sanity check for ordered fd sequence in _posixsubprocess.c

2015-11-15 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Hisham, could you sign the Python contributor agreement? 
https://www.python.org/psf/contrib/contrib-form/

thanks!

--

___
Python tracker 

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



[issue17131] subprocess.Popen.terminate can raise exception on Posix

2015-11-15 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
resolution:  -> duplicate
status: open -> closed
superseder:  -> subprocess.Popen.send_signal doesn't check whether the process 
has terminated

___
Python tracker 

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



[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2015-11-15 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith

___
Python tracker 

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



[issue25630] SIGSEGV in os.putenv()

2015-11-15 Thread Paweł Krawczyk

New submission from Paweł Krawczyk:

A numerical value argument of the os.putenv() call causes my python3.5 to crash 
with SIGSEGV, for example:

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.
>>> import os
>>> os.putenv('AAA', 1)
Segmentation fault (core dumped)

While numerical 1 (one) is not a valid argument for the function which expects 
a string as value, it shouldn't crash but rather throw an exception. This seems 
to be the behaviour in python3.4:

Python 3.4.3 (default, Oct 14 2015, 20:28:29) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.putenv('AAA', 1)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: Can't convert 'int' object to str implicitly
>>>

I can provide a strace/ltrace/core dump but it's huge and I'm not sure if it's 
necessary taking into account that this issue is trivial to reproduce.

--
components: Library (Lib)
messages: 254700
nosy: Paweł Krawczyk
priority: normal
severity: normal
status: open
title: SIGSEGV in os.putenv()
type: crash
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



[issue23564] Patch fixing sanity check for ordered fd sequence in _posixsubprocess.c

2015-11-15 Thread Martin Panter

Martin Panter added the comment:

FWIW I think this patch is trivial enough not to need an agreement.

--
nosy: +martin.panter

___
Python tracker 

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



[issue25623] Keep the link to Python implementation of OrderedDict

2015-11-15 Thread Emanuel Barry

Emanuel Barry added the comment:

I would personally suggest a more permanent and accessible way, in the way the 
decimal module handles it. I'd add a '_pycollections' module holding the pure 
Python implementations of OrderedDict and _count_elements, then have the 
collections package import them if the C accelerators don't work.

While the '_pydecimal' module is not guaranteed to remain across versions, 
successfully importing it means that you are guaranteed to use the pure Python 
version of it. In the same direction, successfully importing OrderedDict from 
_pycollections would guarantee that you're using the pure Python version of it.

This would have the side-effect of allowing people relying on the pure Python 
implementation details to use them (see #25315).

--
nosy: +ebarry

___
Python tracker 

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



[issue25631] Segmentation fault with invalid Unicode command-line arguments in embedded Python

2015-11-15 Thread Itai Bar-Natan

New submission from Itai Bar-Natan:

The following embedded application, which calls Py_Main with a "-W X" argument 
where X is not a valid Unicode string, returns a segmentation fault:

```
#include "Python.h"

main() {
wchar_t *invalid_str;
invalid_str = malloc(2*sizeof(wchar_t));
invalid_str[0] = 0x11;
invalid_str[1] = 0;
wchar_t *argv[4] = {L"embedded-python", L"-W", invalid_str, NULL};

Py_Main(3, argv);
}
```

This segmentation fault is present in Python 3.4, 3.5, and the latest 
development branch I downloaded, but is not present in Python 3.2. This program 
is obviously invalid and it may be reasonable to emit a fatal error in this 
situation, but it should not give a segmentation fault.

I believe the issue is that this codes leads to exception being thrown before 
exceptions are initialized, and more specifically, a call to 
PyExceptionClass_Check() within PyErr_Object() reads a NULL pointer. I haven't 
tested this but I expect that this problem would not appear when calling Python 
directly since Python sanitizes the command line arguments from main(). 
Nonetheless even here the possibility of other exceptions being raised early in 
the initialization sequence remains a potential problem.

--
components: Interpreter Core
messages: 254703
nosy: itaibn
priority: normal
severity: normal
status: open
title: Segmentation fault with invalid Unicode command-line arguments in 
embedded Python
type: crash
versions: Python 3.4, 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



[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2015-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6bd3c8623bb2 by Gregory P. Smith in branch '3.4':
Fix issue #6973: When we know a subprocess.Popen process has died, do
https://hg.python.org/cpython/rev/6bd3c8623bb2

New changeset bc907c76f054 by Gregory P. Smith in branch '3.5':
Fix issue #6973: When we know a subprocess.Popen process has died, do
https://hg.python.org/cpython/rev/bc907c76f054

New changeset e51c46d12ec1 by Gregory P. Smith in branch 'default':
Fix issue #6973: When we know a subprocess.Popen process has died, do
https://hg.python.org/cpython/rev/e51c46d12ec1

--
nosy: +python-dev

___
Python tracker 

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



[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2015-11-15 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I chose to go with the "there should not be an error" approach similar to how 
Python deals with multiple file closes.  Both are technically programming 
errors but the point of Python is make life easier.

Reasoning?  I don't want someone to ever think they could depend on getting an 
exception from send_signal/terminate/kill in this "process has already died and 
someone has called wait or poll to get its return code" situation as that is 
unreliable and potentially impacts other innocent processes.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue23883] __all__ lists are incomplete

2015-11-15 Thread Mauro S. M. Rodrigues

Mauro S. M. Rodrigues added the comment:

New version.

--
Added file: http://bugs.python.org/file41052/issue23883_fileinput.v2.patch

___
Python tracker 

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



[issue25623] Keep the link to Python implementation of OrderedDict

2015-11-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> This would have the side-effect of allowing people relying
> on the pure Python implementation details to use them

Right.  That's why we don't want to do this.

--

___
Python tracker 

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



[issue19081] zipimport behaves badly when the zip file changes while the process is running

2015-11-15 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I'm unassigning as i won't be figuring out how to hackishly fix this again.  
The best solution is a complete rewrite of zipimport.

this remains a known issue: if you use zipimport, do not allow the zip file to 
change out from underneath your running process or you will have "fun".

--
assignee: gregory.p.smith -> 
priority: high -> normal

___
Python tracker 

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



[issue23564] Patch fixing sanity check for ordered fd sequence in _posixsubprocess.c

2015-11-15 Thread Gregory P. Smith

Gregory P. Smith added the comment:

heh, you're right.  it's a trivial obvious fix for the mistake in the existing 
implementation.  writing a test and committing.

the other option would be to get rid of the sanity check entirely or change it 
not to use the odd "require a sorted list" code.  but i like the sanity check 
and refactoring it to not require a sorted list within this code path would be 
complicated.

--

___
Python tracker 

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



[issue23564] Patch fixing sanity check for ordered fd sequence in _posixsubprocess.c

2015-11-15 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I didn't bother adding the fix to 3.4, it isn't high value.

--
resolution:  -> fixed
status: open -> closed
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



[issue23564] Patch fixing sanity check for ordered fd sequence in _posixsubprocess.c

2015-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 55f7a99a5433 by Gregory P. Smith in branch '3.5':
Fixes #23564: Fix a partially broken sanity check in the _posixsubprocess
https://hg.python.org/cpython/rev/55f7a99a5433

New changeset 97e2a6810f7f by Gregory P. Smith in branch 'default':
Fixes #23564: Fix a partially broken sanity check in the _posixsubprocess
https://hg.python.org/cpython/rev/97e2a6810f7f

--
nosy: +python-dev

___
Python tracker 

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



[issue25628] Make namedtuple "verbose" and "rename" parameters into keyword only arguments

2015-11-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I don't think a warning is necessary because of what "verbose" does.

--

___
Python tracker 

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



[issue25611] test_deque failure on Gentoo and OpenIndiana buildbots on 2.7

2015-11-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I believe this was fixed by changesets a2a518b6ded4 and d920b09d22ce . The 
buildbots show green for the latest build.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue25630] SIGSEGV in os.putenv()

2015-11-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3ae62099d70b by Benjamin Peterson in branch '3.5':
make the PyUnicode_FSConverter cleanup set the decrefed argument to NULL 
(closes #25630)
https://hg.python.org/cpython/rev/3ae62099d70b

New changeset d8d67b502bcc by Benjamin Peterson in branch 'default':
merge 3.5 (#25630)
https://hg.python.org/cpython/rev/d8d67b502bcc

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> 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



[issue25632] Document BUILD_*_UNPACK opcodes

2015-11-15 Thread Antony Lee

New submission from Antony Lee:

The additional unpack generalizations provided by Python3.5 rely on a new set 
of opcodes, BUILD_{TUPLE,LIST,DICT,SET}_UNPACK, that are not documented in the 
docs for the dis module.

--
assignee: docs@python
components: Documentation
messages: 254715
nosy: Antony.Lee, docs@python
priority: normal
severity: normal
status: open
title: Document BUILD_*_UNPACK opcodes
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



[issue25628] Make namedtuple "verbose" and "rename" parameters into keyword only arguments

2015-11-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Existing scripts can contain passing positional 'rename' argument: 
namedtuple('Point', 'x y', False, True).

--

___
Python tracker 

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



[issue25626] Gzip fails for file over 2**32 bytes

2015-11-15 Thread Martin Panter

Martin Panter added the comment:

Ben: By adding the cap, it means when the lower-level zlib module is asked to 
decode say 5 GiB, it will decode at most 4 GiB (rather than raising an 
exception). The 4 GiB limit (UINT_MAX to be precise) is due to the underlying 
zlib library; it’s not Python’s doing, and the limit was present before 3.5 as 
well.

In 3.5, if you ask GzipFile.read() to decompress 5 GiB, it will actually feed 
the decompressor 8 KiB (io.DEFAULT_BUFFER_SIZE) of compressed data, which will 
decompress to at most 8 MB or so (max compression ratio is 1:1032). Then it 
will feed the next 8 KiB chunk. So it does not matter whether the limit is 4 or 
5 GiB because there can only be 8ish MB data per internal decompress() call.

Before 3.5, it first feeds a 1 KiB chunk, but exponentially increases the chunk 
size up to 10 MiB in each internal iteration.

If you think the new 3.5 implementation (with OverflowError fixed) is 
significantly less efficient, I can look at ways of improving it. But I am a 
bit skeptical. Usually I find once you process 10s or 100s of kB of data at 
once, any increases in the buffer size have negligible effect on the little 
time spent in native Python code, and times actually get worse as your buffers 
get too big, probably due to ineffective use of fast memory caching.

===

I propose this patch for the 3.5 branch, which implements the internal capping 
in the zlib module. It changes the zlib module to accept sizes greater than 
UINT_MAX, but internally limits them. I think this is the most practical way 
forward, because it does not require Python code to know the value of UINT_MAX 
(which could in theory vary by platform).

I would be good to get a review of my patch. In particular, is this change okay 
for the 3.5 maintainence branch? It would also be good to confirm that my patch 
fixes the original problem, i.e. read(2**32) works on computers with more than 
4 GiB of memory (which I cannot test).

This regression is caused by Issue 23529, where I make sure that 
GzipFile.read(size) doesn’t buffer huge amounts of data from a decompression 
bomb.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file41053/zlib-size_t.patch

___
Python tracker 

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



[issue25626] Gzip fails for file over 2**32 bytes

2015-11-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue25628] Make namedtuple "verbose" and "rename" parameters into keyword only arguments

2015-11-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

My judgment call is that the keyword-only change can be made directly, that the 
costs and clutter of deprecation and delay aren't worth in it this case, that 
the nature of the "verbose" and "rename" arguments puts this in the 
rare-to-non-existent category, that any remediation would be trivial (easier 
than shutting-off a warning), and that the user's come out ahead with the 
cleaner cut-over in this case.   There's no value in being pedantic on this 
one, some judgment is required.

--

___
Python tracker 

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



[issue25628] Make namedtuple "verbose" and "rename" parameters into keyword only arguments

2015-11-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

OK, leave it to you. But may be worth to add a versionchanged directive.

--

___
Python tracker 

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