[issue16811] email.message.Message flatten dies of list index out of range

2015-11-20 Thread R. David Murray

R. David Murray added the comment:

Please open a new issue and provide a reproducer.  Thanks.

--

___
Python tracker 

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



[issue25679] Fix typo in Doc/reference/executionmodel.rst

2015-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3e723559d9f1 by R David Murray in branch '3.4':
#25679: spelling fix
https://hg.python.org/cpython/rev/3e723559d9f1

New changeset 44ca5e073feb by R David Murray in branch '3.5':
Merge: #25679: spelling fix
https://hg.python.org/cpython/rev/44ca5e073feb

New changeset 14a3cfc477c6 by R David Murray in branch 'default':
Merge: #25679: spelling fix
https://hg.python.org/cpython/rev/14a3cfc477c6

--
nosy: +python-dev

___
Python tracker 

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



[issue25681] Assignment of one element in nested list changes multiple elements

2015-11-20 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue25677] Syntax error caret confused by indentation

2015-11-20 Thread R. David Murray

R. David Murray added the comment:

It appears as though the line is always printed without the leading whitespace, 
but the caret takes the whitespace into account (try indenting the line even 
further).  So the problem is that the caret and the printing of the source line 
in the error message are not consistent about how whitespace is handled.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue25681] Assignment of one element in nested list changes multiple elements

2015-11-20 Thread Yan

New submission from Yan:

Is this the correct behavior?

>>> l=[['']*2]*3
>>> b=[['', ''], ['', ''], ['', '']]
>>> l == b
True
>>> l[0][1]='A'
>>> b[0][1]='A'
>>> l == b
False
>>> l
[['', 'A'], ['', 'A'], ['', 'A']]
>>> b
[['', 'A'], ['', ''], ['', '']]

--
messages: 254978
nosy: ydu
priority: normal
severity: normal
status: open
title: Assignment of one element in nested list changes multiple elements
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue25680] Selector.select() hangs when there is nothing to select

2015-11-20 Thread STINNER Victor

STINNER Victor added the comment:

Your code doesn't make sense. You listen to 0 file descriptor and wait forever 
until you get events, which will never occur. I'm not even sure that it should 
be allowed by the Selector API.

What's the point of your bug report? Does your application really rely on the 
behaviour of the selector when no file descriptor is registered?

The behaviour changes between Linux and OS X because the "default" selector is 
a different selector on Linux (epoll) and OS X (kqueue? select?)

--
nosy: +haypo

___
Python tracker 

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



[issue25681] Assignment of one element in nested list changes multiple elements

2015-11-20 Thread Emanuel Barry

Emanuel Barry added the comment:

Your list `l` actually holds only one list, except three times. When you change 
it, it's reflected in all the lists. It's the equivalent of the following:

>>> x=['', '']
>>> l=[x, x, x]

Makes a bit more sense this way? Either way, yes, this is intentional behaviour.

--
nosy: +ebarry

___
Python tracker 

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



[issue25681] Assignment of one element in nested list changes multiple elements

2015-11-20 Thread Emanuel Barry

Emanuel Barry added the comment:

Another way to fix this would be the following:

>>> l=[[''] * 2 for _ in range(3)]
>>> l
[['', ''], ['', ''], ['', '']]
>>> l[0][1] = "A"
>>> l
[['', 'A'], ['', ''], ['', '']]

The * operator on lists doesn't create new elements, it only adds new 
references to them. A list comprehension will evaluate the expression each 
time, while repetition (the * operator) will only evaluate it once.

--

___
Python tracker 

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



[issue16811] email.message.Message flatten dies of list index out of range

2015-11-20 Thread Jan Malte

Jan Malte added the comment:

seems like this happens still, if the CC header starts with a new line 
character.

Python 3.4.3

--
nosy: +janmalte

___
Python tracker 

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



[issue25680] Selector.select() hangs when there is nothing to select

2015-11-20 Thread Aleksey Kladov

New submission from Aleksey Kladov:

The following hangs on Linux

```Python
>>> import selectors
>>> s = selectors.DefaultSelector()
>>> s.select()
```

On Mac it returns an empty list.

--
messages: 254975
nosy: Aleksey Kladov
priority: normal
severity: normal
status: open
title: Selector.select() hangs when there is nothing to select
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



[issue9504] signal.signal/signal.alarm not working as expected

2015-11-20 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue25646] Distutils and Windows SDK 7.1

2015-11-20 Thread JGoutin

JGoutin added the comment:

Better compatibility for Architectures names conversion between Vcvarsall.bat 
and SetEnv.Cmd for cross compilation.

This seem to work good on classic compilation, but I still have difficulties 
with cross-compilation.

--
title: Distutils and Windows SDK 7.0 / Windows SDK 7.1 / Visual C++ Build Tools 
2015 -> Distutils and Windows SDK 7.1
Added file: http://bugs.python.org/file41097/msvc9compiler.py

___
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-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added new comments.

--

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2015-11-20 Thread R. David Murray

R. David Murray added the comment:

By the way, python3.4 also shows the behavior.  Python2 does not, because 
python2 does not print the caret.  The bug presumably crept in when the caret 
was added.  I'm marking this as easy...presumably the hardest part of fixing it 
is figuring out exactly how the message is constructed :)

--
keywords: +easy
stage:  -> needs patch

___
Python tracker 

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



[issue25681] Assignment of one element in nested list changes multiple elements

2015-11-20 Thread Yan

Yan added the comment:

Thanks for the quick response.
It makes sense to me. I misunderstood the * operator.

--

___
Python tracker 

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



[issue25679] Fix typo in Doc/reference/executionmodel.rst

2015-11-20 Thread R. David Murray

R. David Murray added the comment:

Fixed, thanks.  I wonder if it was one of our german speakers who typed that :)

--
nosy: +r.david.murray
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue25669] unittest.assertEqual() on un-equal types inheriting from collections.Mapping

2015-11-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue25678] int() from a buffer reads past the buffer boundaries

2015-11-20 Thread Eryk Sun

Eryk Sun added the comment:

I just made a quick modification to check that it works. I'm sure you could do 
the same. But here it is anyway.

--
keywords: +patch
Added file: http://bugs.python.org/file41095/issue25678.patch

___
Python tracker 

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



[issue25678] int() from a buffer reads past the buffer boundaries

2015-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is similar to issue24802. The patch for issue24802 was not backported to 
2.7 because affected functions don't accept memoryview in Python 2. Now we have 
an example, and can backport that patch.

--
nosy: +martin.panter, serhiy.storchaka
stage:  -> needs patch

___
Python tracker 

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



[issue25678] int() from a buffer reads past the buffer boundaries

2015-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Do you forgot to add a patch?

--

___
Python tracker 

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



[issue25656] multiprocessing.dummy: pool.map hangs on empty list

2015-11-20 Thread Davin Potts

Davin Potts added the comment:

I am unable to reproduce the behavior you describe using the code you provided. 
 I've tried on both the current Linux Mint release (64-bit) and OS X 10.10 
using the current Python 2.7 release (2.7.10).

Could you be more specific about what platform you are using and the precise 
(2.7.?) version of Python?  Anything else that might be missing from your 
example to help us reproduce?

--
nosy: +davin

___
Python tracker 

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



[issue25672] set SSL_MODE_RELEASE_BUFFERS

2015-11-20 Thread Cory Benfield

Cory Benfield added the comment:

Thanks for the updated info Marc-Andre.

Yeah, while generally speaking OpenSSL doesn't ship betas, it does provide them 
as tarballs. I have a beta of 1.0.2 floating around somewhere on my machine 
that I was using for ALPN testing back in 2014, and so I can speak from 
personal experience and say that people do actually work with betas sometimes. 
On this issue (defending ourselves from a CVE) my instinct is to be 
conservative. However, we should allow later patch releases of OpenSSL 1.0.0 to 
have this optimisation if they're safe.

Therefore, I've uploaded a new patch that does allow for 1.0.0m and later to 
use this optimisation too. It makes the conditional a little more complex, but 
c'est la vie.

--
Added file: http://bugs.python.org/file41094/ssl3.patch

___
Python tracker 

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



[issue25678] int() from a buffer reads past the buffer boundaries

2015-11-20 Thread Eryk Sun

Eryk Sun added the comment:

> Now we have an example, and can backport that patch.

More seriously it's possible to get a buffer over-read using NumPy:

>>> import numpy
>>> int(buffer(numpy.array('123', dtype='c')))
Traceback (most recent call last):
  File "", line 1, in 
 ValueError: invalid literal for int() with base 10: '123\xe1\x18\x7f'

I backported the modification to PyNumber_Int and PyNumber_Long, using 
PyString_FromStringAndSize and PyString_AS_STRING. It works as expected:

Python 2.7.10+ (2.7:5d88c1d413b9+, Nov 20 2015, 04:58:55) 
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more 
information.
>>> int(buffer('123test', 1, 2))
23
[41951 refs]
>>> long(buffer('123test', 1, 2))
23L
[41952 refs]

--
nosy: +eryksun

___
Python tracker 

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



[issue25672] set SSL_MODE_RELEASE_BUFFERS

2015-11-20 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 20.11.2015 12:10, Cory Benfield wrote:
> Yeah, while generally speaking OpenSSL doesn't ship betas, it does provide 
> them as tarballs. I have a beta of 1.0.2 floating around somewhere on my 
> machine that I was using for ALPN testing back in 2014, and so I can speak 
> from personal experience and say that people do actually work with betas 
> sometimes. On this issue (defending ourselves from a CVE) my instinct is to 
> be conservative. However, we should allow later patch releases of OpenSSL 
> 1.0.0 to have this optimisation if they're safe.

Ah, right. For new major release versions such as 1.0.1 or 1.0.2
they do ship betas, but historically they have often introduced
new features in their abcde... level releases without doing
betas for those first - that's what I was thinking of :-)

> Therefore, I've uploaded a new patch that does allow for 1.0.0m and later to 
> use this optimisation too. It makes the conditional a little more complex, 
> but c'est la vie.

LGTM

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

--

___
Python tracker 

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



[issue25646] Distutils and Windows SDK 7.0 / Windows SDK 7.1 / Visual C++ Build Tools 2015

2015-11-20 Thread JGoutin

JGoutin added the comment:

I updated the file.

I did some new tests with cross compilation and I see that the "libpath" 
environment variable may be missing in some case.
Fortunately, this one is not used in the following of the code. So I set it as 
optional result for "query_vcvarsall".

--
Added file: http://bugs.python.org/file41093/msvc9compiler.py

___
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-20 Thread Martin Panter

Martin Panter added the comment:

Thanks for your testing Serhiy. I can reproduce this on 32-bit Linux (also by 
building with CC="gcc -m32"). It is easy to produce the bug with flush(), but 
with Decompress.decompress() it would need over 2 GiB of memory and data to 
expand the buffer enough to trigger the error.

>>> zlib.decompressobj().flush(sys.maxsize + 1)
SystemError: Negative size passed to PyBytes_FromStringAndSize

In zlib-Py_ssize_t.patch, I added the bigmem tests, but I am not able to 
actually test them. The gzip test would require 8 GiB of memory. I also changed 
the converter to Py_ssize_t to fix this latest bug.

--
Added file: http://bugs.python.org/file41096/zlib-Py_ssize_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-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, I found yet one bug.

>>> zlib.decompress(zlib.compress(b'abcd'), 0, sys.maxsize+1)
Traceback (most recent call last):
  File "", line 1, in 
SystemError: Negative size passed to PyBytes_FromStringAndSize

There are similar bugs in decompressor's methods decompress() and flush() but 
it is hard to reproduce them.

The maximal length value should be bounded not only with UINT_MAX, but with 
PY_SSIZE_T_MAX too.

I would merge sval and uval into one variable of type Py_ssize_t.

--

___
Python tracker 

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



[issue25678] int() from a buffer reads past the buffer boundaries

2015-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you backport full patch, with tests? And compile() is affected too:

>>> compile(buffer("123\0test", 1, 2), '', 'exec')
 at 0xb70c5800, file "", line 1>
>>> compile(buffer("123test", 1, 2), '', 'exec')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: compile() expected string without null bytes

--

___
Python tracker 

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



[issue25612] nested try..excepts don't work correctly for generators

2015-11-20 Thread Guido van Rossum

Guido van Rossum added the comment:

I'm sorry, I'm no help here -- I don't know how __context__ is
supposed to work. :-(

On Fri, Nov 20, 2015 at 8:14 AM, Yury Selivanov  wrote:
>
> Yury Selivanov added the comment:
>
> Martin, you might be right here.  Guido, do you think it's OK that SubError 
> doesn't have MainError in its __context__? 
> http://bugs.python.org/issue25612#msg254576
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue25612] nested try..excepts don't work correctly for generators

2015-11-20 Thread Yury Selivanov

Yury Selivanov added the comment:

Anyways, here's a separate issue for the __context__ problem: 
http://bugs.python.org/issue25683

--

___
Python tracker 

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



[issue25660] tabs don't work correctly in python repl

2015-11-20 Thread Yury Selivanov

Yury Selivanov added the comment:

Can someone try the patch?  I'm fairly confident it should work, and it'd be 
great to have it fixed in 3.5.1.

--
priority: high -> release blocker

___
Python tracker 

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



[issue25683] __context__ for yields inside except clause

2015-11-20 Thread Yury Selivanov

New submission from Yury Selivanov:

In the below snippet, SubError will propagate with __context__ set to None, 
instead of MainError.  Maybe this isn't a bug?

class MainError(Exception): pass
class SubError(Exception): pass

def main():
try:
raise MainError()
except MainError:
yield

coro = main()
coro.send(None)
coro.throw(SubError())

--
components: Interpreter Core
messages: 254994
nosy: benjamin.peterson, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: __context__ for yields inside except clause
type: behavior
versions: Python 3.3, 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



[issue25665] typing.NamedTuple instances are not picklable.

2015-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4f30b0d47c24 by Serhiy Storchaka in branch '3.5':
Issue #25665: Test pickling with all protocols in test_typing.
https://hg.python.org/cpython/rev/4f30b0d47c24

New changeset 9e65015582a5 by Serhiy Storchaka in branch 'default':
Issue #25665: Test pickling with all protocols in test_typing.
https://hg.python.org/cpython/rev/9e65015582a5

--

___
Python tracker 

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



[issue25612] nested try..excepts don't work correctly for generators

2015-11-20 Thread Yury Selivanov

Yury Selivanov added the comment:

Guido, Martin, I've just posted to python-dev about this ticket.  Let's see 
what others think.

--

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2015-11-20 Thread R. David Murray

Changes by R. David Murray :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue25665] typing.NamedTuple instances are not picklable.

2015-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The test tests pickling only with default protocol. It would be better to test 
pickling with all supported protocols.

Why special TestCase methods to check for and report failures are not used in 
test_typing?

--
nosy: +serhiy.storchaka
Added file: http://bugs.python.org/file41098/test_typing_pickle.patch

___
Python tracker 

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



[issue25682] __package__ not set to None under pdb in Python 3

2015-11-20 Thread Keith Prussing

New submission from Keith Prussing:

When a module is run under pdb in Python 3, __package__ is set to the empty 
string instead of None.  The attached minimum working example depicts this 
behavior.  The results are summarized in the following table.

=== == ==
Command  Py 2   Py 3
=== == ==
 python  None   None
 python -m'' ''
 python -m pdb   None''
 pdb None''
=== == ==

The behavior I expected was for the Python executable to treat the input file 
as a script and not a module.  My rationale is that pdb is loaded as the 
executing module that accepts a script as its argument.  Per the help, only one 
-m option is allowed when launching python.

--
components: Extension Modules
files: mwe.py
messages: 254989
nosy: Keith Prussing
priority: normal
severity: normal
status: open
title: __package__ not set to None under pdb in Python 3
type: behavior
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file41099/mwe.py

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2015-11-20 Thread Michael Layzell

Michael Layzell added the comment:

This should fix the problem. It appears as though the indentation was being 
stripped from the program text differently depending on how the error was 
produced. In the case of a syntax error from the parser, the indentation was 
maintained until it was printed (in print_error_text, correctly handling the 
offset value). In contrast, errors from the AST were created with 
PyErr_ProgramText*, which would also strip the indentation (without mutating 
any offset value). 

This patch causes the second code path to not strip whitespace. This shouldn't 
cause I problem (I think), as it seems to only be used to instantiate 
SyntaxErrors.

--
keywords: +patch
Added file: http://bugs.python.org/file41100/cpython25677.patch

___
Python tracker 

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



[issue25646] Distutils and Windows SDK 7.1

2015-11-20 Thread Steve Dower

Steve Dower added the comment:

I appreciate the enthusiasm, but be aware that at best this will show up in 
Python 3.4.4 only, and the timeline for that is very short.

You would have a better chance if you were to make this a monkey-patch via 
setuptools. See 
https://bitbucket.org/pypa/setuptools/src/tip/setuptools/msvc9_support.py for 
where we added this for the compiler for 2.7.

--

___
Python tracker 

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



[issue25665] typing.NamedTuple instances are not picklable.

2015-11-20 Thread Guido van Rossum

Guido van Rossum added the comment:

Serhiy, feel free to commit that patch. I was just being lazy. Also, I was 
using assert instead of self.assertEquals etc. out of laziness (and because at 
Dropbox people have got the py.test religion and prefer to use assert 
statements -- but I'm not keen to do this for the stdlib).

--

___
Python tracker 

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



[issue25612] nested try..excepts don't work correctly for generators

2015-11-20 Thread Yury Selivanov

Yury Selivanov added the comment:

Martin, you might be right here.  Guido, do you think it's OK that SubError 
doesn't have MainError in its __context__? 
http://bugs.python.org/issue25612#msg254576

--

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2015-11-20 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +haypo, serhiy.storchaka

___
Python tracker 

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



[issue25625] "chdir" Contex manager for pathlib

2015-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I agree with desbma.

--
nosy: +serhiy.storchaka
resolution:  -> rejected
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



[issue25678] int() from a buffer reads past the buffer boundaries

2015-11-20 Thread Eryk Sun

Eryk Sun added the comment:

> I think the tests should be using buffer(..., a, b) instead.

Thanks, you're right. :)

--
Added file: http://bugs.python.org/file41102/issue25678_3.patch

___
Python tracker 

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



[issue25678] int() from a buffer reads past the buffer boundaries

2015-11-20 Thread Sven Berkvens-Matthijsse

Sven Berkvens-Matthijsse added the comment:

(Please excuse my horrible spelling in my last message, I'm apparently more 
tired than I care to admit)

--

___
Python tracker 

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



[issue25625] "chdir" Contex manager for pathlib

2015-11-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

What's the relation with subprocess.Popen ?

--
nosy: +matrixise

___
Python tracker 

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



[issue25678] int() from a buffer reads past the buffer boundaries

2015-11-20 Thread Sven Berkvens-Matthijsse

Sven Berkvens-Matthijsse added the comment:

Eryk, could the tests in the path file that you posted regarding int() and 
float() be incorrect in the sense that buffer(...)[a:b] returns a str() and not 
another buffer() (and will thus always be NUL terminated and not exhibit the 
problem, whether or not the C source have been patch)? I think the tests should 
be using buffer(..., a, b) instead.

May I say that I am very, very impressed by the speed with which this has been 
picked up? Thank you all for your impressive work!

--

___
Python tracker 

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



[issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active.

2015-11-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

"not responsive to new commands" means that a statements can be typed but 
 is ignored and no execution takes place.

--

___
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-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue25677] Syntax error caret confused by indentation

2015-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Would be nice to have a test.

--
stage: patch review -> test needed

___
Python tracker 

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



[issue25671] Fix venv activate.fish to maintain $status

2015-11-20 Thread Nathan West

Nathan West added the comment:

Fixed an issue where fish_prompt was returning before calling _old_fish_prompt

--
Added file: http://bugs.python.org/file41103/patch.diff

___
Python tracker 

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



[issue25678] int() from a buffer reads past the buffer boundaries

2015-11-20 Thread Eryk Sun

Changes by Eryk Sun :


Added file: http://bugs.python.org/file41101/issue25678_2.patch

___
Python tracker 

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



[issue25625] "chdir" Contex manager for pathlib

2015-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> What's the relation with subprocess.Popen ?

In the context of subprocesses there is better way to run a program in 
specified working directory that temporary change current working directory in 
parent process.

--

___
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-20 Thread Eric Snow

Eric Snow added the comment:

I agree with Raymond.

--

___
Python tracker 

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



[issue25684] ttk.OptionMenu radiobuttons aren't unique between two instances of OptionMenu

2015-11-20 Thread Bryan Oakley

Changes by Bryan Oakley :


--
type:  -> behavior

___
Python tracker 

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



[issue25684] ttk.OptionMenu radiobuttons aren't unique between two instances of OptionMenu

2015-11-20 Thread Bryan Oakley

New submission from Bryan Oakley:

Original issue was brought to my attention by this SO question: 
http://stackoverflow.com/questions/33831289/ttk-optionmenu-displaying-check-mark-on-all-menus

The ttk.OptionMenu uses radiobuttons for the dropdown menu. However, because it 
doesn't set the `variable` attribute, they all get the default. If you have two 
or more OptionMenu instances, all of the radiobuttons are tied together. If you 
select the first item in the first OptionMenu, and the second item in the 
second OptionMenu, the dropdown menu for both will show the second item checked.

The solution is to add `variable=self._variable` when creating the menu 
radiobutton items.

--
components: Tkinter
messages: 255001
nosy: Bryan.Oakley
priority: normal
severity: normal
status: open
title: ttk.OptionMenu radiobuttons aren't unique between two instances of 
OptionMenu
versions: Python 2.7, Python 3.2, Python 3.3, 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



[issue25684] ttk.OptionMenu radiobuttons aren't unique between two instances of OptionMenu

2015-11-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
stage:  -> needs patch
versions:  -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



[issue25625] "chdir" Contex manager for pathlib

2015-11-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

> In the context of subprocesses there is better way to run a program in 
> specified working directory that temporary change current working directory 
> in parent process.

Ok, haven't read the last line of the description. thanks for the
clarification.
-- 
Stéphane Wirtel - http://wirtel.be - @matrixise

--

___
Python tracker 

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



[issue25644] Unable to open IDLE on Windows 10 with Python 2.7.10

2015-11-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

By 'active Python distribution', do you mean 'ActiveState Python distribution'? 
 If so, you should talk with ActiveState.  The 2.7.10 64 bit PSF installer 
works fine on my machine.  Was Win 7, now Win 10.  In any case, try "python -m 
idlelib" at a command line and see what error message you get.

--
components: +Installation, Windows
nosy: +paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware

___
Python tracker 

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



[issue25678] int() from a buffer reads past the buffer boundaries

2015-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Committed after fixing some details. Thank you Eryk Sun.

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



[issue25685] Inefficiency with SocketHandler - may send log record message string twice in pickled data structure

2015-11-20 Thread Marvin Greenberg

New submission from Marvin Greenberg:

In logging.handlers.SocketHandler.makePickle code was added for issue 14436 
that replaces the 'msg' in the log record dict with the formatted message.  But 
if an earlier handler already formatted the message, it will have been added to 
the log record with key 'message'.  In this case the identical message will be 
sent across the wire twice in the pickled data.

The patch simply deletes the 'message' entry from the dict.  More involved 
changes (like reusing record.message instead of calling getMessage) probably 
not useful.

--
components: Library (Lib)
files: handlers.py.patch
keywords: patch
messages: 255011
nosy: Marvin Greenberg
priority: normal
severity: normal
status: open
title: Inefficiency with SocketHandler - may send log record message string 
twice in pickled data structure
type: resource usage
versions: Python 3.5
Added file: http://bugs.python.org/file41104/handlers.py.patch

___
Python tracker 

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



[issue25685] Inefficiency with SocketHandler - may send log record message string twice in pickled data structure

2015-11-20 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +vinay.sajip
stage:  -> patch review
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



[issue25644] Unable to open IDLE on Windows 10 with Python 2.7.10

2015-11-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

'Crash' means getting a Windows 'Application stopped running' box as opposed to 
Python merely stopping with no error message when started from an icon.

--
type: crash -> behavior
versions: +Python 2.7

___
Python tracker 

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



[issue25678] int() from a buffer reads past the buffer boundaries

2015-11-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
stage: needs patch -> patch review

___
Python tracker 

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



[issue24802] int and float constructing from non NUL-terminated buffer

2015-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3ef7d1af5195 by Serhiy Storchaka in branch '2.7':
Issue #25678: Copy buffer objects to null-terminated strings.
https://hg.python.org/cpython/rev/3ef7d1af5195

--

___
Python tracker 

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



[issue25637] Move non-collections-related ABCs out of collections.abc

2015-11-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I would not like to have, say, 20 namespaces, some with just one ABD, such as 
functools.abc.Callable.  I might have preferred abc.collections to 
collections.abc, etc.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue25678] int() from a buffer reads past the buffer boundaries

2015-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3ef7d1af5195 by Serhiy Storchaka in branch '2.7':
Issue #25678: Copy buffer objects to null-terminated strings.
https://hg.python.org/cpython/rev/3ef7d1af5195

--
nosy: +python-dev

___
Python tracker 

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



[issue25671] Fix venv activate.fish to maintain $status

2015-11-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

I am a user of fish.

The use case is just execute python -mvenv demo 
source demo/bin/activate.fish

check the status and deactivate the virtualenv ?

do you confirm ?

Thank you

--
nosy: +matrixise

___
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-20 Thread Ethan Furman

Ethan Furman added the comment:

Other changeset f4b495ceab17 in default branch.

--

___
Python tracker 

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



[issue25686] Don't use distutils in test_shutil

2015-11-20 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The distutils package is used in test_shutil to search and run external 
archivers. But using distutils can have side effects (see issue25607).

Proposed patch replaces distutils with standard functions for searching 
executables and running command, shutil.which() and subprocess.check_call().

--
components: Tests
files: test_shutil_no_distutils.patch
keywords: patch
messages: 255023
nosy: eric.araujo, serhiy.storchaka, tarek
priority: normal
severity: normal
stage: patch review
status: open
title: Don't use distutils in test_shutil
type: enhancement
versions: Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file41105/test_shutil_no_distutils.patch

___
Python tracker 

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



[issue25686] Don't use distutils in test_shutil

2015-11-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Works fine on my laptop with 3.6. and the code is right

--
nosy: +matrixise

___
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-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 276cf69b911e by Ethan Furman in branch '3.5':
Close issue25594: advise against accessing Enum members from other members
https://hg.python.org/cpython/rev/276cf69b911e

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-20 Thread Brett Cannon

Brett Cannon added the comment:

The commands I used are in the notebook for each implementation and you can get 
the same result with `python3 perf.py -b etree python2 python3`.

--

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry Brett.

How tests were ran? There are two implementations of ElementTree, accelerated 
and non-accelerated. xml.etree.ElementTree by default is accelerated in Python 
3, but non-accelerated in Python 2.

$ python2.7 bm_elementtree.py -n 7 --take_geo_mean 
0.463665158795
$ python2.7 bm_elementtree.py -n 7 --take_geo_mean 
--etree-module=xml.etree.ElementTree
5.46309932568
$ python3.4 bm_elementtree.py -n 7 --take_geo_mean 
--etree-module=xml.etree.ElementTree
0.813397633467649
$ python3.4 bm_elementtree.py -n 7 --take_geo_mean 
--etree-module=xml.etree.ElementTree --no-accelerator
5.31174765817514

If run the test with the same options --etree-module=xml.etree.ElementTree, it 
will use accelerated implementation in Python 3 and non-accelerated in Python 2.

--

___
Python tracker 

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



[issue25678] int() from a buffer reads past the buffer boundaries

2015-11-20 Thread Sven Berkvens-Matthijsse

New submission from Sven Berkvens-Matthijsse:

Calling int() or long() on a buffer() object in Python 2.7 does not do the 
right thing. The following code snippet:

buf = buffer("123test", 1, 2)
print buf
print int(buf)

does not do what I would expect (that it print "23" twice). Instead, it prints 
"23" once and then throws an exception:

ValueError: invalid literal for int() with base 10: '23test'

This is caused by Objects/abstract.c function int_from_string(), which gets 
passed the length of the string but does not actually use that information to 
limit what part is parsed from the string. It only uses it to check for 
embedded NUL bytes. The real culprit is probably PyInt_FromString() which does 
not take a length indicator.

--
components: Interpreter Core
messages: 254958
nosy: svenberkvens
priority: normal
severity: normal
status: open
title: int() from a buffer reads past the buffer boundaries
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue25557] Optimize LOAD_NAME bytecode

2015-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Victor.

--

___
Python tracker 

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



[issue25672] set SSL_MODE_RELEASE_BUFFERS

2015-11-20 Thread Cory Benfield

Cory Benfield added the comment:

Good idea Benjamin. I've uploaded a second patch that adjusts the check to be a 
runtime one, rather than a compiled one.

--
Added file: http://bugs.python.org/file41091/ssl2.patch

___
Python tracker 

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



[issue25669] unittest.assertEqual() on un-equal types inheriting from collections.Mapping

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



[issue25669] unittest.assertEqual() on un-equal types inheriting from collections.Mapping

2015-11-20 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
versions: +Python 3.6 -Python 2.7

___
Python tracker 

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



[issue25672] set SSL_MODE_RELEASE_BUFFERS

2015-11-20 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

The release buffer mode bugs were fixed in 1.0.0m and 1.0.1h:

https://openssl.org/news/vulnerabilities.html#y2014

CVE-2014-0198 (OpenSSL advisory) 21st April 2014:
A flaw in the do_ssl3_write function can allow remote attackers to cause a 
denial of service via a NULL pointer dereference. This flaw only affects 
OpenSSL 1.0.0 and 1.0.1 where SSL_MODE_RELEASE_BUFFERS is enabled, which is not 
the default and not common.

Fixed in OpenSSL 1.0.1h (Affected 1.0.1g, 1.0.1f, 1.0.1e, 1.0.1d, 
1.0.1c, 1.0.1b, 1.0.1a, 1.0.1)
Fixed in OpenSSL 1.0.0m (Affected 1.0.0l, 1.0.0k, 1.0.0j, 1.0.0i, 
1.0.0g, 1.0.0f, 1.0.0e, 1.0.0d, 1.0.0c, 1.0.0b, 1.0.0a, 1.0.0)

CVE-2010-5298 (OpenSSL advisory) 8th April 2014:
A race condition in the ssl3_read_bytes function can allow remote attackers 
to inject data across sessions or cause a denial of service. This flaw only 
affects multithreaded applications using OpenSSL 1.0.0 and 1.0.1, where 
SSL_MODE_RELEASE_BUFFERS is enabled, which is not the default and not common.

Fixed in OpenSSL 1.0.1h (Affected 1.0.1g, 1.0.1f, 1.0.1e, 1.0.1d, 
1.0.1c, 1.0.1b, 1.0.1a, 1.0.1)
Fixed in OpenSSL 1.0.0m (Affected 1.0.0l, 1.0.0k, 1.0.0j, 1.0.0i, 
1.0.0g, 1.0.0f, 1.0.0e, 1.0.0d, 1.0.0c, 1.0.0b, 1.0.0a, 1.0.0)

PS: OpenSSL normally doesn't issue betas. All their releases are final. The 
numbering scheme is a bit weird - perhaps they'll change to a more common one 
with 1.1 (this will have a beta cycle): 
https://openssl.org/policies/releasestrat.html

--
nosy: +lemburg

___
Python tracker 

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



[issue25679] Fix typo in Doc/reference/executionmodel.rst

2015-11-20 Thread Novice Live

New submission from Novice Live:

> 4. Execution model
> 4.1. Structure of a programm

You see.

--
assignee: docs@python
components: Documentation
files: executionmodel-typo.patch
keywords: patch
messages: 254962
nosy: docs@python, n0vicelive
priority: normal
severity: normal
status: open
title: Fix typo in Doc/reference/executionmodel.rst
Added file: http://bugs.python.org/file41092/executionmodel-typo.patch

___
Python tracker 

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



[issue25660] tabs don't work correctly in python repl

2015-11-20 Thread Martin Panter

Martin Panter added the comment:

Didn’t mean to adjust priority

--
priority: high -> release blocker

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The slowing down Python 3 can be related to adding XMLPullParser (issue17741).

--

___
Python tracker 

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



[issue21162] code in multiprocessing.pool freeze if inside some code from scikit-learn (and probably liblinear) executed on ubuntu 12.04 64 Bit

2015-11-20 Thread Davin Potts

Davin Potts added the comment:

I'm going ahead with closing this issue as it originates outside of 
multiprocessing and Python itself as well as being highly dependent upon 
specific combinations of build options and versions of 3rd party libraries 
(such as ATLAS).

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



[issue25660] tabs don't work correctly in python repl

2015-11-20 Thread Martin Panter

Martin Panter added the comment:

Sorry to throw a potential spanner in the works, but I think this introduces a 
dependence on the readline module. Consider what happens when the Completer 
class is used but Readline is not, or even if the “readline” could not be 
imported (see bottom of rlcompleter.py).

Maybe there is a way around this, but it might involve more complicated code.

--
priority: release blocker -> high
stage:  -> patch review

___
Python tracker 

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



[issue25660] tabs don't work correctly in python repl

2015-11-20 Thread Yury Selivanov

Yury Selivanov added the comment:

> Sorry to throw a potential spanner in the works, but I think this introduces 
> a dependence on the readline module. Consider what happens when the Completer 
> class is used but Readline is not, or even if the “readline” could not be 
> imported (see bottom of rlcompleter.py).

Hm... This module provides a "Completer" class **specifically** for readline, 
as its documentation (and name!) indicates.

--

___
Python tracker 

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



[issue25485] Add a context manager to telnetlib.Telnet

2015-11-20 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Need review for this new patch.

* Add test
* Improve the documentation
* Update the Misc/NEWS

--
Added file: http://bugs.python.org/file41106/issue25485-3.patch

___
Python tracker 

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



[issue24455] IDLE debugger causes crash if not quitted properly before next run

2015-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f51467273d3b by Terry Jan Reedy in branch '2.7':
Issue #24455: Prevent IDLE from hanging when a) closing the shell while the
https://hg.python.org/cpython/rev/f51467273d3b

New changeset 1ddd77a5e8c8 by Terry Jan Reedy in branch '3.4':
Issue #24455: Prevent IDLE from hanging when a) closing the shell while the
https://hg.python.org/cpython/rev/1ddd77a5e8c8

--
nosy: +python-dev

___
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-20 Thread Martin Panter

Martin Panter added the comment:

New patch addressing comments. I used the undocumented API _PyLong_FromNbInt() 
to call __int__() rather than __index__().

--
Added file: http://bugs.python.org/file41107/zlib-Py_ssize_t.2.patch

___
Python tracker 

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



[issue15347] IDLE - does not close if the debugger was active

2015-11-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

See #15348 for result of fix-mainloop2.patch on Windows.

--

___
Python tracker 

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



[issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active.

2015-11-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The patch for #24455 replaced root.mainloop,.quit with tcl vwait, set as the 
suspend/resume mechanism for Debugger.interation.  After this, closing the 
shell as described in #15347, or the debugger with [x] as described here, on my 
Windows 10 machine, resulted in

  File "F:\Python\dev\34\lib\idlelib\Debugger.py", line 20, in user_line
self.gui.interaction(message, frame)
_tkinter.TclError: invalid command name ".86740760.86830984.86827736"

instead of a hang.  This is an improvement as the Exception can be caught and 
ignored.  People testing of other systems did not report this.  With TclError 
caught, closing the debugger with [x] then produced

  File "F:\Python\dev\34\lib\idlelib\Debugger.py", line 21, in user_line
self.gui.interaction(message, frame)
RuntimeError: Unknown object id: 'gui_adapter'

I applied the patch with Runtime also caught and ignored.

The exceptions did not occur when [Quit] was pressed first.  So I think [x] 
should do whatever Quit does before closing.

--
assignee: roger.serwy -> terry.reedy
stage: patch review -> needs patch

___
Python tracker 

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



[issue24455] IDLE debugger causes crash if not quitted properly before next run

2015-11-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Patch does two things.  On startup, check if debugger is already active and if 
it is, send 'finish' signal to existing interaction and try again after .1 
second. This is the part aimed at the particular problem of this issue.

During active running, use the tcl vwait mechanism 
https://www.tcl.tk/man/tcl/TclCmd/vwait.htm intended for suspending and 
resuming a function without blocking the event loop.  Using root.mainloop and 
root.quit for this purpose was a hack that sort of worked but created the 
shutdown problems in #15347 and #15348.

To further explain the suspend/resume ping-ponging of control: IDLE's bebugger 
is based on the bdb.Bdb debug engine.  User interaction is added by overriding 
Bdb.user_xyz methods.  The overrides tell Bdb what to do after they return by 
calling Bdb.set_uvw methods.  idlelib.Debugger.Idb defines .user_line and 
.user_exception, which are called when the debugger stops on a line or with an 
exception.  Both end by calling Debugger.Debugger.interaction.  This method 
updates the gui and activates the buttons.  It must then pause (now with vwait 
waitvar) and allow button presses (and other IDLE gui events) to be handled 
*without* returning.  (The stdlib pdb can instead just call "cmd = 
input('pdb>')" and block waiting for user input.) When a debugger button is 
pressed, a Bdb.set_uvw method is called and waitvar is set.  Then .interaction 
resumes, disables the buttons, and returns so Bdb can do the action requested.  
Thanks Mark for working this out and finding the proper pause/resume method.

On my Windows 10 machine, at least, the patch did not completely solve the 
hang-on-close issues.  One or two exceptions are raised instead of hanging. 
This is improvement. Details are on #15348.  Pending a better solution, I added 
try-except around the gui.interaction call to ignore the exception.

After numerous tests (at least 10) where I started and either stopped the 
debugger or restarted from the editor, I encountered a hang. But this was not 
something I could reproduce, and Restart Shell worked, whereas it had not 
previously.

--
assignee:  -> terry.reedy
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



[issue15347] IDLE - does not close if the debugger was active

2015-11-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Git patch does not apply because header does not have full paths.

diff --git a/Debugger.py b/Debugger.py
index e2014d1..9efe6fa 100644
--- a/Debugger.py
+++ b/Debugger.py

versus

diff -r ed694938c61a Lib/idlelib/Debugger.py
--- a/Lib/idlelib/Debugger.py   Tue Sep 22 13:08:42 2015 +0300
+++ b/Lib/idlelib/Debugger.py   Tue Sep 22 20:36:09 2015 -0700

This is also why no *review* link after the *edit* link on right.
I will go ahead and manually edit the file.

--
assignee:  -> terry.reedy
stage:  -> commit review
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



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

2015-11-20 Thread Martin Panter

Martin Panter added the comment:

Actually it did make an existing bug a bit worse. The bug is triggered with 
valid sizes greater than LONG_MAX, due to an exception not being cleared, and 
my change made this bug more dramatic, turning the OverflowError into a crash. 
This new patch should fix that.

I’m now looking at adding the other tests that require allocating lots of 
memory.

--
Added file: http://bugs.python.org/file41090/zlib-size_t.2.patch

___
Python tracker 

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



[issue25670] ast.NodeTransformer: remove duplicate getattr()

2015-11-20 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue25557] Optimize LOAD_NAME bytecode

2015-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c35d65c9ded3 by Victor Stinner in branch 'default':
Issue #25557: Refactor _PyDict_LoadGlobal()
https://hg.python.org/cpython/rev/c35d65c9ded3

--
nosy: +python-dev

___
Python tracker 

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



[issue25557] Optimize LOAD_NAME bytecode

2015-11-20 Thread STINNER Victor

STINNER Victor added the comment:

Since LOAD_NAME is rare, I don't think that it's worth to optimize it.

I pushed a partial version of pydict_loadname-2.patch to add comments to the 
code.

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



[issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active.

2015-11-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

(I was wrong about seeing the exception when closing the shell.)

A major difference between [Quit] and [x] is that [Quit] stops the running 
program whereas [x] closes the visible gui but leaves the program to run 
through to the end, as though the [go] button were pressed.  I added 'as e' and 
'print(e)' to the try except and there are multiple RuntimeErrors, 1 per line 
traced by [step], including IDLE code for input() and print() calls, with [x], 
but none with [quit] first.

The TclError only occurs in 3.4.3, not in 2.7.10.

The string 'gui_adapter' comes from RemoteDebugger.py, line 28.
  gui_adap_oid = "gui_adapter"
It represents the debugger window in the idle process.  My interpretation of 
the traceback is that when
  self.gui.interaction(message, frame)
is executed in the user process, the interaction call actually calls 
debugger.interaction in the idle process via 
RemoteDebugger.GUIProxy.interaction.  The latter does not appear in the 
traceback because IDLE rpc calls are deleted from tracebacks before they are 
printed.

Replacing self.abort_loop with self.quit (which calls abort_loop) eliminates 
the Runtime exceptions, as the backend debugger in the user process is stopped 
before the idle process frontend gui disappears.

However, self.idb.set_quit (within self.quit) raises 
  AttributeError: 'Idb' object has no attribute 'botframe'
if one attempts to immediately close the debugger window (with menu or button) 
before it is activated.  It is then left as a zombie window. The exception is 
in the Tkinter callback, so it is printed to console rather than the IDLE 
shell, and included RemoteDebugger and rpc calls, but not the line in 
Bdb.set_quit(self), 
self.stopframe = self.botframe
that actually raised the exception.  So the call must either be conditioned or 
the exception caught.  I decided to go with latter now.

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



[issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active.

2015-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 427ad0ede016 by Terry Jan Reedy in branch '2.7':
Issue 15348: Stop debugger engine (normally in user process)
https://hg.python.org/cpython/rev/427ad0ede016

New changeset 4eae64a9cd26 by Terry Jan Reedy in branch '3.4':
Issue 15348: Stop debugger engine (normally in user process)
https://hg.python.org/cpython/rev/4eae64a9cd26

--
nosy: +python-dev

___
Python tracker 

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



[issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active.

2015-11-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I don't like the idea of [x] flashing quit instead of closing.  This patch, on 
top of the one for #24455, may not be perfect, but the two are definite 
improvements.  Unless I see something critically bad first, I want them in the 
upcoming releases.  Mark claims that his second patch for #15347 improves 
behavior for no subprocess.  But that was without this patch.

There is one situation not mentioned that I know is still glitchy.  Debug a 
program with input(prompt).  Run up to and including that line.  While the 
program is waiting for input, close with [x].  The shell prints '[DEBUG OFF]' 
after the prompt and '>>> ' on the next line.  But that is a fake prompt in 
that a statement entered will not be executed, but will be seen as the response 
to the pending input().

While there is a pending input (or any other blocked statement), the [Quit] 
button is disabled.  The close method should detect this 'program executing' 
condition and ask whether to kill it, just as if one tries to close IDLE under 
the same condition.

I am leaving this open, at least for now, at least for this.

--

___
Python tracker 

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



  1   2   >