[issue27396] Change default filecmp.cmp shallow option

2016-06-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The docs are already pretty clear.  In general, there isn't a defense against a 
naive use of anything in the computing world.  We can write docs but can't make 
a person read them and realize that their pre-existing mental model is off base.

Sorry, but I'm going to close this. The module is doing what it was designed 
for and what it want documented to do.  It has mostly had a successful history 
and I don't see anything worth churning the API.  

I think you will just have to chalk this up to experience :-)

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



[issue27396] Change default filecmp.cmp shallow option

2016-06-26 Thread Gabriel Hackebeil

Gabriel Hackebeil added the comment:

All good points. Perhaps further emphasis on this in the documentation would be 
helpful to. As it stands, this module is a dangerous one for a naive user (like 
me) to stumble across.

Maybe introducing an “exact” or “slow" diff function to the module would help 
distinguish that behavior from the cmp function. One could then deprecate the 
shallow keyword for the cmp function.

Gabe

> On Jun 26, 2016, at 9:48 PM, Raymond Hettinger  wrote:
> 
> 
> Raymond Hettinger added the comment:
> 
> Changing an existing API is painful, especially so for cases like this that 
> have existed for a very, very long time.  Such as a change would likely have 
> a detrimental effect on long-standing code relying on the existing behavior.
> 
> The module itself is all about "comparing files efficiently" and most of its 
> code is about bypassing direct file reads.  The original purpose of the 
> module seems to be about providing shallow compares, so your suggested change 
> goes directly against the grain of the module and its original intention of 
> being "fast by default".  The docs are very clear about there being 
> trade-offs between correctness and time.
> 
> If the module were just being released, you might have a good case (in 
> general, the safest options should be the default); however, the time for 
> this decision was a very long time ago.   This ship has already sailed.
> 
> --
> nosy: +rhettinger
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue27255] More opcode predictions

2016-06-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The second version of the patch mostly looks fine.  

The prediction from DUP_TOP_TWO to BINARY_SUBSCR is questionable.  Because 
compile.c only uses it one context, the prediction rate is 100%; however, there 
is no intrinsic relationship between the two opcodes, so the prediction is 
happenstance and fragile.  Reconsider whether you really want this prediction 
pairing.

--
assignee: rhettinger -> serhiy.storchaka

___
Python tracker 

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



[issue27173] Modern Unix key bindings for IDLE

2016-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I can't reproduce your issue (or understand it correctly). Could you please 
show the [Keys] section in your config-main.cfg?

--

___
Python tracker 

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



[issue27397] email.message.Message.get_payload(decode=True) raises AssertionError that "should never happen"

2016-06-26 Thread Claudiu Saftoiu

Claudiu Saftoiu added the comment:

See attached another file with more test cases.

--
Added file: http://bugs.python.org/file43557/bugreport_moretests.py

___
Python tracker 

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



[issue27397] email.message.Message.get_payload(decode=True) raises AssertionError that "should never happen"

2016-06-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> r.david.murray
nosy: +r.david.murray
priority: normal -> high

___
Python tracker 

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



[issue27380] IDLE: add base Query dialog with ttk widgets

2016-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You can use True and False instead of TRUE and FALSE. You can import constants 
with "from tkinter.constants import *". The benefit of using constants instead 
of string literals is early failing in case of typo.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue27397] email.message.Message.get_payload(decode=True) raises AssertionError that "should never happen"

2016-06-26 Thread Claudiu Saftoiu

New submission from Claudiu Saftoiu:

I'm processing Yahoo! Groups backup archives, and came across an email message 
which causes the `.get_payload(decode=True)` step to raise an AssertionError. 
Particularly, the following exception is raised in 
`lib/python3.5/email/_encoded_words.py`, line 124:

# This should never happen.
raise AssertionError("unexpected binascii.Error")

Attached is the file which, when run under Python 3.5.1, causes the exception 
to be raised.

--
components: Library (Lib)
files: bugreport.py
messages: 269346
nosy: Claudiu Saftoiu
priority: normal
severity: normal
status: open
title: email.message.Message.get_payload(decode=True) raises AssertionError 
that "should never happen"
type: crash
versions: Python 3.5
Added file: http://bugs.python.org/file43556/bugreport.py

___
Python tracker 

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



[issue27396] Change default filecmp.cmp shallow option

2016-06-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Changing an existing API is painful, especially so for cases like this that 
have existed for a very, very long time.  Such as a change would likely have a 
detrimental effect on long-standing code relying on the existing behavior.

The module itself is all about "comparing files efficiently" and most of its 
code is about bypassing direct file reads.  The original purpose of the module 
seems to be about providing shallow compares, so your suggested change goes 
directly against the grain of the module and its original intention of being 
"fast by default".  The docs are very clear about there being trade-offs 
between correctness and time.

If the module were just being released, you might have a good case (in general, 
the safest options should be the default); however, the time for this decision 
was a very long time ago.   This ship has already sailed.

--
nosy: +rhettinger

___
Python tracker 

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



[issue23804] SSLSocket.recv(0) receives up to 1024 bytes

2016-06-26 Thread Martin Panter

Martin Panter added the comment:

This was not fixed properly. The first symptom is that recv(0) etc still blocks 
if the other end sends no data. The second symptom is that it does not work 
with suppress_ragged_eofs=False. The problem is SSL is still called to do a 
read, which returns zero, and that seems to be interpreted as some kind of EOF 
or shutdown indicator.

(IMO suppress_ragged_eofs=True is a bad default. It essentially treats a 
man-in-the-middle shutdown as a genuine secure shutdown, but that would be a 
separate issue.)

--
stage: resolved -> patch review
status: closed -> open
Added file: http://bugs.python.org/file43555/recv-zero.v2.patch

___
Python tracker 

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



[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-06-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4d04aca4afb0 by Matthias Klose in branch '3.5':
Issue #26867: Ubuntu's openssl OP_NO_SSLv3 is forced on by default; fix test.
https://hg.python.org/cpython/rev/4d04aca4afb0

New changeset 8f028d04df11 by Matthias Klose in branch '3.4':
Issue #26867: Ubuntu's openssl OP_NO_SSLv3 is forced on by default; fix test.
https://hg.python.org/cpython/rev/8f028d04df11

--
nosy: +python-dev

___
Python tracker 

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



[issue26930] Upgrade installers to OpenSSL 1.0.2h

2016-06-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e1e5691d02d8 by Zachary Ware in branch '3.5':
Issue #26930: Update Windows build to OpenSSL 1.0.2h
https://hg.python.org/cpython/rev/e1e5691d02d8

--

___
Python tracker 

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



[issue27365] Allow non-ascii chars in IDLE NEWS.txt (for contributor names)

2016-06-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 30e563e2702e by Terry Jan Reedy in branch '3.5':
Issue #27365: Allow non-ascii in idlelib/NEWS.txt - minimal part for 3.5.2.
https://hg.python.org/cpython/rev/30e563e2702e

--

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-26 Thread Martin Panter

Martin Panter added the comment:

Code samples in the documentation should also be fixed, like at 
. I think you can run 
“make -C Doc doctest” or something similar, which may help find some of these.

Also, playing with your current patch, it seems to affect the “unicode-escape” 
codec. Not sure if that is a problem, but it probably deserves also documenting 
the change.

--

___
Python tracker 

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



[issue22079] Ensure in PyType_Ready() that base class of static type is static

2016-06-26 Thread Xiang Zhang

Xiang Zhang added the comment:

Oh yes. The mro list can be customized so we can not even guarantee the type 
appears at index 0 and object at index n-1. It seems we should still keep what 
it is now, iterating the whole mro list.

Sorry that my previous comments seem to be noise. But maybe we can add one 
comment to clarify that iterating the whole list is needed.

--

___
Python tracker 

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



[issue27380] IDLE: add base Query dialog with ttk widgets

2016-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Pushed with minor changes.  I decided not to wait until I added more subclasses 
because file renames with post rename changes do not survive shelving.  
Reloading from the diff requires 'rediscovering' the renames.

--
Added file: http://bugs.python.org/file43554/query2.diff

___
Python tracker 

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



[issue27380] IDLE: add base Query dialog with ttk widgets

2016-06-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4796d7fb00c5 by Terry Jan Reedy in branch 'default':
Issue #27380: IDLE: add base Query dialog, with ttk widgets and subclass
https://hg.python.org/cpython/rev/4796d7fb00c5

--
nosy: +python-dev

___
Python tracker 

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



[issue27396] Change default filecmp.cmp shallow option

2016-06-26 Thread Gabriel Hackebeil

New submission from Gabriel Hackebeil:

I would like to propose changing the default setting for the shallow compare 
option in filecmp.cmp to False (or providing access an exact comparison 
function that does not use various performance optimizations).

I think many users will turn to this module as a replacement for the “diff” 
command on Unix systems, and it is far too easy of a trap to fall into thinking 
a full comparison takes place when calling filecmp.cmp.

I agree that the shallow compare option is a useful feature, but I think it 
should be something to opt into as it is more of a performance optimization 
(the same applies to the caching behavior, but that is for another time).

I understand that the documentation explains the default behavior, but the 
reality is that many users probably do not understand the consequences of this 
setting (or simply did not pay close enough attention to the documentation), 
making it easy for people to use this module wrong and write code that does not 
work as advertised. I admit to falling into this trap myself.

--
components: Library (Lib)
messages: 269336
nosy: ghackebeil
priority: normal
severity: normal
status: open
title: Change default filecmp.cmp shallow option
type: behavior

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-26 Thread Emanuel Barry

Emanuel Barry added the comment:

Indeed, we did, thanks for letting me know my mistake :) I didn't get very far 
into making bytes literal disallow invalid sequences, as I ran into issues with 
_codecs.escape_decode throwing the warning even when the literal was fine, and 
I think I stopped there and figured I'd at least post that patch and see if 
people are interested in extending that modification to bytes (turns out so).

I forgot about docs, will do so soon, but I'll try to extend the patch for 
bytes first. I'll see if I can make literals warn but not e.g. 
_codecs.escape_decode (or anything else, really).

Thanks!

--

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-26 Thread Martin Panter

Martin Panter added the comment:

Hah, we posted the same fix almost at the same time :)

--

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-26 Thread Martin Panter

Martin Panter added the comment:

Hello Emanual, I think I have fixed your problem with -Werror, by handling the 
exception returned by PyErr_WarnFormat() (see my patch). Thanks for separating 
the actual change from the escape violation fixes; it made it easier to spot 
the real problem :)

Also, I like the general idea of the change. It would be good to update the 
documentation as well (e.g. What’s New, and 
).

It would be good to do the same for byte string literals, at least to keep 
things consistent. What did you try so far? Do you have a partial patch for it?

--
nosy: +martin.panter
Added file: 
http://bugs.python.org/file43553/deprecate_invalid_escapes_only_2.patch

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-26 Thread Emanuel Barry

Emanuel Barry added the comment:

Aaand I feel pretty stupid; I didn't check the return value of 
PyErr_WarnFormat, so it was my mistake. Attached new patch, actually done right 
this time.

--
Added file: 
http://bugs.python.org/file43552/deprecate_invalid_escapes_only_2.patch

___
Python tracker 

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



[issue27394] Crash with compile returning a value with an error set

2016-06-26 Thread Emanuel Barry

Emanuel Barry added the comment:

Nevermind, my mistake.

--
resolution:  -> not a bug
stage: needs patch -> resolved
status: open -> closed
type: crash -> 

___
Python tracker 

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



[issue27395] Increase test coverage of unittest.runner.TextTestResult

2016-06-26 Thread Pam McA'Nulty

New submission from Pam McA'Nulty:

While working on another issue, I added a test to increase (low-hanging fruit) 
test coverage in unittest.runner.TextTestResult

--
components: Tests
files: textresult_coverage.patch
keywords: patch
messages: 269330
nosy: Pam.McANulty
priority: normal
severity: normal
status: open
title: Increase test coverage of unittest.runner.TextTestResult
versions: Python 3.6
Added file: http://bugs.python.org/file43551/textresult_coverage.patch

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-26 Thread Emanuel Barry

Emanuel Barry added the comment:

Ah right, assert() is only enabled in debug mode, I forgot that. My (very 
uneducated) guess is that compile() got the error (which was a warning) but 
then decided to return a value anyway, and the next thing that tries to call 
anything crashes Python. I opened #27394 to get some experts' advice.

--

___
Python tracker 

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



[issue27394] Crash with compile returning a value with an error set

2016-06-26 Thread Emanuel Barry

New submission from Emanuel Barry:

My trivial patch exposed a bug in the ast/compiler, where compile() would 
return a value and set an exception. See 
http://bugs.python.org/issue27364#msg269323 for more information and steps to 
reproduce. I looked a bit into it, but I don't know enough about it to be of 
much help.

(This is just a shot in the dark, but maybe compile() doesn't handle 
warnings-as-errors properly?)

--
components: Interpreter Core
messages: 269328
nosy: benjamin.peterson, brett.cannon, ebarry, georg.brandl, ncoghlan, 
yselivanov
priority: normal
severity: normal
stage: needs patch
status: open
title: Crash with compile returning a value with an error set
type: crash
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue27173] Modern Unix key bindings for IDLE

2016-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The change in v4 is the addition of 
self.AddChangedItem('main', 'Keys', 'name2', '')
There is a bug in the get keys function.  After applying, when I restart IDLE 
and go to 'Keys', my custom key set is 'Modern Unix' instead of 'Terry'.  It is 
still 'Terry' on other, unpatched IDLEs. I shelved the patch, restarted, back 
to 'Terry'.  Repeated unshelving and shelving restarts switched each time.

--

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-26 Thread Guido van Rossum

Guido van Rossum added the comment:

Hm, if you manage to trigger an assert() in the C code by writing some evil
Python code, the C code is considered broken (unless it was using ctypes or
one or two other explicit "void-the-warranty" exceptions).

Maybe someone who has worked more with the C code recently could help you
dig into this more; my memory is unreliable when it comes to these details.
Maybe assert() calls are disabled by default? In general the error "...
returned a result with an error set" means there's a problem at the C level
where a function should have either returned an object or returned NULL
with the per-thread exception state set, but it was found to return an
object *and* set the exception state. IIRC only debug mode checks for that,
so such a bug occasionally creeps into the code. But you shouldn't assume
everything is fine until you've tracked down the cause.

--

___
Python tracker 

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



[issue27051] Create PIP gui

2016-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

With respect to threading: I have close to 0 experience.  I know that tkinter 
is supposed to be 'thread-safe' (Martin Loewis) and that people have real 
problems mixing threads with tkinter.  If you can create a minimal complete 
verifiable example (SO MCVE), try asking on python-list, or SO, so you can 
reach people who do know threading.

I suppose you can already guess my thought: for a first draft, block and let 
users wait.  For anything I have done with pip, that would not be very long.

I have done preliminary successful experiments with integrating asyncio and 
tkinter loop.  When I posted to the python-ideas thread on the subject, I got 
no response, so I moved on.  Perhaps I should work on it some more, but I am 
also busy with IDLE.

--

___
Python tracker 

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



[issue27051] Create PIP gui

2016-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Upendra, with respect to the error installing timingwheel, msg268983, that 
looks like a bug in timingwheel.  Report it to the pip or timingwheel list or 
tracker.  I ran the command normally and got the same exception, with less 
noise.  It is not a problem with using main.

C:\Programs\Python36>python -m pip install -U timingwheel
Collecting timingwheel
  Downloading timingwheel-0.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "", line 1, in 
  File 
"C:\Users\Terry\AppData\Local\Temp\pip-build-ypf8yppj\timingwheel\setup.py", 
line 3, in 
from timingwheel import version
  File 
"C:\Users\Terry\AppData\Local\Temp\pip-build-ypf8yppj\timingwheel\timingwheel\__init__.py",
 line 1, in 
from timingwheel import BaseWheel, TimingWheel
ImportError: cannot import name 'BaseWheel'


Command "python setup.py egg_info" failed with error code 1 in 
C:\Users\Terry\AppData\Local\Temp\pip-build-ypf8yppj\timingwheel\

--

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-26 Thread Emanuel Barry

Emanuel Barry added the comment:

I originally considered making two different patches, so there you go. 
deprecate_invalid_escapes_only_1.patch has the deprecation plus a test, and 
invalid_stdlib_escapes_1.patch fixes all invalid escapes in the stdlib.

My code was the cause, although no directly; it was 'assert(!PyErr_Occurred())' 
at the beginning of PyObject_Call in Objects/abstract.c which failed.

This happened when I ran the whole test suite (although just running test_ast 
was fine to reproduce it) with the '-W error' command line switch. One stdlib 
module (I don't remember which one) had one single invalid escape sequence in 
it, and then test_ast.ASTValidatorTests.test_stdlib_validates triggered the 
failed assertion. Fixing the invalid escape removes the failure and all tests 
pass.

One can reliably reproduce the crash with the patch by adding a string with an 
invalid escape in any of the stdlib files (and running with '-W error'):

No invalid sequence:

>>> import unittest, test.test_ast
>>> unittest.main(test.test_ast)
..
--
Ran 78 tests in 5.538s

OK

With an invalid sequence in a file:

>>> import unittest, test.test_ast
>>> unittest.main(test.test_ast)
Fatal Python error: a function 
returned a result with an error set
DeprecationWarning: invalid escape sequence 'w'

During handling of the above exception, another exception occurred:

SystemError:  returned a result with an error set

Current thread 0x1ba0 (most recent call first):
  File "E:\GitHub\cpython\lib\ast.py", line 35 in parse
  File "E:\GitHub\cpython\lib\test\test_ast.py", line 944 in 
test_stdlib_validates
  File "E:\GitHub\cpython\lib\unittest\case.py", line 600 in run
  File "E:\GitHub\cpython\lib\unittest\case.py", line 648 in __call__
  File "E:\GitHub\cpython\lib\unittest\suite.py", line 122 in run
  File "E:\GitHub\cpython\lib\unittest\suite.py", line 84 in __call__
  File "E:\GitHub\cpython\lib\unittest\suite.py", line 122 in run
  File "E:\GitHub\cpython\lib\unittest\suite.py", line 84 in __call__
  File "E:\GitHub\cpython\lib\unittest\runner.py", line 176 in run
  File "E:\GitHub\cpython\lib\unittest\main.py", line 255 in runTests
  File "E:\GitHub\cpython\lib\unittest\main.py", line 94 in __init__
  File "", line 1 in 

Then I get the usual "Python has stopped working" Windows prompt (strangely 
enough, before I'd get a prompt saying "Assertion failed" with the line, but 
not this time).

I'm not sure where the error lies exactly. Should I open another issue for that?

--
Added file: 
http://bugs.python.org/file43549/deprecate_invalid_escapes_only_1.patch

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-26 Thread Emanuel Barry

Changes by Emanuel Barry :


Added file: http://bugs.python.org/file43550/invalid_stdlib_escapes_1.patch

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-26 Thread Guido van Rossum

Guido van Rossum added the comment:

I am okay with making it a silent warning.

Can we do it in two stages though? It doesn't have to be two releases, I just 
mean two separate commits: (1) fix all places in the stdlib that violate this 
principle; (2) separately commit the code that causes the silent deprecation 
(and tests for it).

What exactly was the hard crash you got? Do you think it was a bug in your own 
C code or in existing C code?

--

___
Python tracker 

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



[issue23401] Add pickle support of Mapping views

2016-06-26 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



[issue27173] Modern Unix key bindings for IDLE

2016-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker 

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



[issue22890] StringIO.StringIO pickled in 2.7 is not unpickleable on 3.x

2016-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is the _compat_pickle module that purposed to support backward and 
forward compatibility for renamed or moved classes and modules.

StringIO.StringIO in 2.x corresponds to io.StringIO or io.BytesIO. The problem 
is that we can't determine what of classes is a match in every concrete case, 
especially if StringIO.StringIO is empty.

But since cStringIO.StringIO is not pickleable either, I now think that it is 
not worth to support to support compatibility with pickled StringIO.StringIO 
instances.

--
resolution:  -> wont fix
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



[issue27372] Test_idle should stop changing locale

2016-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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



[issue27372] Test_idle should stop changing locale

2016-06-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3ffdb9277054 by Terry Jan Reedy in branch 'default':
Issue 27372: Stop test_idle from changing locale, so test passes.
https://hg.python.org/cpython/rev/3ffdb9277054

--
nosy: +python-dev

___
Python tracker 

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



[issue27372] Test_idle should stop changing locale

2016-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Added a couple of blank lines and expanded a comment.

--

___
Python tracker 

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



[issue23401] Add pickle support of Mapping views

2016-06-26 Thread Guido van Rossum

Guido van Rossum added the comment:

Please close.

--

___
Python tracker 

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



[issue23401] Add pickle support of Mapping views

2016-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Can 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



[issue27372] Test_idle should stop changing locale

2016-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


Added file: http://bugs.python.org/file43548/locale-change2.diff

___
Python tracker 

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



[issue27252] Make dict views copyable

2016-06-26 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



[issue27253] More efficient deepcopying of Mapping

2016-06-26 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



[issue27392] Add a server_side keyword parameter to create_connection

2016-06-26 Thread Guido van Rossum

Guido van Rossum added the comment:

I'm confused. create_connection() is meant for creating client connection,
so I don't think a server_side flag makes sense. (There are lower-level
internal APIs that do take a server_side flag, but create_connection() is
just one caller for these.)

If create_server() is buggy we should fix those bugs!

--

___
Python tracker 

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



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

2016-06-26 Thread Guido van Rossum

Guido van Rossum added the comment:

Yeah, I'd like to see a more minimal repro to understand what's going in.

--

___
Python tracker 

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



[issue24833] IDLE tabnanny check fails

2016-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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



[issue27391] server_hostname should only be required when checking host names

2016-06-26 Thread R. David Murray

R. David Murray added the comment:

(To clarify: I haven't used the ssl interface enough for it to be obvious to me 
where the bug is.)

--

___
Python tracker 

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



[issue27391] server_hostname should only be required when checking host names

2016-06-26 Thread R. David Murray

R. David Murray added the comment:

Where is it required?

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



[issue27387] Thread hangs on str.encode() when locale is not set

2016-06-26 Thread R. David Murray

R. David Murray added the comment:

This situation is warned about explicitly in the threading docs 
(https://docs.python.org/2/library/threading.html#importing-in-threaded-code).  
The import deadlock is fixed in python3, but it is still a really bad idea to 
launch threads on module import.

What isn't obvious, of course, is that calling encode for the first time for a 
given encoding does an implicit import of the relevant encoding.  I don't think 
encodings is the only stdlib module that does implicit imports, but it is 
probably the most used case.  Maybe it is worth adding a warning to that 
section of the 2.7 docs about implicit imports in general and encode/decode in 
particular?

--
assignee:  -> docs@python
components: +Documentation -Interpreter Core, Unicode
nosy: +docs@python, r.david.murray

___
Python tracker 

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



[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2016-06-26 Thread Andre Merzky

Andre Merzky added the comment:

It seems you were right, that needed a DecRef indeed: the IncRef is already 
called on construction.  The DecRef for the result also needed fixing - an 
updated patch is attached.

--
Added file: http://bugs.python.org/file43546/issue23395.2.patch

___
Python tracker 

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



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

2016-06-26 Thread Марк Коренберг

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

Please reduce program, and make sure it still hangs.

--
nosy: +mmarkk

___
Python tracker 

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



[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2016-06-26 Thread Andre Merzky

Andre Merzky added the comment:

thanks for looking into this!  And also, thanks for the details in the original 
bug report -- I found this by chance, after unsuccessfully banging my head 
against this very problem for quite a while! 

I am not sure if the DecRef needs to be called really if the arglist is not 
stored or passed on.  But thanks for pointing that out, I'll check if I can 
find where the corresponding IncRef is called (assuming that happens somewhere).

--

___
Python tracker 

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



[issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash.

2016-06-26 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue27352] Bug in IMPORT_NAME

2016-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry, I was wrong. The level argument is always non-negative integer (if a 
bytecode is not corrupted). The second branch can be just removed.

Following patch also fixes the validation of the ImportFrom AST node.

--
nosy: +benjamin.peterson, georg.brandl, yselivanov
stage: commit review -> patch review
type: behavior -> enhancement
versions:  -Python 2.7, Python 3.5
Added file: http://bugs.python.org/file43545/import_name_level_2.patch

___
Python tracker 

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



[issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash.

2016-06-26 Thread Eryk Sun

Eryk Sun added the comment:

To resolve the crash on Windows in 2.7 requires backporting checktm(). Using 
asctime_s doesn't solve the problem. The CRT still calls the default invalid 
parameter handler, which kills the process -- as shown by the following ctypes 
example:

from ctypes import *
libc = CDLL('msvcr90')

class tm(Structure):
_fields_ = (('tm_sec', c_int),
('tm_min', c_int),
('tm_hour', c_int),
('tm_mday', c_int),
('tm_mon', c_int),
('tm_year', c_int),
('tm_wday', c_int),
('tm_yday', c_int),
('tm_isdst', c_int))

libc._localtime32.restype = POINTER(tm)
libc.asctime_s.restype = c_char_p

t = c_int()
libc._time32(byref(t))
lt = libc._localtime32(byref(t))
sbuf = (c_char * 100)()

>>> libc.asctime_s(sbuf, sizeof(sbuf), lt)
>>> sbuf.value
'Sun Jun 26 19:22:47 2016\n'

>>> lt[0].tm_hour = -1
>>> libc.asctime_s(sbuf, sizeof(sbuf), lt)

Breakpoint 0 hit
MSVCR90!_invoke_watson:
`6b8950e4 4053pushrbx
0:000> k5
Child-SP  RetAddr   Call Site
`005ef628 `6b8952d4 MSVCR90!_invoke_watson
`005ef630 `6b859830 MSVCR90!_invalid_parameter+0x70
`005ef670 `1d1aff53 MSVCR90!asctime_s+0x2fc
`005ef6b0 `1d1ae7fc _ctypes!ffi_call_AMD64+0x77
`005ef700 `1d1aa4c6 _ctypes!ffi_call+0x8c

--
nosy: +eryksun

___
Python tracker 

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



[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2016-06-26 Thread Thomas Kluyver

Thomas Kluyver added the comment:

Does Py_DECREF(arglist); need to be called in all cases? I'm genuinely unsure, 
as I don't usually work on C code, but my guess would be that it does.

I'm not sure whether review is now done on Github.

--

___
Python tracker 

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



[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2016-06-26 Thread Andre Merzky

Andre Merzky added the comment:

Attached is a patch which seems to resolve the issue for me -- this now 
triggers the expected `KeyboardInterrupt` in the main thread.  For verification 
one can run the unaltered code as provided by Thomas.

I would very much appreciate feedback, to make sure that the semantics is 
actually what one would expect.  The patch is against the 2.7 branch from 
https://github.com/python/cpython.git, and I did not test it against any other 
branch.

I also opened a pull request (https://github.com/python/cpython/pull/39).

--
keywords: +patch
Added file: http://bugs.python.org/file43544/issue23395.patch

___
Python tracker 

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



[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2016-06-26 Thread Andre Merzky

Andre Merzky added the comment:

Thanks Thomas.

--

___
Python tracker 

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



[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2016-06-26 Thread Thomas Kluyver

Thomas Kluyver added the comment:

It's waiting for someone to make a patch - I'm no longer running into it, so 
it's not high on my priority list. Given that it's been over a year since I 
created this issue, it's probably not about to get fixed unless you've got some 
time to work on it.

--

___
Python tracker 

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



[issue27393] Command to activate venv in Windows has wrong path

2016-06-26 Thread Manuel Kaufmann

New submission from Manuel Kaufmann:

The `venv` module has a bug in the command to activate it on Windows.

In 3.3 and 3.4 the bar used is wrong: `/` instead `\`

* https://docs.python.org/3.4/library/venv.html#creating-virtual-environments
* https://docs.python.org/3.3/library/venv.html#creating-virtual-environments


In 3.5 and 3.6 that section was converted to a table with the commands and they 
are missing the `\` in the command path:

* https://docs.python.org/3.5/library/venv.html#creating-virtual-environments
* https://docs.python.org/dev/library/venv.html#creating-virtual-environments

--
assignee: docs@python
components: Documentation
files: venv-windows-command.patch
keywords: patch
messages: 269299
nosy: docs@python, facundobatista, humitos
priority: normal
severity: normal
status: open
title: Command to activate venv in Windows has wrong path
type: enhancement
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43543/venv-windows-command.patch

___
Python tracker 

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



[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2016-06-26 Thread Andre Merzky

Changes by Andre Merzky :


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



[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2016-06-26 Thread Andre Merzky

Andre Merzky added the comment:

Thanks for the PingBack, Thomas.

I am not very familiar with the Python community approach to bug reports, so 
can someone comment if that is worth waiting for to get fixed, or is it that a 
rather futile hope without providing a patch myself?  I don't think I currently 
have the resources to dig into the details...

Thanks, Andre.

--

___
Python tracker 

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



[issue27392] Add a server_side keyword parameter to create_connection

2016-06-26 Thread Yury Selivanov

Yury Selivanov added the comment:

> On Jun 26, 2016, at 12:05 PM, Jim Fulton  wrote:
> 
> I've switched my code to use create_server, but this has led to stability 
> problems.

BTW, did you try to run ZEO tests on uvloop? I'm just curious if stability is 
somehow related to asyncio design, or its just implementation quirks.

--

___
Python tracker 

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



[issue26865] Meta-issue: support of the android platform

2016-06-26 Thread Xavier de Gaye

Xavier de Gaye added the comment:

issue #22724: byte-compile fails for cross-builds

--
dependencies: +byte-compile fails for cross-builds

___
Python tracker 

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



[issue27390] state of the 3.3 branch unclear

2016-06-26 Thread Brett Cannon

Brett Cannon added the comment:

New releases of Python 3.3 are on hold pending a security fix: 
https://mail.python.org/pipermail/python-dev/2016-February/143400.html

--
nosy: +brett.cannon, georg.brandl
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash.

2016-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Benjamin, there is a crash, and there is a simple patch that presumably fixes a 
crash. I think fixing crashes has high priority. The patch is tested on Linux 
and needs to be tested on Windows.

--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
status: closed -> open

___
Python tracker 

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



[issue27392] Add a server_side keyword parameter to create_connection

2016-06-26 Thread Jim Fulton

New submission from Jim Fulton:

The event loop create_connection method can take a socket to create a 
connection on an existing socket, including sockets obtained via an external 
listener.  If an SSL context is provided, however, it assumes it's creating a 
client connection, making it impossible to use it in a server.

I've recently ported ZEO to asyncio. My original implementation used a separate 
thread for each connection and a thread for listening for connections.  I think 
there are cases where this makes a lot of sense.  Blocky operations only affect 
one client and, IMO, using an asynchronous model can simplify networking code 
even when there's only one connection. Unfortunately, this didn't work on Linux 
with SSL due to issues with SSL and non-blocking sockets. (Oddly, it worked 
fine on Mac OS X.)

I've switched my code to use create_server, but this has led to stability 
problems.  Beyond http://bugs.python.org/issue27386, I'm seeing a lot of test 
instability.  I can't get through the ZEO tests without some test failing, 
although the tests pass when run individually. I suspect that this is due to a 
problem in my error handling, asyncio's error handling, or likely both.

Note that the ZEO test suite is pretty ruthless, doing whatever they can to 
break ZEO servers and clients.

I have a version of my multi-threaded code that monkey-patches loop instances 
to pass server_side=True to _make_ssl_transport.  With that awful hack, I can 
use an external listener and tests usually run without errors. :)

I'd be more than happy to create a PR that adds this option (including test and 
docs). Please just give me the word. :)

--
components: asyncio
messages: 269293
nosy: gvanrossum, haypo, j1m, yselivanov
priority: normal
severity: normal
status: open
title: Add a server_side keyword parameter to create_connection
type: enhancement
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue27391] server_hostname should only be required when checking host names

2016-06-26 Thread Jim Fulton

New submission from Jim Fulton:

If the given ssl context has check_hostname set to False, then the 
server_hostname shouldn't be required.

--
components: asyncio
messages: 269292
nosy: gvanrossum, haypo, j1m, yselivanov
priority: normal
severity: normal
status: open
title: server_hostname should only be required when checking host names
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



[issue22079] Ensure in PyType_Ready() that base class of static type is static

2016-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is interesting question. It looks that base classes (as well as mro 
classes) may not go through PyType_Ready. There is no even a check that mro() 
returns only ancestor classes and contains the initial class itself.

--

___
Python tracker 

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



[issue22115] Add new methods to trace Tkinter variables

2016-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Backported fixes for old tracing methods. Unfortunately the tracing in the "u" 
mode doesn't work in 2.7. This is related to some differences in GC. I don't 
think this is important and close this issue.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2016-06-26 Thread Thomas Kluyver

Thomas Kluyver added the comment:

As far as I know it has not been fixed.

--

___
Python tracker 

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



[issue22115] Add new methods to trace Tkinter variables

2016-06-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 77378dce6bcf by Serhiy Storchaka in branch '2.7':
Issue #22115: Fixed tracing Tkinter variables.
https://hg.python.org/cpython/rev/77378dce6bcf

New changeset 293ec9547334 by Serhiy Storchaka in branch '3.5':
Issue #22115: Fixed tracing Tkinter variables:
https://hg.python.org/cpython/rev/293ec9547334

New changeset c4839c36a71f by Serhiy Storchaka in branch 'default':
Issue #22115: Updated Misc/NEWS.
https://hg.python.org/cpython/rev/c4839c36a71f

--

___
Python tracker 

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



[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2016-06-26 Thread Andre Merzky

Andre Merzky added the comment:

Did anything ever come of this?  I also frequently stumble over that error -- 
but alas not in a debug setting, but on actual running code... :/

--
nosy: +Andre Merzky

___
Python tracker 

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



[issue27051] Create PIP gui

2016-06-26 Thread Upendra Kumar

Upendra Kumar added the comment:

Refer to : msg269285

This is the code :

...

from pip_tkinter.utils import pip_install_from_PyPI

curr_item = self.multi_items_list.scroll_tree.focus()
item_dict = self.multi_items_list.scroll_tree.item(curr_item)
selected_module = item_dict['values'][0]
self.controller.debug_bar.config(
text='Installing package {}...Please wait'.format(selected_module))

self.install_queue = queue.Queue()
self.install_thread = threading.Thread(
target=pip_install_from_PyPI,
kwargs={
'package_args':selected_module,
'thread_queue':self.install_queue})
self.install_thread.start()
self.after(100, self.check_install_queue)

--

___
Python tracker 

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



[issue27051] Create PIP gui

2016-06-26 Thread Upendra Kumar

Upendra Kumar added the comment:

I am trying something similar to BrownTruck in issue : 
https://github.com/pypa/pip/pull/3733

I tried to execute pip.main('install','-U',) from a thread.
I got a similar error : 

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/pip/commands/install.py", line 
299, in run
requirement_set.prepare_files(finder)
  File "/usr/local/lib/python3.4/dist-packages/pip/req/req_set.py", line 370, 
in prepare_files
ignore_dependencies=self.ignore_dependencies))
  File "/usr/local/lib/python3.4/dist-packages/pip/req/req_set.py", line 476, 
in _prepare_file
with indent_log():
  File "/usr/lib/python3.4/contextlib.py", line 59, in __enter__
return next(self.gen)
  File "/usr/local/lib/python3.4/dist-packages/pip/utils/logging.py", line 34, 
in indent_log
_log_state.indentation += num
AttributeError: '_thread._local' object has no attribute 'indentation'

There is some problem with threading.local() in pip.utils.logging. Can anyone 
please suggest a workaround for it. It is necessary for me to use threads other 
than the main GUI thread to update text. I need to update text and do long 
processes ( like searching for results using pip search command or installing 
or uninstalling) when someone presses a button.

When I don't use threading to update text, the GUI text is updated only after 
the callback returns.

--

___
Python tracker 

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



[issue27051] Create PIP gui

2016-06-26 Thread Upendra Kumar

Upendra Kumar added the comment:

In ref. to msg269264:

@Terry, I am ready to maintain this project. But for as backup is concerned I 
really don't know a lot of people and where should I look for them.

In reference to msg269038:

I was more engrossed in reading through other messages related to pip gui that 
I forgot to clarify about it. 

For pip install and uninstall command, I have used the pip.main() instead of 
subprocess module. There were two reasons for it ( what I thought):

1. More reliable, because I thought the output on CLI may change more 
frequently than arguments in pip.main(). (I think may be this assumption is 
wrong).  

2. I figured out a way to clear pip loggers ( which caused to produce duplicate 
output ). I found it on a issue in pip Github repo :

Adding one line of : pip.logger.consumers = [] in runpip(). It cleared the pip 
loggers responsible for producing duplicate output. ( due to this I liked 
pip.main(). The only troubling part about it was duplicate output )

This is just what I thought. I can very easily switch to subprocess module. 
Very less changes will be required in the code.

--

___
Python tracker 

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



[issue27389] When a TypeError is raised due to invalid arguments to a method, it should use __qualname__ to identify the class the method is in

2016-06-26 Thread Martin Panter

Martin Panter added the comment:

Have a look at Issue 2786. I think it might be the same thing.

--
nosy: +martin.panter

___
Python tracker 

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



[issue27390] state of the 3.3 branch unclear

2016-06-26 Thread Thomas Klausner

New submission from Thomas Klausner:

https://www.python.org/dev/peps/pep-0398/ mentions that a 3.3.7 release was 
planned for February 27, 2016. It appears this never happened.

It also mentions that there will be source-only security updates for 3.3.x 
until September 2017. However, it appears that for example 
https://bugs.python.org/issue22417 from 2014 was never fixed for 3.3.x.
(perhaps it did not affect 3.3.x, but it affected 2.7 and 3.4, so the chances 
are high it did)

I'm not particularly interested in a release -- I'm fine with declaring 3.3.x 
end-of-life, but the documentation should match the reality.
Thanks.

--
components: Interpreter Core
messages: 269282
nosy: wiz
priority: normal
severity: normal
status: open
title: state of the 3.3 branch unclear
type: security
versions: Python 3.3

___
Python tracker 

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



[issue27350] Compact and ordered dict

2016-06-26 Thread INADA Naoki

Changes by INADA Naoki :


Added file: http://bugs.python.org/file43542/compact-dict.patch

___
Python tracker 

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



[issue27387] Thread hangs on str.encode() when locale is not set

2016-06-26 Thread STINNER Victor

STINNER Victor added the comment:

It is a deadlock on the import lock. You should avoid creating and waiting
for a thread when a module is imported. Defer the creation of the thread.

--

___
Python tracker 

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



[issue22115] Add new methods to trace Tkinter variables

2016-06-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a201180c0f77 by Serhiy Storchaka in branch 'default':
Issue #22115: Added methods trace_add, trace_remove and trace_info in the
https://hg.python.org/cpython/rev/a201180c0f77

--
nosy: +python-dev

___
Python tracker 

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



[issue22079] Ensure in PyType_Ready() that base class of static type is static

2016-06-26 Thread Xiang Zhang

Xiang Zhang added the comment:

I thought that too at first. But if we use __bases__, can we still guarantee 
that 'all bases of statically allocated type should be statically allocated'? 
How about its grand bases? Is it possible that a statically allocated type 
inherit a dynamic type but does not go through PyType_Ready and then be 
inherited?

--

___
Python tracker 

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



[issue22079] Ensure in PyType_Ready() that base class of static type is static

2016-06-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good point! tp_bases should be iterated instead of tp_mro in this check.

--
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open
Added file: http://bugs.python.org/file43541/issue22079-tp_bases.patch

___
Python tracker 

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



[issue22115] Add new methods to trace Tkinter variables

2016-06-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Good idea.  Anyone who knows enough to create one by calling into tcl, assuming 
that is possible, should know that the methods apply.  Everyone else, like me, 
will just be confused.

--

___
Python tracker 

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