[issue37833] tkinter crashes macOS in the latest macOS update 10.14.6

2019-08-12 Thread Kevin Walzer


Kevin Walzer  added the comment:

Hard to say what is going on without knowing more about the specific version of 
Tk (not just 8.6, but 8.6.8? 8.6.9?).

--

___
Python tracker 

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



[issue21109] tarfile: Traversal attack vulnerability

2019-08-12 Thread Ashwin Ramaswami


Change by Ashwin Ramaswami :


--
pull_requests: +14965
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/15244

___
Python tracker 

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



[issue21109] tarfile: Traversal attack vulnerability

2019-08-12 Thread Ashwin Ramaswami


Ashwin Ramaswami  added the comment:

I've added a PR in which I'm working on adding in the tests. Wanted to make 
sure this is the approach you had in mind? It wasn't as simple as how tests are 
handled in, say, test_binascii.py, because over there there was only one class 
that handled the main test suite, while in this file, there are multiple.

--
nosy: +epicfaace

___
Python tracker 

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



[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-12 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

Thanks for working this. In your interested in doing some more hacking on 
Unicode data, there's #32771.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-12 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset ef2af1ad44be0542a47270d5173a0b920c3a450d by Benjamin Peterson 
(Greg Price) in branch 'master':
bpo-37760: Factor out the basic UCD parsing logic of makeunicodedata. (GH-15130)
https://github.com/python/cpython/commit/ef2af1ad44be0542a47270d5173a0b920c3a450d


--

___
Python tracker 

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



[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14966
pull_request: https://github.com/python/cpython/pull/15245

___
Python tracker 

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



[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-12 Thread miss-islington


miss-islington  added the comment:


New changeset 4e3dfcc4b987e683476a1b16456e57d3c9f581cb by Miss Islington (bot) 
(Greg Price) in branch 'master':
bpo-37760: Mark all generated Unicode data headers as generated. (GH-15171)
https://github.com/python/cpython/commit/4e3dfcc4b987e683476a1b16456e57d3c9f581cb


--
nosy: +miss-islington

___
Python tracker 

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



[issue37798] Add C fastpath for statistics.NormalDist.inv_cdf()

2019-08-12 Thread Dong-hee Na


Dong-hee Na  added the comment:

@rhettinger

Hi, Can I work on this issue?
It might be my first C module addition task for CPython.

--
nosy: +corona10

___
Python tracker 

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



[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14967
pull_request: https://github.com/python/cpython/pull/15246

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

:-D

--

___
Python tracker 

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



[issue37758] unicodedata checksum-tests only test 1/17th of Unicode's codepoints

2019-08-12 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset def97c988be8340f33869b57942a30d10fc3a1f9 by Benjamin Peterson 
(Greg Price) in branch 'master':
bpo-37758: Clean out vestigial script-bits from test_unicodedata. (GH-15126)
https://github.com/python/cpython/commit/def97c988be8340f33869b57942a30d10fc3a1f9


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-12 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 99d208efed97e02d813e8166925b998bbd0d3993 by Benjamin Peterson 
(Greg Price) in branch 'master':
bpo-37760: Constant-fold some old options in makeunicodedata. (GH-15129)
https://github.com/python/cpython/commit/99d208efed97e02d813e8166925b998bbd0d3993


--

___
Python tracker 

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



[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-12 Thread miss-islington


miss-islington  added the comment:


New changeset c2b9d9f202e4a99fc0800b7a0f0944ac4c2382e3 by Miss Islington (bot) 
in branch '3.8':
bpo-37760: Mark all generated Unicode data headers as generated. (GH-15171)
https://github.com/python/cpython/commit/c2b9d9f202e4a99fc0800b7a0f0944ac4c2382e3


--

___
Python tracker 

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



[issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass

2019-08-12 Thread miss-islington


miss-islington  added the comment:


New changeset b02e148a0d6e7a11df93a09ea5f4e1b0ad9b77b8 by Miss Islington (bot) 
in branch '3.8':
bpo-37760: Mark all generated Unicode data headers as generated. (GH-15171)
https://github.com/python/cpython/commit/b02e148a0d6e7a11df93a09ea5f4e1b0ad9b77b8


--

___
Python tracker 

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



[issue37798] Add C fastpath for statistics.NormalDist.inv_cdf()

2019-08-12 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Can I work on this issue?  
> It might be my first C module addition task for CPython.

Yes.  This issue would be a good place to start.

--

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Batuhan


Change by Batuhan :


--
pull_requests: +14968
pull_request: https://github.com/python/cpython/pull/15247

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Batuhan


Batuhan  added the comment:

serhiy can you review the solution i found?

--

___
Python tracker 

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



[issue37833] tkinter crashes macOS in the latest macOS update 10.14.6

2019-08-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I had a similar problem during EuroPython, but that was when I had anaconda on 
my machine. I've since removed it because generally don't use it but had it 
installed for a training session.

I haven't tried to reproduce, but also don't run 10.14.6 yet (holding of 
rebooting due to too much active Terminal windows). I'll try to reproduce later 
this week on another machine.

I get reports about this in the py2app repo as well, see 
,
 so this is not just something on a single machine.

--

___
Python tracker 

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



[issue37827] IDLE: Have the shell mimic terminal handling of \r and \b control characters in outputs

2019-08-12 Thread Tal Einat


Tal Einat  added the comment:

See PR GH-15211 with a working implementation.

--

___
Python tracker 

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



[issue23220] IDLE: Document how Shell displays user code output

2019-08-12 Thread Tal Einat


Change by Tal Einat :


--
pull_requests:  -14939

___
Python tracker 

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



[issue37828] Fix default mock_name in unittest.mock.assert_called error message

2019-08-12 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

In the format string for assert_called the evaluation order is incorrect and 
hence for mock's without name 'None' is printed whereas it should be 'mock' 
like for other messages. The error message is ("Expected '%s' to have been 
called." % self._mock_name or 'mock') . Here self._mock_name which is None is 
applied to form the string and then used with the string 'mock' in or 
combination. The fix would be to have the evaluation order correct like other 
error messages. Marking this as newcomer-friendly. Please leave this to new 
contributors as their 1st PR.

./python.exe
Python 3.9.0a0 (heads/master:f03b4c8a48, Aug 12 2019, 10:04:10)
[Clang 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from unittest.mock import Mock
>>> m = Mock()
>>> m.assert_called_once()
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", 
line 854, in assert_called_once
raise AssertionError(msg)
AssertionError: Expected 'mock' to have been called once. Called 0 times.
>>> m.assert_called()
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", 
line 844, in assert_called
raise AssertionError(msg)
AssertionError: Expected 'None' to have been called.


Thanks

--
components: Library (Lib)
keywords: newcomer friendly
messages: 349444
nosy: cjw296, mariocj89, michael.foord, xtreak
priority: normal
severity: normal
status: open
title: Fix default mock_name in unittest.mock.assert_called error message
type: behavior
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue37785] argparse uses %s in gettext calls causing xgettext warnings

2019-08-12 Thread Jakub Kulik


Jakub Kulik  added the comment:

Thanks,

I see; this is not a change for security only stage. I merged your suggestion.

--

___
Python tracker 

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



[issue37829] Documentation of stdlib: add example of mixed arguments to dict()

2019-08-12 Thread pasenor


New submission from pasenor :

The following use of the dict() function with both positional and keyword 
arguments  does follow from the description, but probably needs it's own 
example:

dict({'a': 1}, b=2}) == {'a': 1, 'b': 2}

--
assignee: docs@python
components: Documentation
messages: 349446
nosy: docs@python, pasenor
priority: normal
severity: normal
status: open
title: Documentation of stdlib: add example of mixed arguments to dict()
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37822] Add math.as_integer_ratio()

2019-08-12 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Aren't you worried about using the non-special non-reserved attributes like 
"as_integer_ratio"? That's the reason why I proposed a dunder name "__ratio__" 
instead of "as_integer_ratio".

In my opinion, it was a mistake in PEP 3141 to use non-reserved names like 
"numerator" and "denominator" because they might already be used by existing 
classes with a different meaning (this is precisely what happened with 
SageMath).

It's an honest question. If you say, "we thought about it and think it's just 
fine to use as_integer_ratio()", just say so and that's fine for me.

--
nosy: +jdemeyer

___
Python tracker 

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



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2019-08-12 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Jordon is right. Conversion has to be to underscores, not hyphens. I guess this 
bug was introduced when the normalization function was converted to C.

--
nosy: +lemburg

___
Python tracker 

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



[issue37829] Documentation of stdlib: add example of mixed arguments to dict()

2019-08-12 Thread pasenor


Change by pasenor :


--
keywords: +patch
pull_requests: +14946
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15220

___
Python tracker 

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



[issue37785] argparse uses %s in gettext calls causing xgettext warnings

2019-08-12 Thread Sanyam Khurana


Sanyam Khurana  added the comment:

Hi Eric,

This is with reference to https://bugs.python.org/issue10528.

I've looked at the PR and it's ready for a core-review: 
https://github.com/python/cpython/pull/15161

Can you please take a look at this?

Many thanks!

--
nosy: +bethard, eric.araujo

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Batuhan


New submission from Batuhan :

When you try to put a return statement with the iterated value inside of 
try/finally and if you have continue in finally it will result with segfault.

def simple():
for number in range(2):
try:
return number
finally:
continue

simple()
SEGV


My first debugs shows TOS is the next value int(1) when it comes to FOR_ITER, 
instead of the range instance. 
So when python try to call next() with (*iter->ob_type->tp_iternext)(iter) in 
FOR_ITER it gets a non iterator, int(1). 

Adding an assert can prove it, 
python: Python/ceval.c:3198: _PyEval_EvalFrameDefault: Assertion 
`PyIter_Check(iter)' failed.

For seeing how stack changed i enabled lltrace and formatted it little bit;

>>> STACK_SIZE  0   
LOAD_GLOBAL 0   
>>> STACK_SIZE  0   
>>> push 
LOAD_CONST  1   
>>> STACK_SIZE  1   
>>> push2   
CALL_FUNCTION   1   
>>> STACK_SIZE  2   
>>> ext_pop 2   
>>> ext_pop  
>>> pushrange(0, 2) 
GET_ITERNone
>>> STACK_SIZE  1   
FOR_ITER24  
>>> STACK_SIZE  1   
>>> push0   
STORE_FAST  0   
>>> STACK_SIZE  2   
>>> pop 0   
SETUP_FINALLY   12  
>>> STACK_SIZE  1   
LOAD_FAST   0   
>>> STACK_SIZE  1   
>>> push0   
POP_BLOCK   None
>>> STACK_SIZE  2   
CALL_FINALLY6   
>>> STACK_SIZE  2   
>>> push20  
POP_FINALLY 0   
>>> STACK_SIZE  3   
>>> pop 20  
JUMP_ABSOLUTE   8   
>>> STACK_SIZE  2   
FOR_ITER24  
>>> STACK_SIZE  2
[SEGV]

And the oddity is STACK_SIZE should be 1 before the FOR_ITER but it is 2, then 
i said why dont i try the SECOND() as iter, and it worked. It means an 
instruction is pushing the value of previous iteration.

There are 3 things we can do;
=> raise a RuntimeError if TOS isn't an iterator (IMHO we should do that)
=> check if try/finally created inside of a function and an iterator. then 
check inside of try if a return happens with the iterated value and if so set 
preserve_tos value to false. 
=> dont allow continue in finally

I want to fix this, and i prefer the first one. If you have any suggestion, i 
am open.

--
messages: 349450
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: continue in finally with return in try results with segfault

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Batuhan


Change by Batuhan :


--
keywords: +patch
pull_requests: +14948
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15221

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Eric V. Smith


Change by Eric V. Smith :


--
components: +Interpreter Core
type:  -> crash

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Batuhan


Change by Batuhan :


--
versions: +Python 3.8, Python 3.9

___
Python tracker 

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



[issue37785] argparse uses %s in gettext calls causing xgettext warnings

2019-08-12 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +paul.j3

___
Python tracker 

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



[issue37829] Documentation of stdlib: add example of mixed arguments to dict()

2019-08-12 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +inada.naoki, rhettinger
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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Adding Serhiy since this change was introduced with issue32489.

--
nosy: +serhiy.storchaka, xtreak

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Tomer Vromen


New submission from Tomer Vromen :

Bitwise operators have inconsistent behavior when acting on bool values: 
(Python 3.7.4)

# "&" works like "and"
>>> True & True
True
>>> True & False
False
>>> False & False
False

# "|" works like "or"
>>> True | True
True
>>> True | False
True
>>> False | False
False

# "~" does not work like "not"!
>>> ~True
-2
>>> ~False
-1

The result of this is the a user might start working with "&" and "|" on bool 
values (for whatever reason) and it will work as expected. But then, when 
adding "~" to the mix, things start to break.

The proposal is to make "~" act like "not" on bool values, i.e. ~True will be 
False; ~False will be True.

I'm not sure if this has any negative impact on existing code. I don't expect 
any, but you can never know. If there is no objection to this change, I can 
even try to implement it myself an submit a patch.

--
components: Interpreter Core
messages: 349452
nosy: tomerv
priority: normal
severity: normal
status: open
title: bool(~True) == True
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue37832] _Py_HashRandomization_Init: failed to get random numbers

2019-08-12 Thread Jeffrey Walton


New submission from Jeffrey Walton :

I need to setup a Debian HURD test machine to investigate a problem I was 
seeing in the Crypto++ library. After setting up the machine and running an 
apt-get install for some build tools I noticed Python was failing:

Fatal Python error: _Py_HashRandomization_Init: failed to get random 
numbers to initialize Python

It seems HURD no longer provides /dev/urandom out of the box. This is new 
behavior, and it was not present in the past. It is present in the ISO's from 
June 2019 (https://cdimage.debian.org/cdimage/ports/current-hurd-i386/iso-dvd/).

Python may want to employ a fallback strategy since whatever is using Python 
ignores the error and trucks on.

Sorry to dump this on you.

-

jwalton@hurd-x86:~$ ls /dev/*rand*
/dev/random

jwalton@hurd-x86:~$ python --version
Python 2.7.16

jwalton@hurd-x86:~$ uname -a
GNU hurd-x86 0.9 GNU-Mach 1.8+git20190109-486/Hurd-0.9 i686-AT386 GNU

jwalton@hurd-x86:~$ apt-cache show python
Package: python
Architecture: hurd-i386
Version: 2.7.16-1
Multi-Arch: allowed
Priority: standard
Section: python
Source: python-defaults
Maintainer: Matthias Klose 
Installed-Size: 68
Provides: python-ctypes, python-email, python-importlib, python-profiler, 
python-wsgiref
Pre-Depends: python-minimal (= 2.7.16-1)
Depends: python2.7 (>= 2.7.16-1~), libpython-stdlib (= 2.7.16-1), python2 (= 
2.7.16-1)
...

--
components: Interpreter Core
messages: 349453
nosy: Jeffrey.Walton
priority: normal
severity: normal
status: open
title: _Py_HashRandomization_Init: failed to get random numbers
type: enhancement
versions: Python 2.7

___
Python tracker 

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



[issue37832] _Py_HashRandomization_Init: failed to get random numbers

2019-08-12 Thread STINNER Victor


STINNER Victor  added the comment:

> It seems HURD no longer provides /dev/urandom out of the box.

Why not? How is an application supposed to get entropy from the kernel or from 
the system?

In short, it seems like Python no longer supports HURD anymore. You can patch 
Python on HURD for your specific needs (ex: put a patch in Debian) if you want 
to workaround this issue.

--
nosy: +vstinner

___
Python tracker 

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



[issue37804] Remove Thread.isAlive in Python 3.8

2019-08-12 Thread STINNER Victor


Change by STINNER Victor :


--
title: Remove Thread.isAlive -> Remove Thread.isAlive in Python 3.8

___
Python tracker 

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



[issue37804] Remove Thread.isAlive in Python 3.9

2019-08-12 Thread STINNER Victor


Change by STINNER Victor :


--
title: Remove Thread.isAlive in Python 3.8 -> Remove Thread.isAlive in Python 
3.9

___
Python tracker 

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



[issue37804] Remove Thread.isAlive

2019-08-12 Thread STINNER Victor


STINNER Victor  added the comment:

Calling threading.isAlive() starts to emit a DeprecationWarning in Python 3.8. 
I'm ok to remove the alias in Python 3.9.

--

___
Python tracker 

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



[issue37832] Python requires /dev/urandom on HURD: _Py_HashRandomization_Init: failed to get random numbers

2019-08-12 Thread STINNER Victor


Change by STINNER Victor :


--
title: _Py_HashRandomization_Init: failed to get random numbers -> Python 
requires /dev/urandom on HURD: _Py_HashRandomization_Init: failed to get random 
numbers

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for your report Batuhan.

But PR 15221 is not proper way to fix it. It will not work when return an 
iterable. This issue should be fixed at compiler level. The generated code is:

Disassembly of ", line 1>:
  2   0 LOAD_GLOBAL  0 (range)
  2 LOAD_CONST   1 (2)
  4 CALL_FUNCTION1
  6 GET_ITER
>>8 FOR_ITER24 (to 34)
 10 STORE_FAST   0 (number)

  3  12 SETUP_FINALLY   12 (to 26)

  4  14 LOAD_FAST0 (number)
 16 POP_BLOCK
 18 CALL_FINALLY 6 (to 26)
 20 ROT_TWO
 22 POP_TOP
 24 RETURN_VALUE

  6 >>   26 POP_FINALLY  0
 28 JUMP_ABSOLUTE8
 30 END_FINALLY
 32 JUMP_ABSOLUTE8
>>   34 LOAD_CONST   0 (None)
 36 RETURN_VALUE

The return statement pushes a value at the stack (offset 14) and the continue 
statement jumps to the beginning of the loop (offset 28). The stack is not 
balanced here.

--
assignee:  -> serhiy.storchaka
nosy: +Mark.Shannon

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +lukasz.langa
priority: normal -> release blocker

___
Python tracker 

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



[issue37823] Telnet documentation: fix the link to open()

2019-08-12 Thread Matthew Bruggeman


Matthew Bruggeman  added the comment:

I can take a look

--
nosy: +Matthew Bruggeman

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It looks to me, that it is not possible to solve this with the current 
bytecode. Perhaps the only way to fix a crash is to revert issue32489.

Implementing Mark's idea about inlining the code of a "finally" block may help 
to solve the issue with "continue" in "finally".

--

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Mark Dickinson


Mark Dickinson  added the comment:

For instances of `int`, `~` does bitwise negation (with the usual 
two's-complement with an infinite number of bits model that Python uses for all 
bitwise operations on arbitrary-precision integers).

And rightly or wrongly, `True` and `False` are instances of `int`, so it should 
be possible to use `True` almost anywhere you'd usually use `1`, with no change 
in behaviour. The proposed change would give us `True == 1` but `~True != ~1`.

So I think we're stuck with the current behaviour.

Given a time machine, this could arguably be "fixed" by making `True` equal to 
`-1` rather than `1` ... But absent that time machine, I'd expect some amount 
of breakage from the proposed change.

It's worth noting that NumPy's `bool_` type _does_ do this:

>>> import numpy as np
>>> ~np.bool_(True)
False
>>> ~np.bool_(False)
True

But `np.bool_` doesn't have the same "is-a" relationship with integers:

>>> np.bool_.__mro__
(, , )

IOW, -1 from me.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Batuhan


Batuhan  added the comment:

Raising an error can handle this because it is impossible to reach to return so 
we can declare this as an illegal syntax?

--

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Mark Dickinson


Mark Dickinson  added the comment:

Looks like this is essentially a duplicate of #12447

--

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread STINNER Victor


STINNER Victor  added the comment:

> It looks to me, that it is not possible to solve this with the current 
> bytecode. Perhaps the only way to fix a crash is to revert issue32489.

That sounds like a good compromise to unblock next Python 3.8 release. 
issue32489 can wait another release (Python 3.9), no?

--

___
Python tracker 

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



[issue34155] email.utils.parseaddr mistakenly parse an email

2019-08-12 Thread STINNER Victor


STINNER Victor  added the comment:

I change the issue type to security because of 
https://bugs.python.org/issue34155#msg340534: "Note that this bug was used in 
an actual security attack so it is serious".

--
type: behavior -> security

___
Python tracker 

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



[issue34155] email.utils.parseaddr mistakenly parse an email

2019-08-12 Thread STINNER Victor


STINNER Victor  added the comment:

This issue is a security issue so Python 2.7, 3.5, 3.6 should also be fixed, no?

--
status: closed -> open
versions: +Python 2.7, 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



[issue37762] IDLE very slow due a super long line output in chunks

2019-08-12 Thread Tal Einat


Tal Einat  added the comment:

With PR GH-15211 (for issue #37827), which implements terminal-like handling of 
the \r and \b control characters, the TensorFlow tutorial almost works as 
intended in the IDLE shell; a minor change to Tensorflow is needed to make it 
work as intended.

Tensorflow inspect sys.stdout to decide whether to use \r and \b control 
characters is its progress output. Since it recognizes that IDLE's sys.stdout 
replacement isn't a terminal, it decides not to. Overriding the 
_dynamic_display attribute of the Progbar class in 
tensorflow/python/keras/utils/generic_utils.py makes it work very nicely with 
the above mentioned PR.

(I checked this on Windows; it is possible that it will "just work" on other 
OSs.)

--

___
Python tracker 

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



[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2019-08-12 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue37774] Micro-optimize vectorcall using PY_LIKELY

2019-08-12 Thread STINNER Victor


STINNER Victor  added the comment:

I dislike adding these macros:

#  define Py_UNLIKELY(value) __builtin_expect(!!(value), 0)
#  define Py_LIKELY(value) __builtin_expect(!!(value), 1)

It's too easy to introduce a performance regression by mistake. IHMO PGO 
compilation already defeats the purpose of these macros. You should use PGO 
build.

--

___
Python tracker 

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



[issue37774] Micro-optimize vectorcall using PY_LIKELY

2019-08-12 Thread STINNER Victor


STINNER Victor  added the comment:

My previous attempt: bpo-29461.

--

___
Python tracker 

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



[issue37583] Got a 113 error when running the test_socket

2019-08-12 Thread STINNER Victor


STINNER Victor  added the comment:

I don't understand such error:


==
ERROR: testSendmsgBadMultiCmsg (test.test_socket.SendmsgTests)
--
Traceback (most recent call last):
  File "/home/shihai/workspace/cpython/Lib/test/test_socket.py", line 2649, in 
setUp
self.serv_sock.settimeout(self.fail_timeout)
AttributeError: 'SendmsgTests' object has no attribute 'serv_sock'

--

___
Python tracker 

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



[issue36974] Implement PEP 590

2019-08-12 Thread STINNER Victor


STINNER Victor  added the comment:

'SystemError: bad call flags' error message LGTM, I don't think that it should 
be changed.

> Are there many projects that define functions/methods but never call them?

I have no idea.

--

___
Python tracker 

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



[issue15266] Perform the same checks as PyPI for Description field

2019-08-12 Thread STINNER Victor


STINNER Victor  added the comment:

> Why are can I still find these issues in the "Easy issues" list?

My bad... I only added a comment but forgot to remove the easy keyword. It's 
now removed ;-)

--

___
Python tracker 

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



[issue15266] Perform the same checks as PyPI for Description field

2019-08-12 Thread STINNER Victor


Change by STINNER Victor :


--
keywords:  -easy

___
Python tracker 

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



[issue37415] Error build Python with Intel compiler: doesn't provide atomic_uintptr_t

2019-08-12 Thread STINNER Victor


STINNER Victor  added the comment:

> Changing Include/pyatomic.h to use _Atomic as suggested by Victor in 
> msg346785 leads to the error that _Atomic was undefined.

No idea how to define a "_Py_atomic_address" type with icc 2019.4 in this case. 
If someone has a working patch, I can review it ;-)

--

___
Python tracker 

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



[issue15266] Perform the same checks as PyPI for Description field

2019-08-12 Thread Giovanni Cappellotto


Change by Giovanni Cappellotto :


--
nosy:  -potomak

___
Python tracker 

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



[issue37833] tkinter crashes macOS in the latest macOS update 10.14.6

2019-08-12 Thread Ricardo Smits


New submission from Ricardo Smits :

tkVersion == 8.6

After the new update in macOS (10.14.6):

In any python interpreter, when running tk.Tk() it makes macOS crash and logout 
giving the following error:
$ CGSTrackingRegionSetIsEnabled returned CG error 268435459
$ HIToolbox: received notification of WindowServer event port death.

--
components: macOS
messages: 349472
nosy: ned.deily, ronaldoussoren, smits92
priority: normal
severity: normal
status: open
title: tkinter crashes macOS in the latest macOS update 10.14.6
type: crash
versions: Python 3.7

___
Python tracker 

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



[issue37804] Remove Thread.isAlive in Python 3.9

2019-08-12 Thread Dong-hee Na


Change by Dong-hee Na :


--
keywords: +patch
pull_requests: +14949
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15225

___
Python tracker 

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



[issue37642] timezone allows no offset from range (23:59, 24:00)

2019-08-12 Thread Paul Ganssle


Change by Paul Ganssle :


--
pull_requests: +14950
pull_request: https://github.com/python/cpython/pull/15226

___
Python tracker 

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



[issue37642] timezone allows no offset from range (23:59, 24:00)

2019-08-12 Thread Paul Ganssle


Change by Paul Ganssle :


--
pull_requests: +14951
pull_request: https://github.com/python/cpython/pull/15227

___
Python tracker 

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



[issue37833] tkinter crashes macOS in the latest macOS update 10.14.6

2019-08-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This is almost certainly a bug in macOS. I wonder if it is possible to work 
around it in Python.

--

___
Python tracker 

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



[issue37398] contextlib.ContextDecorator decorating async functions

2019-08-12 Thread Yury Selivanov


Yury Selivanov  added the comment:

> I think a simple iscoroutinefunction check will be pretty close to 100% 
> matching what users expect.

Yes, "pretty close", but not reliable. :)  E.g. I can easily design a decorator 
that when applied first would break the proposed iscoroutinefunction logic.  
While decorators like that aren't popular, I'd be wary about introducing a 
solution that can lead to hours of debugging in some weird (and maybe stupid) 
cases.

> Or, if we don't change the semantics, then we can still be 100% confident 
> that if iscoroutinefunction returns true, then the user has made a mistake. 
> (I.e., if we make this issue a warning, then it's possible we'll miss print a 
> warning in some complicated cases, but we can be confident that all the 
> warnings we do print are correct.)

+1 to implement a warning the way you suggest.

--

___
Python tracker 

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



[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +14952
pull_request: https://github.com/python/cpython/pull/15228

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Josh Rosenberg


Change by Josh Rosenberg :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> ~True is not False

___
Python tracker 

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



[issue35855] IDLE squeezer: improve unsqueezing and autosqueeze default

2019-08-12 Thread Tal Einat


Tal Einat  added the comment:

See issue #37768 regarding opening of help(object) output in a separate window.

--

___
Python tracker 

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



[issue37564] ArgumentParser should support bool type according to truth values

2019-08-12 Thread paul j3


paul j3  added the comment:

This patch lacks proper documentation, and is too English language specific.

For users who assume 'type' means a class rather than function (callable) this 
change does not need documentation, since it accommodates that assumption.  But 
more experienced users, or ones who read the documentation with care, this 
change could be puzzling.  "Why does 'bool' work?"  Admittedly they are 
unlikely to try it.  Still, we are deviating the documented behavior.

We also need to pay attention to internationalization.  Argparse wraps most 
error messages and string displays in 'gettext'.  There isn't any other part of 
argparse that assumes that sys.argv strings have English meanings.

--

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

+0 This proposal may be worth re-considering.  I've seen the problem arise in 
practice on multiple occasions.  I suspect that it will continue to give people 
trouble.

Right now, a bool is-a int that 1) only has two singleton instances equal to 
zero and one, 2) has a different repr, and 3) has the & | and ^ operations 
redefined to return instances of bool.

I think we could also override the ~ operation.  That would be a Liskov 
violation, making bools slightly less substitutable for ints, but it does so in 
a way that is intuitive and likely to match what a user intends when inverting 
a bool.

--
nosy: +rhettinger, tim.peters
status: closed -> open

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Mark Dickinson


Mark Dickinson  added the comment:

See also the discussion started by Antoine here:

https://mail.python.org/pipermail//python-ideas/2016-April/039488.html

--

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Mark Dickinson


Change by Mark Dickinson :


--
stage: resolved -> 

___
Python tracker 

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



[issue23837] asyncio: read pipe transport tries to resume reading after loop is gone

2019-08-12 Thread Sascha Silbe


Change by Sascha Silbe :


--
nosy: +sascha_silbe

___
Python tracker 

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



[issue37583] Got a 113 error when running the test_socket

2019-08-12 Thread hai shi


hai shi  added the comment:

Oh, sorry, victor. I use ./python -m unittest xxx before.

Updating the test result again.

--
Added file: https://bugs.python.org/file48538/test_socket_fail_info_v2.txt

___
Python tracker 

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



[issue32912] Raise non-silent warning for invalid escape sequences

2019-08-12 Thread Steve Dower


Change by Steve Dower :


--
nosy: +steve.dower

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

-1 from me too.

Making True == -1 looks interesting, but it has drawbacks.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue37804] Remove Thread.isAlive in Python 3.9

2019-08-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 44046fe4fc7f00a6eb855b33e6a3f953cf5233a5 by Victor Stinner 
(Dong-hee Na) in branch 'master':
bpo-37804: Remove the deprecated method threading.Thread.isAlive() (GH-15225)
https://github.com/python/cpython/commit/44046fe4fc7f00a6eb855b33e6a3f953cf5233a5


--

___
Python tracker 

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



[issue37804] Remove Thread.isAlive in Python 3.9

2019-08-12 Thread STINNER Victor


Change by STINNER Victor :


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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +14953
pull_request: https://github.com/python/cpython/pull/15230

___
Python tracker 

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



[issue32489] Allow 'continue' in 'finally' clause

2019-08-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +14954
pull_request: https://github.com/python/cpython/pull/15230

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Mark Dickinson


Mark Dickinson  added the comment:

> Making True == -1 looks interesting, but it has drawbacks.

Yes, please ignore that part of my post. :-) It shouldn't be considered 
seriously until a time machine turns up (and probably not even then).

My main worry with the proposed change is accidental breakage from the change 
in meaning. I've so far failed to find any examples of real-world functions 
that could/would be broken - the closest I've come is floating-point 
bit-pattern manipulation functions (constructing a bit-string from a sign, 
exponent and significand, where it's quite natural to treat the sign both as an 
"is_negative" boolean and as a 0-or-1 integer). But that case didn't involve a 
`~sign` at any point, so it doesn't count.

Still, I have a nagging suspicion that such a function will turn up if we make 
this change.

Having ~True *not* be the same as ~1 feels like a bigger surprise to me than 
having ~True not be False; it breaks my simple mental model that bools always 
behave like ints in numeric contexts.

--

___
Python tracker 

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



[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Batuhan


Batuhan  added the comment:

I closed the my PR in favor of Serhiy's PR.

On Mon, Aug 12, 2019, 9:18 PM Serhiy Storchaka 
wrote:

>
> Change by Serhiy Storchaka :
>
>
> --
> pull_requests: +14953
> pull_request: https://github.com/python/cpython/pull/15230
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Mark Dickinson


Mark Dickinson  added the comment:

There's also the minor annoyance that there isn't currently an obvious safe way 
to convert an integer-like thing to an actual int, to make sure that bools do 
the right thing in a numeric context. operator.index *ought* to be that obvious 
way, but it leaves bools untouched.

>>> operator.index(True)
True

--

___
Python tracker 

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



[issue37833] tkinter crashes macOS in the latest macOS update 10.14.6

2019-08-12 Thread Ned Deily


Ned Deily  added the comment:

Can you be more specific about the source of your Pythons and Tk 8.6 and 
exactly what version it is? Tk through tkinter seems to work as expected (and 
without a crash) when I try the current Python.org pythons with their built-in 
Tk 8.6.6 or current MscPorts Pythons with their Tk 8.6.9 all running on the 
latest released 10.14.6 with Supplemental Update on a MacBook Pro.

Ronald, are you able to reproduce this?

--

___
Python tracker 

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



[issue37834] readlink on Windows cannot read app exec links

2019-08-12 Thread Steve Dower


New submission from Steve Dower :

The IO_REPARSE_TAG_APPEXECLINK was introduced for aliases to installed UWP apps 
that require activation before they can be executed.

Currently these are in an unusual place as far as Python support goes - stat() 
fails where lstat() succeeds, but the lstat() result doesn't have the right 
flags to make is_link() return True.

It's not clear whether we *should* treat these as regular symlinks, given there 
are a number of practical differences, but since we can enable it I'm going to 
post a PR anyway.

--
components: Windows
messages: 349486
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: readlink on Windows cannot read app exec links
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue37834] readlink on Windows cannot read app exec links

2019-08-12 Thread Steve Dower


Change by Steve Dower :


--
nosy: +eryksun

___
Python tracker 

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



[issue37834] readlink on Windows cannot read app exec links

2019-08-12 Thread Steve Dower


Change by Steve Dower :


--
keywords: +patch
pull_requests: +14955
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15231

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Tim Peters


Tim Peters  added the comment:

Mark, isn't `int()` the obvious way "to convert an integer-like thing to an 
actual int"?

>>> int(True)
1
>>> int(False)
0

For the rest, I'm -True on making ~ do something magical for bools inconsistent 
with what it does for ints.  "is-a" is a promise.

--

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

For reference, the link to the Python-Ideas discussion in Mailman 3:

https://mail.python.org/archives/list/python-id...@python.org/thread/7UR3XGXNLGCM6QFR7KTIQ2QGVRS6QNZH/

--

___
Python tracker 

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



[issue37831] bool(~True) == True

2019-08-12 Thread Mark Dickinson


Mark Dickinson  added the comment:

> isn't `int()` the obvious way "to convert an integer-like thing to an actual 
> int"?

Well sorta, except that it's too lenient, letting in strings, floats, Decimal 
instances and the like. The strings isn't so much of an issue - it's more the 
silent truncation with the floats and Decimals that's problematic.

--

___
Python tracker 

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



[issue16637] py-bt, py-locals, etc. GDB commands fail with output-radix 16

2019-08-12 Thread Roundup Robot


Change by Roundup Robot :


--
pull_requests: +14956
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15232

___
Python tracker 

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



[issue37833] tkinter crashes macOS in the latest macOS update 10.14.6

2019-08-12 Thread Ricardo Smits


Ricardo Smits  added the comment:

I am on a Conda environment with Python 3.7.4 with the corresponding
Tkinter 8.6 that came with it. I tried to use some apps I compiled with
Pyinstaller and all of them caused this crash. So I tried line by line on
the terminal (to cross out Pyinstaller as the problem) and "root = tk.Tk()"
was where it crashed for me.

Here are more people with the same issues:
https://github.com/pyinstaller/pyinstaller/issues/4334

As Ronald said, most certainly it is a macOS bug, but I don't think they
will bother to fix this when they are so close to their 10.15 release :/

On Mon, Aug 12, 2019 at 8:39 PM Ned Deily  wrote:

>
> Ned Deily  added the comment:
>
> Can you be more specific about the source of your Pythons and Tk 8.6 and
> exactly what version it is? Tk through tkinter seems to work as expected
> (and without a crash) when I try the current Python.org pythons with their
> built-in Tk 8.6.6 or current MscPorts Pythons with their Tk 8.6.9 all
> running on the latest released 10.14.6 with Supplemental Update on a
> MacBook Pro.
>
> Ronald, are you able to reproduce this?
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-08-12 Thread Steve Dower


Steve Dower  added the comment:


New changeset 732775d6be8062e72cf4995d5a9db0170e22c233 by Steve Dower (Derek 
Keeler) in branch 'master':
bpo-37354: Make Powershell Activate.ps1 script static to allow for signing 
(GH-14967)
https://github.com/python/cpython/commit/732775d6be8062e72cf4995d5a9db0170e22c233


--

___
Python tracker 

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



[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-08-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14957
pull_request: https://github.com/python/cpython/pull/15233

___
Python tracker 

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



[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-08-12 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +14958
pull_request: https://github.com/python/cpython/pull/15235

___
Python tracker 

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



  1   2   >