[issue21305] PEP 466: update os.urandom

2014-04-29 Thread Nick Coghlan

Nick Coghlan added the comment:

Note that the discussion of this PEP *did* suffer from the "language summit
effect" where folks that couldn't make it to the summit are missing some of
the context. I believe I included all of the key motivating points in the
PEP itself, but it's still not the same as being there from a "why take the
risk?" perspective.

Of the approved feature backports, this one was the most borderline, and as
noted above, I think it could comfortably wait until 2.7.8. The SSL changes
are most significant, followed by the constant time comparison function,
and only then the other updates.

--

___
Python tracker 

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



[issue18314] Have os.unlink remove junction points

2014-04-29 Thread Tim Golden

Tim Golden added the comment:

Yes, now that the custom allocator / tracing stuff is in place: 
otherwise there's no way for custom allocation or tracing to occur. 
Please go ahead and rework the patch when you have the time.

Also, since the setup of the reparse header is such an underdocumented 
nightmare, please add as much commentary as possible around the choice 
of allocations & offsets. I was reviewing your code with an eye on the 
various MSDN pages and examples and I still wasn't always able to follow 
your choices.

(BTW I'm not convinced that the PyMem change was the problem since the 
PyMem_Raw* functions simply hand off to malloc/free unless there's a 
custom allocator. Unless of course the missing memset-0 was significant 
here).

--

___
Python tracker 

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



[issue21377] PyBytes_Concat could try to concat in-place

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Tentative patch attached. The test suite still passes, but I'm not
> sure if it actually exerts the new code path.

A quick grep shows me that it should be exercised at least by 
Modules/_io/bufferedio.c.
Otherwise, the way to test the C API is to add a function to 
Modules/_testcapi.c, and test that function from the relevant test file.

--

___
Python tracker 

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



[issue21381] Python 3.4+ interpreter built on/with OS X 10.7 deployment target segfaults on 10.8+

2014-04-29 Thread Ned Deily

Ned Deily added the comment:

Yes, it should be possible to build all Pythons for all recent OS X deployment 
targets but, normally, the safest way is to build a specific deployment target 
on the same OS X version; that should avoid any possibility of inadvertently 
linking with new features not available on the older deployment target system.  
It is possible to use SDKs and tools from older versions of Xcode on newer 
systems to simulate building on an older system but that isn't foolproof.  
Also, keep in mind that the deployment target is a minimum deployment target.  
Pythons built with a deployment target of 10.n also work on 10.n+1 and 
generally 10.n+m, at least as long as there is no major compatibility break, 
like dropping support for running PPC architecture executables in 10.7.

However, the problem you've found here is an exception to that general rule.  
The culprit appears to be the execution stack size increase at link time 
introduced by Issue18075 in b07ad4b5e349 for 3.4.0.  With the stack size 
increased to 16MB, when Python is built on 10.7, it seems to work fine on 10.7 
but, if the same executable is moved to 10.8 or 10.9, it segfaults early in 
initialization.  The same behavior is observed with either debug or non-debug 
builds.  When the same executable is run under gdb or lldb, the interpreter 
doesn't segfault.  Likewise, the same behavior is seen when building on 10.8 or 
10.9 and setting MACOSX_DEPLOYMENT_TARGET=10.7.  (Also, building with Xcode 
4.6.3 (the current 10.7 toolchain) on 10.9 makes no difference.)

With dept target of 10.7, If the stack size increase in configure is commented 
out,

#LINKFORSHARED="-Wl,-stack_size,100 $LINKFORSHARED"

then builds with dept target of 10.7 succeed and all tests pass.  In fact, at 
first glance it seemed that all tests passed with a dept target of 10.9 using 
the current Xcode 5.1.1 build tools so it's not clear whether the original 
problem reported in Issue18075 still exists.

I'm puzzled by this one: thanks, Chris!  We could certainly make the stack size 
increase conditional but it's odd that it only seems to be a problem with 10.7. 
 Ronald (or anyone else): any ideas?

--
nosy: +ronaldoussoren
title: python build crash on Mavericht -> Python 3.4+ interpreter built on/with 
OS X 10.7 deployment target segfaults on 10.8+
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



[issue21037] add an AddressSanitizer build option

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> But I'm not really familiar with the buildbot support, so if anyone
> has a clue...

I can add environment variables and configure options specific to a buildbot. 
Just tell me which ones (and which buildbot (preferably yours ? :-)).

That said, it would be better if you first check said options work locally.

--

___
Python tracker 

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



[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-04-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3cf067049211 by Antoine Pitrou in branch 'default':
Issue #20951: SSLSocket.send() now raises either SSLWantReadError or 
SSLWantWriteError on a non-blocking socket if the operation would block. 
Previously, it would return 0.
http://hg.python.org/cpython/rev/3cf067049211

--
nosy: +python-dev

___
Python tracker 

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



[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-04-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b0f6983d63df by Antoine Pitrou in branch 'default':
Add porting note for issue #20951.
http://hg.python.org/cpython/rev/b0f6983d63df

--

___
Python tracker 

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



[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Patch finally committed. Thanks Nikolaus!

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



[issue21382] Signal module doesnt raises ValueError Exception

2014-04-29 Thread rsevcan

New submission from rsevcan:

signal.signal() built-in function doesnt throws a ValueError exception in 
Windows when is called with a different signal than SIGABRT, SIGFPE, SIGILL, 
SIGINT, SIGSEGV, or SIGTERM, as it is written in the documentation.

https://docs.python.org/2/library/signal.html#signal.signal
https://docs.python.org/3/library/signal.html#signal.signal

It throws an AttributeError Exception

>>> import signal
>>> import sys
>>> sys.platform
'win32'
>>> signal.signal(signal.SIGPIPE, lambda signum, frame: sys.exit(1))
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'module' object has no attribute 'SIGPIPE'
>>>

Regards

--
assignee: docs@python
components: Documentation
messages: 217486
nosy: docs@python, rsevcan
priority: normal
severity: normal
status: open
title: Signal module doesnt raises ValueError Exception
type: enhancement
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



[issue4709] Mingw-w64 and python on windows x64

2014-04-29 Thread Simon Zack

Simon Zack added the comment:

The problem is still present in python 3.4 with mingw gcc 4.8.2. I was having 
trouble with compiling radare2's python swig bindings.
The solution described here: 
http://ascend4.org/Setting_up_a_MinGW-w64_build_environment#Setup_Python_for_compilation_of_extensions
also fixes my problem when using generated dlls.

--
nosy: +simonzack

___
Python tracker 

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



[issue18314] Have os.unlink remove junction points

2014-04-29 Thread Kim Gräsman

Kim Gräsman added the comment:

> Also, since the setup of the reparse header is such an underdocumented
> nightmare, please add as much commentary as possible around the choice 
> of allocations & offsets.

I'll try. It might turn into a novel.

> (BTW I'm not convinced that the PyMem change was the problem since 
> the PyMem_Raw* functions simply hand off to malloc/free unless
> there's a custom allocator.
> Unless of course the missing memset-0 was significant here).

I think it might be, there was a message in the log that DeviceIoControl failed:

  stty: standard input: Inappropriate ioctl for device

That could be attributed to garbage in the buffer.

I'll be back with a revised patch, and we can work from there. Thanks for your 
help!

--

___
Python tracker 

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



[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-04-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2a1d63f09560 by Antoine Pitrou in branch 'default':
Issue #21057: TextIOWrapper now allows the underlying binary stream's read() or 
read1() method to return an arbitrary bytes-like object (such as a memoryview).
http://hg.python.org/cpython/rev/2a1d63f09560

--
nosy: +python-dev

___
Python tracker 

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



[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-04-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7f50e1836ddb by Antoine Pitrou in branch 'default':
Fix failure in test_poplib after issue #20951.
http://hg.python.org/cpython/rev/7f50e1836ddb

--

___
Python tracker 

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



[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thank you, I've committed tha patch to 3.5.

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



[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, there was a failure in test_poplib when run with -unetwork, I fixed it.

--

___
Python tracker 

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



[issue21375] Fix and test overflow behavior in the C version of heapq

2014-04-29 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Attaching a fix.  I can't think of a way to test this without an array of 
sys.maxsize.

--
keywords: +patch
Added file: http://bugs.python.org/file35088/fix_overflow.diff

___
Python tracker 

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



[issue21305] PEP 466: update os.urandom

2014-04-29 Thread STINNER Victor

STINNER Victor added the comment:

> The problem is AFAICT there's currently no way to get a file
> descriptor to the underlying /dev/urandom (and I don't know how it
> works on Windows).

We can reimplement os.urandom in SystemRandom on UNIX to keep the file (fd)
open. The code is very simple, basically it's just a call to file.read(n).

Adding a randbytes() method in Python 3.5 would be nice.

The io module can handle boring things for you, like calling read in a loop
until you get enough bytes and handle InterruptError.

Except if you would prefer to use os.read or FileIO.read to avoid readahead.

--

___
Python tracker 

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



[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks. Could you also add a test for the islice_reduce additions? Or is it 
already tested?
I suspect there's a reference leak there: after calling PyObject_GetIter, you 
should always Py_DECREF(empty_list).
Also, with the "O" code, Py_BuildValue will take a new reference to empty_it, 
so you should use the "N" code instead.

--

___
Python tracker 

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



[issue21305] PEP 466: update os.urandom

2014-04-29 Thread STINNER Victor

STINNER Victor added the comment:

> (and I don't know how it
> works on Windows).

On Windows, the OS CryptoAPI is used and a handle is kept open between
calls to os.urandom. On Windows, I don't think that it's a an issue to keep
a handle open. Handle are not sequential numbers and users don't manipulate
them directly.

--

___
Python tracker 

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



[issue21383] "make touch" fails when the build directory is not the source directory

2014-04-29 Thread Ned Deily

New submission from Ned Deily:

make touch
hg --config extensions.touch=Tools/hg/hgtouch.py touch -v
*** failed to import extension touch from Tools/hg/hgtouch.py: [Errno 2] No 
such file or directory: 'Tools/hg/hgtouch.py'
hg: unknown command 'touch'

--
components: Build
messages: 217497
nosy: ned.deily
priority: normal
severity: normal
status: open
title: "make touch" fails when the build directory is not the source directory
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue21377] PyBytes_Concat could try to concat in-place

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> If I remember correctly, ceval.c has an optmisation for str += str even if
> the refcount is 2. Do we need to implement it or suggest to use bytearray
> or b''.join() instead?

The latter, IMO. This issue is about the C API _PyBytes_Concat.

--

___
Python tracker 

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



[issue21383] "make touch" fails when the build directory is not the source directory

2014-04-29 Thread Ned Deily

Changes by Ned Deily :


--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file35089/issue21383_make_touch.patch

___
Python tracker 

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



[issue21377] PyBytes_Concat could try to concat in-place

2014-04-29 Thread STINNER Victor

STINNER Victor added the comment:

If I remember correctly, ceval.c has an optmisation for str += str even if
the refcount is 2. Do we need to implement it or suggest to use bytearray
or b''.join() instead?

--

___
Python tracker 

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



[issue17861] put opcode information in one place

2014-04-29 Thread Ned Deily

Ned Deily added the comment:

Martin, it could if "make touch" worked when building outside of the source 
directory (Issue21383).

--

___
Python tracker 

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



[issue21384] Windows: Make handle non inheritable by default

2014-04-29 Thread STINNER Victor

New submission from STINNER Victor:

The PEP 446 was implemented in Python 3.4. All file descriptors are now created 
non inheritable. The implementation was not finished on Windows, handles may be 
created inheritable. The Python code should be audoted for that.

For example, hCryptProv in Python/random.c is inheritable or not?

--
components: Windows
messages: 217501
nosy: haypo, sbt, tim.golden
priority: normal
severity: normal
status: open
title: Windows: Make handle non inheritable by default
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



[issue21385] Compiling modified AST crashes on debug build unless linenumbering discarded

2014-04-29 Thread Antti Haapala

New submission from Antti Haapala:

We had had problems with our web service occasionally hanging and performing 
poorly, and as we didn't have much clue about the cause of these, we decided to 
continuously run our staging build under debug enabled python 3.4, and then 
attaching gdb as needed. To much dismay we found out that our code generating 
code that builds AST trees and then compiles them to modules is dumping cores 
on the debug version. 

The assertion is the much discussed "linenumbers must grow monotonically" at 
http://hg.python.org/cpython/file/04f714765c13/Python/compile.c#l3969

In our case, the AST is generated from a HTML template with embedded python 
parts; as we could approximately point out much of the corresponding code in 
the source template, we decided to reuse the linenumbers in AST, and things 
seemed to work quite nicely and usually we could get usable tracebacks too.

Under debug build, however, as the ordering of some constructs in the source 
language are different from python, we need to discard *all* linenumbers and 
only after then use fix_missing_locations, and thus get completely unusable 
traces from these parts of code, all happening on line 1. Just using 
fix_missing_locations does not work. Likewise the rules for which parts of the 
tree should come in which order in the lnotab is quite hard to deduce.

It seems to me that when the lnotab was created, no one even had in mind that 
there would be an actually useful AST module that would be used for code 
generation. Considering that there have been other calls for breaking the 
correspondence of bytecode addresses to monotonically growing linenumbers, I 
want to reopen the discussion about changing the lnotab structures now to allow 
arbitrary mapping of source code locations to bytecode, and especially about 
the need for this assertion in the debug builds at all.

Attached is an example of code that appends a function to an existing module 
syntax tree, run under python*-dbg it dumps the core with 
"Python/compile.c:: assemble_lnotab: Assertion `d_lineno >= 0' failed." Ofc 
in this simple case it is easy to just modify the linenumbers so that function 
"bar" would come after "foo", however in some cases it is hard to know the 
actual rules; fix_missing_locations does not do this right at all.

I am also pretty sure most of the existing code that combine parsed and 
generated ASTs and then compile the resulting trees also would fail that 
assert, but no one is ever running their code under debug builds.

--
components: Interpreter Core
files: astlinenotest.py
messages: 217502
nosy: Ztane
priority: normal
severity: normal
status: open
title: Compiling modified AST crashes on debug build unless linenumbering 
discarded
type: crash
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file35090/astlinenotest.py

___
Python tracker 

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



[issue1284316] Win32: Security problem with default installation directory

2014-04-29 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola
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



[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-29 Thread Anton Afanasyev

Anton Afanasyev added the comment:

Hi Antoine,
oops you are right about leaks: fixed them in new attached patch.
As for testing changes in "reduce()": they are already covered by 
"self.pickletest(islice(range(100), *args))". Function "pickletest()" covers 
case for pickle dumping/loading of exhausted iterator.

--
Added file: http://bugs.python.org/file35091/issue21321_3.4_8c8315bac6a8_5.diff

___
Python tracker 

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



[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2014-04-29 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


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



[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

For the record, checks such as:

self.assertEqual(wr() is None, False)

are better written:

self.assertIsNotNone(wr())

No need to upload a new patch, I'm gonna make the change while committing :-)

--

___
Python tracker 

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



[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b795105db23a by Antoine Pitrou in branch '3.4':
Issue #21321: itertools.islice() now releases the reference to the source 
iterator when the slice is exhausted.
http://hg.python.org/cpython/rev/b795105db23a

New changeset a627b3e3c9c8 by Antoine Pitrou in branch 'default':
Issue #21321: itertools.islice() now releases the reference to the source 
iterator when the slice is exhausted.
http://hg.python.org/cpython/rev/a627b3e3c9c8

--
nosy: +python-dev

___
Python tracker 

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



[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Patch committed, thank you!
If you want to provide a patch for 2.7, please say so, otherwise I'll close the 
issue.

--
resolution:  -> fixed
stage:  -> resolved

___
Python tracker 

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



[issue1284316] Win32: Security problem with default installation directory

2014-04-29 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

If on one hand I agree that Python being in C:\PythonXX is not optimal for all 
the reasons which have been mentioned so far, changing such an old established 
aspect of the interpreter would be too much disruptive as a change.
To say one, being that on Windows 'python' is not recognized as a command, some 
folks rely on it simply living in C:\Python** and make that assumption into 
their scripts (I did exactly this in psutil: 
https://code.google.com/p/psutil/source/browse/make.bat?name=release-2.1.0#23).

I agree with what Martin says here: 
http://bugs.python.org/issue1284316#msg26236.
We should let Python live in C\:PythonXX and just fix permissions during 
installation so that when the installation completes C:\PythonXX will not be 
writable by limited users. 
If this introduces a performance issue because the pyd files cannot be created 
afterwards then simply create pyd files as part of the installation process 
(this should be done if "install for all users" option is checked).

--

___
Python tracker 

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



[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-29 Thread Anton Afanasyev

Anton Afanasyev added the comment:

Antoine, not sure about 2.7. The issue first arose for me at Python 2.7, so I 
would prefer "issue21321_2.7_e3217efa6edd_4.diff" patch be applied.

--

___
Python tracker 

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



[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8ee76e1b5aa6 by Antoine Pitrou in branch '2.7':
Issue #21321: itertools.islice() now releases the reference to the source 
iterator when the slice is exhausted.
http://hg.python.org/cpython/rev/8ee76e1b5aa6

--

___
Python tracker 

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



[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, then I've committed to 2.7 too. Thank you very much for contributing!

--
status: open -> closed

___
Python tracker 

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



[issue21386] ipaddress.IPv4Address.is_global not implemented

2014-04-29 Thread Roger Luethi

New submission from Roger Luethi:

Lib/ipaddress.py does not implement is_global for IPv4Address, in contrast to 
the documentation which states for IPv4Address.is_global: "True if the address 
is allocated for public networks."

A patch like the one attached to this report should fix that.

--
components: Library (Lib)
files: ipv4addr_global.diff
keywords: patch
messages: 217511
nosy: rluethi
priority: normal
severity: normal
status: open
title: ipaddress.IPv4Address.is_global not implemented
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file35092/ipv4addr_global.diff

___
Python tracker 

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



[issue21387] Memory leaks when embedded interpreter is reinitialized

2014-04-29 Thread Evgeniy Stepanov

New submission from Evgeniy Stepanov:

Following https://docs.python.org/2/c-api/init.html#Py_Finalize, I'm 
reinitializing embedded python interpreter multiple time in one process.

#include 

void f() {
  Py_Initialize();
  PyRun_SimpleString("from time import time,ctime\n"
  "import datetime\n"
  "print 'Today is',ctime(time())\n");
  Py_Finalize();
}

int main(void) {
  for (int i = 0; i < 30; ++i)
f();
  return 0;
}

I see 2 sources of memory leaks:

 * _once_registry is never teared down.

==20144==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 8120 byte(s) in 29 object(s) allocated from:
#0 0x4a3e38 in malloc 
/code/llvm/build0/../projects/compiler-rt/lib/asan/asan_malloc_linux.cc:75
#1 0x4e1524 in _PyObject_GC_Malloc 
build/Python-2.7.6/Modules/gcmodule.c:1499
#2 0x4e16ff in _PyObject_GC_New build/Python-2.7.6/Modules/gcmodule.c:1521
#3 0x57e581 in PyDict_New build/Python-2.7.6/Objects/dictobject.c:277
#4 0x62b9a7 in _PyWarnings_Init build/Python-2.7.6/Python/_warnings.c:898
#5 0x4c2985 in Py_InitializeEx build/Python-2.7.6/Python/pythonrun.c:254
#6 0x4c22a4 in f() build/Python-2.7.6/1.cc:4
#7 0x4c22a4 in main build/Python-2.7.6/1.cc:14


* datetime module creates a bunch of objects in its initialization function and 
never destroys them

Direct leak of 8120 byte(s) in 29 object(s) allocated from:
#0 0x4a3e38 in malloc 
/code/llvm/build0/../projects/compiler-rt/lib/asan/asan_malloc_linux.cc:75
#1 0x4e1524 in _PyObject_GC_Malloc 
build/Python-2.7.6/Modules/gcmodule.c:1499
#2 0x4e16ff in _PyObject_GC_New build/Python-2.7.6/Modules/gcmodule.c:1521
#3 0x57e581 in PyDict_New build/Python-2.7.6/Objects/dictobject.c:277
#4 0x6cb976 in PyErr_NewException build/Python-2.7.6/Python/errors.c:577
#5 0x757227 in initzipimport build/Python-2.7.6/./Modules/zipimport.c:1235
#6 0x6e5797 in init_builtin build/Python-2.7.6/Python/import.c:1999
#7 0x6e158d in load_module build/Python-2.7.6/Python/import.c:1928
#8 0x6e6919 in import_submodule build/Python-2.7.6/Python/import.c:2700
#9 0x6e5ac7 in load_next build/Python-2.7.6/Python/import.c:2515
#10 0x6e036c in import_module_level build/Python-2.7.6/Python/import.c:2224
#11 0x6e036c in PyImport_ImportModuleLevel 
build/Python-2.7.6/Python/import.c:2288
#12 0x671e6f in builtin___import__ 
build/Python-2.7.6/Python/bltinmodule.c:49
#13 0x502b40 in PyObject_Call build/Python-2.7.6/Objects/abstract.c:2529
#14 0x502e82 in call_function_tail 
build/Python-2.7.6/Objects/abstract.c:2561
#15 0x502e82 in PyObject_CallFunction 
build/Python-2.7.6/Objects/abstract.c:2585
#16 0x6df7b0 in PyImport_Import build/Python-2.7.6/Python/import.c:2886
#17 0x6db9a7 in PyImport_ImportModule 
build/Python-2.7.6/Python/import.c:2129
#18 0x6db9a7 in _PyImportHooks_Init build/Python-2.7.6/Python/import.c:239
#19 0x4c287f in Py_InitializeEx build/Python-2.7.6/Python/pythonrun.c:248
#20 0x4c22a4 in f() build/Python-2.7.6/1.cc:4
#21 0x4c22a4 in main build/Python-2.7.6/1.cc:14

--
components: Extension Modules, Interpreter Core
messages: 217513
nosy: Evgeniy.Stepanov
priority: normal
severity: normal
status: open
title: Memory leaks when embedded interpreter is reinitialized
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



[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2014-04-29 Thread Stefan Krah

Stefan Krah added the comment:

Okay, if no one else wants this, I'll go ahead with the _fields part.

Andrew, could you sign a contributor agreement?

--

___
Python tracker 

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



[issue20230] structseq types should expose _fields

2014-04-29 Thread Stefan Krah

Changes by Stefan Krah :


--
resolution:  -> duplicate
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



[issue20230] structseq types should expose _fields

2014-04-29 Thread Stefan Krah

Changes by Stefan Krah :


--
superseder:  -> Enhance Object/structseq.c to match namedtuple and tuple
api

___
Python tracker 

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



[issue19001] test_gdb fails on Fedora buildbot

2014-04-29 Thread Stefan Krah

Stefan Krah added the comment:

Since Fedora 16 is EOL, let's close this.

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



[issue21386] ipaddress.IPv4Address.is_global not implemented

2014-04-29 Thread Eric V. Smith

Changes by Eric V. Smith :


--
nosy: +eric.smith, ncoghlan, pmoody

___
Python tracker 

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



[issue21138] mimetypes.MimeType UnicodeDecodeError

2014-04-29 Thread Tim Golden

Tim Golden added the comment:

Fixed by issue9291

--
resolution:  -> duplicate
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



[issue1284316] Win32: Security problem with default installation directory

2014-04-29 Thread Jason R. Coombs

Jason R. Coombs added the comment:

I still disagree. If the preferable place for Python to be installed is not in 
the root (and I fervently feel so), then there could be a transitional approach 
to move it to the appropriate place, such as creating symbolic links from the 
legacy destinations (as an opt-out option).

Still, as Martin said, a change to the default install location would require a 
PEP that would have to address these concerns.

--

___
Python tracker 

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



[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2014-04-29 Thread dellair jie

dellair jie added the comment:

Hello masamoto,

The patch you provided works quite well.
The build passed and Python calls are successfully.
Please let me know what else you need me to test in order to have the patch 
accepted or else feel free to close it with Resolution Fixed.

Thanks,
Dellair

--

___
Python tracker 

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



[issue21085] compile error Python3.3 on Cygwin

2014-04-29 Thread dellair jie

dellair jie added the comment:

Finally got it compiled on Cygwin! :)

Victor,

I am still having issue with the "make test" on Cygwin, hence can only do some 
manual testing:

Output:
>>> info = signal.sigwaitinfo({signal.SIGINT})
^C
>>>
>>> info = signal.struct_siginfo((2, 128, 0, 0, 0, 3))
Traceback (most recent call last):
  File "", line 1, in 
TypeError: signal.struct_siginfo() takes an at least 7-sequence (6-sequence 
given)
>>> info = signal.struct_siginfo((2, 128, 0, 0, 0, 3, 0))
Traceback (most recent call last):
  File "", line 1, in 
TypeError: signal.struct_siginfo() takes an at most 6-sequence (7-sequence 
given)
>>> help(signal.struct_siginfo)
 |  --
 |  Data descriptors defined here:
 |
 |  si_code
 |  signal code
 |
 |  si_errno
 |  errno associated with this signal
 |
 |  si_pid
 |  sending process ID
 |
 |  si_signo
 |  signal number
 |
 |  si_status
 |  exit value or signal
 |
 |  si_uid
 |  real user ID of sending process
 |
 |  --

Feel free to let me know if more testing is required.

Br,
Dellair

--

___
Python tracker 

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



[issue21388] decimal.InvalidContext is unused

2014-04-29 Thread Stefan Krah

New submission from Stefan Krah:

We could remove decimal.InvalidContext, which is completely unused
both in decimal.py and _decimal.

--
messages: 217519
nosy: mark.dickinson, rhettinger, skrah
priority: normal
severity: normal
status: open
title: decimal.InvalidContext is unused
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



[issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible

2014-04-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c75a2282166f by Zachary Ware in branch '3.4':
Issue #17386: List the 'htmlview' target in the Doc/Makefile help output.
http://hg.python.org/cpython/rev/c75a2282166f

New changeset c378c67c4170 by Zachary Ware in branch '3.4':
Issue #17386: Update Doc/README.txt to list all targets
http://hg.python.org/cpython/rev/c378c67c4170

New changeset a172f26195f6 by Zachary Ware in branch '3.4':
Issue #17386: Expand Doc/make.bat to be much more similar to Doc/Makefile
http://hg.python.org/cpython/rev/a172f26195f6

New changeset 2b2577d79e80 by Zachary Ware in branch 'default':
Closes #17386: Merge with 3.4
http://hg.python.org/cpython/rev/2b2577d79e80

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



[issue19630] marshal.dump cannot write to temporary file

2014-04-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0f6bdc2b0e38 by Tim Golden in branch '2.7':
Issue #19630 Emphasise that the file parameter to marshal.dump must be a real 
file object
http://hg.python.org/cpython/rev/0f6bdc2b0e38

--
nosy: +python-dev

___
Python tracker 

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



[issue19630] marshal.dump cannot write to temporary file

2014-04-29 Thread Tim Golden

Tim Golden added the comment:

I updated the docs to emphasise that the file parameter to marshal.dump must be 
a real file, not a wrapper.

--
assignee:  -> tim.golden
status: open -> closed

___
Python tracker 

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



[issue21040] socketserver: use selectors module

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Shouldn't this issue be closed?

--

___
Python tracker 

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



[issue21314] Document '/' in signatures

2014-04-29 Thread Zachary Ware

Changes by Zachary Ware :


--
keywords: +easy
stage:  -> needs patch
status:  -> open
type:  -> enhancement
versions: +Python 3.5

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-29 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Hi all,

Here is a new version of the patch, please, keep me informed and I think I have 
to modify some parts, but give me your feedback.

Thanks

--
Added file: http://bugs.python.org/file35093/issue12916-2.patch

___
Python tracker 

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



[issue21388] decimal.InvalidContext is unused

2014-04-29 Thread Mark Dickinson

Mark Dickinson added the comment:

It's part of the specification, though.  For me, that's a good enough reason to 
keep it.

--

___
Python tracker 

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



[issue21040] socketserver: use selectors module

2014-04-29 Thread Charles-François Natali

Changes by Charles-François Natali :


--
status: open -> closed

___
Python tracker 

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



[issue21316] mark test_devpoll to be meaningful only for Solaris

2014-04-29 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
assignee:  -> jcea
nosy: +jcea
title: mark test_devpoll to be meaningfull only for Solaris -> mark 
test_devpoll to be meaningful only for Solaris
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



[issue21316] mark test_devpoll to be meaningful only for Solaris

2014-04-29 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Thanks for the head-up!!. Can you compile new version and try it out?.

--

___
Python tracker 

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



[issue21316] mark test_devpoll to be meaningful only for Solaris

2014-04-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cc2345e6e9ff by Jesus Cea in branch '3.4':
Closes issue #21316: mark test_devpoll to be meaningfull only for Solaris
http://hg.python.org/cpython/rev/cc2345e6e9ff

New changeset 825c67196aac by Jesus Cea in branch 'default':
MERGE: Closes issue #21316: mark test_devpoll to be meaningfull only for Solaris
http://hg.python.org/cpython/rev/825c67196aac

--
nosy: +python-dev

___
Python tracker 

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



[issue21316] mark test_devpoll to be meaningful only for Solaris

2014-04-29 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type: enhancement -> 

___
Python tracker 

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



[issue21374] DecimalTuple.__module__ is set to _frozen_importlib

2014-04-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bf64a5f7c1af by Stefan Krah in branch 'default':
Issue #21374: Fix pickling of DecimalTuple.
http://hg.python.org/cpython/rev/bf64a5f7c1af

New changeset 25919f35241e by Stefan Krah in branch '3.4':
Issue #21374: Fix pickling of DecimalTuple.
http://hg.python.org/cpython/rev/25919f35241e

--
nosy: +python-dev

___
Python tracker 

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



[issue21374] DecimalTuple.__module__ is set to _frozen_importlib

2014-04-29 Thread Stefan Krah

Changes by Stefan Krah :


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



[issue21378] ImportError: No module named 'concurrent.futures'

2014-04-29 Thread Bill Bergmann

Bill Bergmann added the comment:

Thank you for your response. The program works as expected.

I removed PYTHONPATH settings for 3.4 and 2.7. I'm not sure how those settings 
were written. I suspect something related to virtualenv, and I will be watching 
to see if they are written again.

When I removed those paths, an error message pointed me to a local version of 
concurrent.py from tornado that was shadowing the concurrent.py in the 
python3.4 site-packages.

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue21382] Signal module doesnt raises ValueError Exception

2014-04-29 Thread Florent Xicluna

Changes by Florent Xicluna :


--
components: +Library (Lib), Windows
nosy: +flox
type: enhancement -> behavior

___
Python tracker 

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



[issue21381] Python 3.4+ interpreter built on/with OS X 10.7 deployment target segfaults on 10.8+

2014-04-29 Thread Christian Tismer

Christian Tismer added the comment:

Ned,
thank you for locating the patch that causes the problem.
At least, I could now make my script work, built a patch
feature into it.

cheers - Chris

--

___
Python tracker 

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



[issue21382] Signal module doesnt raises ValueError Exception

2014-04-29 Thread Florent Xicluna

Florent Xicluna added the comment:

It's about documentation only.

The sentence is not wrong, but it is slightly confusing, and there's no hint 
which signals are defined on Windows.

"On Windows, signal() can only be called with SIGABRT, SIGFPE, SIGILL, SIGINT, 
SIGSEGV, or SIGTERM. A ValueError will be raised in any other case."

Reading only this documentation, if the developer doesn't have a test platform 
on Windows, he could blindly write:

try:
signal.signal(signal.SIGPIPE, lambda signum, frame: sys.exit(1))
except ValueError:
pass

... until a Windows user detects the issue (thank you rsevcan)


Now I just found this page which is relevant here ... either we could link to 
the page in a "See also" section, or give an hint about which signals are 
defined or not.
http://msdn.microsoft.com/en-us/library/xdkz3x12.aspx

--
components:  -Library (Lib)
priority: normal -> low
versions: +Python 3.4, Python 3.5

___
Python tracker 

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



[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2014-04-29 Thread Tim Golden

Changes by Tim Golden :


--
assignee:  -> tim.golden
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



[issue21362] concurrent.futures does not validate that max_workers is proper

2014-04-29 Thread Brian Quinlan

Brian Quinlan added the comment:

The patch looks good to me too. I'll commit it soon.

--
assignee:  -> bquinlan

___
Python tracker 

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



[issue6839] zipfile can't extract file

2014-04-29 Thread Adam Polkosnik

Adam Polkosnik added the comment:

Gentlemen,

Is there's any way this fix can be included in any version?
Currently, the fact that the exception is thrown makes extracting some zip 
files impossible with this library, and rolling your own is a bit painful. 
(either using a wrapper around 7zip to handle those or just provide 
cloned/patched versions for every major python version).

This ridiculous behavior is really not consistent with other ZIP 
implementations (7zip just ignores the mismatch).

Thank you for your time and effort.

--
versions: +Python 3.1, Python 3.2, Python 3.5

___
Python tracker 

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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is an updated patch keeping up with recent changes in the source tree.

--
Added file: http://bugs.python.org/file35094/unwinding.patch

___
Python tracker 

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



[issue21387] Memory leaks when embedded interpreter is reinitialized

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks. It would be nice if you could try the same with Python 3.4, or the 
development version.

--
nosy: +pitrou, skrah

___
Python tracker 

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



[issue21353] document Popen.args attribute

2014-04-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a4b211b927e by Gregory P. Smith in branch '3.3':
Document the subprocess Popen.args attribute (issue21353)
http://hg.python.org/cpython/rev/0a4b211b927e

New changeset 182b869283a5 by Gregory P. Smith in branch '3.4':
Document the subprocess Popen.args attribute (issue21353)
http://hg.python.org/cpython/rev/182b869283a5

New changeset 0b2e199ad088 by Gregory P. Smith in branch 'default':
Document the subprocess Popen.args attribute (issue21353)
http://hg.python.org/cpython/rev/0b2e199ad088

--
nosy: +python-dev

___
Python tracker 

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



[issue21353] document Popen.args attribute

2014-04-29 Thread Gregory P. Smith

Gregory P. Smith added the comment:

yes. this was overlooked. thanks!

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



[issue18314] Have os.unlink remove junction points

2014-04-29 Thread Kim Gräsman

Kim Gräsman added the comment:

Here's a new attempt, please let me know if this works out better.

Changes:
- Switched to CRT string functions (wcsncmp, wcscpy) instead of Windows 
lstrxxxW. There was no lstrncmpW.
- Switched to PyMem_Raw(Malloc|Free) and added explicit memset after allocation
- Better error handling (check arguments for NULL, check memory allocation)
- Fix possible overrun when checking if src_path starts with "\??\"
- Extensive commentary to describe the buffer sizing

Hope this works out better. I already have ideas for improvements, but I think 
we can try to get this in place first.

--
Added file: http://bugs.python.org/file35095/unlink_junctions_r2.patch

___
Python tracker 

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



[issue21388] decimal.InvalidContext is unused

2014-04-29 Thread Stefan Krah

Stefan Krah added the comment:

Okay, also it is easier to keep it. I was just busy with the exception
docs and found the InvalidContext situation slightly odd.

Of course, there is a very small chance that external software is
using it.

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



[issue21387] Memory leaks when embedded interpreter is reinitialized

2014-04-29 Thread Stefan Krah

Stefan Krah added the comment:

Are we fixing these on a case by case basis or is it hopeless (msg146615)?

--

___
Python tracker 

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



[issue21387] Memory leaks when embedded interpreter is reinitialized

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I think fixing on a case by case is fine.

--

___
Python tracker 

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



[issue2159] dbmmodule inquiry function is performance prohibitive

2014-04-29 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Eric, would you mind to clarify the points I raised in the last message?. Lets 
move this forward.

--

___
Python tracker 

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



[issue21037] add an AddressSanitizer build option

2014-04-29 Thread Charles-François Natali

Charles-François Natali added the comment:

> That said, it would be better if you first check said options work locally.

I wasn't clear, but I did test it, and it works: the only problem I
encountered is address space exhaustion: I have a 32-bit box, and ASAN
uses a lot of virtual address space (for shadow pages), so with a lot
of memory or many thread you can hit the 3G limit.
So we should only run this on 64-bit machine (see below for more details).

> I can add environment variables and configure options specific to a buildbot. 
> Just tell me which ones (and which buildbot (preferably yours ? :-)).

Yeah, I barely have a day-to-day machine, so I'm afraid I can't help here :-)

I guess we could go for any non-stable buildbot meeting the following criteria:
- Linux 64-bit
- clang >= 3.1 or gcc >= 4.8

But it would be great if someone could test the patch locally on a
64-bit machine before I commit it.
Basically:

$ patch -p1 < ~/asan.diff && autoconf && autoheader && ./configure
--with-address-sanitizer && make
$ ASAN_OPTIONS=handle_segv=0 ./python -m test -vG -uall

--

___
Python tracker 

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



[issue21037] add an AddressSanitizer build option

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> I guess we could go for any non-stable buildbot meeting the following > 
> criteria:
> - Linux 64-bit
> - clang >= 3.1 or gcc >= 4.8

Hmm... perhaps Stefan would like to set something up?

--
nosy: +skrah

___
Python tracker 

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



[issue21037] add an AddressSanitizer build option

2014-04-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

How do we spot any ASAN issues, though? Does ASAN change the process' return 
code on errors?

--

___
Python tracker 

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



[issue6839] zipfile can't extract file

2014-04-29 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Adam P, please don't screw around with the version headers. If you want to 
claim that this is a security issue of the type we care about (threats to the 
public internet) for patching old releases, and severe enough that we should do 
anything about it, send a detailed explanation with links to evidence to 
security response team. Simple writing 'a possible scenario' is insufficient.

--
versions:  -Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue21037] add an AddressSanitizer build option

2014-04-29 Thread Charles-François Natali

Charles-François Natali added the comment:

> How do we spot any ASAN issues, though? Does ASAN change the process' return 
> code on errors?

It aborts:
$ cat /tmp/test.c
int main(int argc, char *argv[])
{
int bar[16] = {0};

/* oops */
return bar[16];
}
$ gcc -Wall -fsanitize=address -o /tmp/test /tmp/test.c
$ /tmp/test
=
==15028== ERROR: AddressSanitizer: stack-buffer-overflow on address
0xbffab500 at pc 0x80485ec bp 0xbffab488 sp 0xbffab47c
READ of size 4 at 0xbffab500 thread T0
#0 0x80485eb (/tmp/test+0x80485eb)
#1 0xb5fd8a62 (/lib/i386-linux-gnu/i686/cmov/libc-2.18.so+0x19a62)
#2 0x8048490 (/tmp/test+0x8048490)
Address 0xbffab500 is located at offset 96 in frame  of T0's stack:
  This frame has 1 object(s):
[32, 96) 'bar'
HINT: this may be a false positive if your program uses some custom
stack unwind mechanism or swapcontext
  (longjmp and C++ exceptions *are* supported)
Shadow bytes around the buggy address:
  0x37ff5650: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x37ff5660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x37ff5670: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x37ff5680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x37ff5690: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00
=>0x37ff56a0:[f3]f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
  0x37ff56b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x37ff56c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x37ff56d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x37ff56e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x37ff56f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:   00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone: fa
  Heap righ redzone: fb
  Freed Heap region: fd
  Stack left redzone:f1
  Stack mid redzone: f2
  Stack right redzone:   f3
  Stack partial redzone: f4
  Stack after return:f5
  Stack use after scope: f8
  Global redzone:f9
  Global init order: f6
  Poisoned by user:  f7
  ASan internal: fe
==15028== ABORTING

You obviously don't see here, but it also colors the output in a terminal :-)

--

___
Python tracker 

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



[issue18104] Idle: make human-mediated GUI tests usable

2014-04-29 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The new patch adds a docstring with spec template, a second example, and a 
crude runall(). I am inclined to push this as a base for further patches -- at 
least one to improve runall and others to test more widget classes. These might 
be separate issues.

--
Added file: http://bugs.python.org/file35096/18104-htest2.diff

___
Python tracker 

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



[issue21233] Add *Calloc functions to CPython memory allocation API

2014-04-29 Thread STINNER Victor

STINNER Victor added the comment:

Patch version 6:

- I renamed "int zero" parameter to "int use_calloc" and move the new parameter 
at the first position to avoid confusion with nelem. For example, 
_PyObject_Alloc(ctx, 1, nbytes, 0) becomes _PyObject_Alloc(0, ctx, 1, nbytes). 
It also more logical to put it in the first position. In bytesobject.c, I 
leaved it at the parameter at the end since its meaning is different (fill 
bytes with zero or not) IMO.

- I removed my hack (premature optimization) "assert(nelem == 1); ... 
malloc(elsize);" and replaced it with a less surprising "... malloc(nelem * 
elsize);"

Stefan & Charles-François: I hope that the patch looks better to you.

--
Added file: http://bugs.python.org/file35097/calloc-6.patch

___
Python tracker 

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



[issue21379] StopIteration is silenced when raised by generator within context manager

2014-04-29 Thread Hannan Aharonov

Hannan Aharonov added the comment:

OK. Thanks.

--

___
Python tracker 

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



[issue6839] zipfile can't extract file

2014-04-29 Thread Adam Polkosnik

Adam Polkosnik added the comment:

For the version headers, I've added the versions featuring the broken behavior. 
That's all.

I'm not saying that this is 

I'm extracting malware from the Central Quarantine files, and the vendor's 
implementation is broken and is causing this issue for me on every single file 
inside the archive.

Let's say, I've got a wrapper script that feeds the contents of a zip file to 
be scanned with this, because of this behavior, the wrapper will error out... 
Customers will say your product sucks, etc.

Does this really take an act of god to fix this?

--
versions: +Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue12382] [msilib] Obscure exception message when trying to open a non-existent MSI database

2014-04-29 Thread William Tisäter

William Tisäter added the comment:

Found this a simple fix for an annoying and time consuming error. Patched as 
discussed earlier and decided to leave the filename out.

--
components: +Windows -Library (Lib)
keywords: +patch
nosy: +tiwilliam
versions: +Python 3.5
Added file: http://bugs.python.org/file35098/12382_msi-open-error-message.patch

___
Python tracker 

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



[issue6839] zipfile can't extract file

2014-04-29 Thread Adam Polkosnik

Adam Polkosnik added the comment:

Also, this behavior is present on all platforms and all versions of Python 
(zipfile Library), so maybe the headers should be adjusted there too.

I'm not saying that this is necessarily a big freaking hole, but by using this, 
one can prevent files from being extracted using this simple trick.

--

___
Python tracker 

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



[issue21233] Add *Calloc functions to CPython memory allocation API

2014-04-29 Thread Charles-François Natali

Charles-François Natali 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



[issue21375] Fix and test overflow behavior in the C version of heapq

2014-04-29 Thread Tim Peters

Tim Peters added the comment:

I don't see a way to test it either, but it's easy enough to prove it's correct 
;-)  That is, looks good to me!

--
nosy: +tim.peters

___
Python tracker 

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



[issue6839] zipfile can't extract file

2014-04-29 Thread Adam Polkosnik

Adam Polkosnik added the comment:

If I got a file scanner in my mail gateway implemented with this, one can 
easily avoid getting the contents of zip-files scanned. Is that enough of a 
security impact?

--

___
Python tracker 

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



[issue2159] dbmmodule inquiry function is performance prohibitive

2014-04-29 Thread Eric Olson

Eric Olson added the comment:

Thank you for the feedback.  Sorry I didn't see your previous response until 
today.  I will take a look and respond tonight.

--

___
Python tracker 

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



[issue6839] zipfile can't extract file

2014-04-29 Thread Adam Polkosnik

Adam Polkosnik added the comment:

I've also tested with WinZip, and Windows Explorer, on windows. Both extract 
the contents of test.zip without a warning (just like 7zip on Windows did). 
This behavior counts as Denial Of Service if the zipfile Library is used to 
extract files, besides lots of formats use ZIP as an envelope; DOCX, APK, JAR, 
EPUB come to mind.

--

___
Python tracker 

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



[issue21281] DEBUGGING: Simultaneous stopping of all threads on breakpoint and switching between threads

2014-04-29 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
versions:  -Python 2.7, Python 3.1, 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



[issue19214] shutil.make_archive should recognize extensions in filenames

2014-04-29 Thread William Tisäter

William Tisäter added the comment:

I'm not sure if this is a suitable feature in `make_archive()`, it would only 
introduce a more expensive and ugly lookup. Using this method with a 
pre-defined filename including extension must be rare. If you really want this 
behaviour, I would prefer having this helper instead:

def make_archive(filename, **kwargs):
for fmt, ext, info in shutil.get_unpack_formats():
if not filename.lower().endswith(tuple(ext)):
continue
return shutil.make_archive(filename[:-len(ext)], fmt, **kwargs)
raise ValueError("Unknown archive format: %s" % filename)

Not sure what version you are using, `get_unpack_formats()` got introduced in 
3.2.

--
nosy: +tiwilliam

___
Python tracker 

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



[issue18104] Idle: make human-mediated GUI tests usable

2014-04-29 Thread Terry J. Reedy

Terry J. Reedy added the comment:

New patch. I refined the definition of the parameter for run() in the process 
of adding a test for EditorWindow.HelpDialog. This cannot be tested directly. 
This example is also a reminder that some files define more than one display 
widget.

I should try template and framework with non-dialog, but the example above 
pretty well convinces me that the framework should be flexible enough.

--
Added file: http://bugs.python.org/file35099/18104-htest3.diff

___
Python tracker 

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



[issue6839] zipfile can't extract file

2014-04-29 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Adam P. I politely asked you to leave the headers alone. Since you ignored 
that, LEAVE THE HEADERS ALONE! If you continue, you will eventually get banned. 

An issue gets dealt with when a volunteer core developer makes it his top 
priority. In the past 24 hours, patches were pushed for 16 different issues, 
but not this one. Sorry, but that is how it is.

--
versions:  -Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue21234] __contains__ and friends should check "is" for all elements first

2014-04-29 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2014-04-29 Thread Masayuki Yamamoto

Masayuki Yamamoto added the comment:

I have solved about compiling _struct module too.
I have no authority of this issues, So please close of issues.

--

___
Python tracker 

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



  1   2   >