classification
Title: isinstance(ast.Constant(value=True), ast.Num) should be False
Type: Stage: resolved
Components: Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Anthony Sottile, serhiy.storchaka, xtreak
Priority: normal Keywords: patch, patch, patch

Created on 2019-01-14 02:31 by Anthony Sottile, last changed 2019-01-18 19:30 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 11547 merged Anthony Sottile, 2019-01-14 02:47
PR 11547 merged Anthony Sottile, 2019-01-14 02:47
PR 11547 merged Anthony Sottile, 2019-01-14 02:47
Messages (3)
msg333579 - (view) Author: Anthony Sottile (Anthony Sottile) * Date: 2019-01-14 02:31
Noticing this in pyflakes

https://github.com/PyCQA/pyflakes/pull/408
msg333585 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python triager) Date: 2019-01-14 06:24
Added Serhiy since this seems to have been caused due to issue32892 and changes made in 6015cc50bc


➜  cpython git:(6015cc50bc) ./python.exe -c 'import ast; print(isinstance(ast.Constant(False), ast.Num))'
True
➜  cpython git:(6015cc50bc) git checkout 6015cc5~1
➜  cpython git:(913876d824) make > /dev/null
➜  cpython git:(913876d824) ./python.exe -c 'import ast; print(isinstance(ast.Constant(False), ast.Num))'
False
msg334008 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-01-18 19:30
New changeset 74176226179ed56ad1c910bec5c4100e72ab4e84 by Serhiy Storchaka (Anthony Sottile) in branch 'master':
bpo-35733: Make isinstance(ast.Constant(boolean), ast.Num) be false. (GH-11547)
https://github.com/python/cpython/commit/74176226179ed56ad1c910bec5c4100e72ab4e84
History
Date User Action Args
2019-01-18 19:30:53serhiy.storchakasetkeywords: patch, patch, patch
status: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-01-18 19:30:30serhiy.storchakasetmessages: + msg334008
2019-01-14 06:24:58xtreaksetkeywords: patch, patch, patch
nosy: + xtreak
messages: + msg333585

2019-01-14 06:13:57xtreaksetkeywords: patch, patch, patch
nosy: + serhiy.storchaka
2019-01-14 02:47:55Anthony Sottilesetkeywords: + patch
stage: patch review
pull_requests: + pull_request11167
2019-01-14 02:47:51Anthony Sottilesetkeywords: + patch
stage: (no value)
pull_requests: + pull_request11166
2019-01-14 02:47:47Anthony Sottilesetkeywords: + patch
stage: (no value)
pull_requests: + pull_request11165
2019-01-14 02:31:19Anthony Sottilecreate