Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isinstance(ast.Constant(value=True), ast.Num) should be False #79914

Closed
asottile mannequin opened this issue Jan 14, 2019 · 3 comments
Closed

isinstance(ast.Constant(value=True), ast.Num) should be False #79914

asottile mannequin opened this issue Jan 14, 2019 · 3 comments
Labels
3.8 only security fixes

Comments

@asottile
Copy link
Mannequin

asottile mannequin commented Jan 14, 2019

BPO 35733
Nosy @serhiy-storchaka, @asottile, @tirkarthi
PRs
  • bpo-35733: isinstance(ast.Constant(True), ast.Num) is False #11547
  • bpo-35733: isinstance(ast.Constant(True), ast.Num) is False #11547
  • bpo-35733: isinstance(ast.Constant(True), ast.Num) is False #11547
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-01-18.19:30:53.293>
    created_at = <Date 2019-01-14.02:31:19.786>
    labels = ['3.8']
    title = 'isinstance(ast.Constant(value=True), ast.Num) should be False'
    updated_at = <Date 2019-01-18.19:30:53.292>
    user = 'https://github.com/asottile'

    bugs.python.org fields:

    activity = <Date 2019-01-18.19:30:53.292>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-01-18.19:30:53.293>
    closer = 'serhiy.storchaka'
    components = []
    creation = <Date 2019-01-14.02:31:19.786>
    creator = 'Anthony Sottile'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35733
    keywords = ['patch', 'patch', 'patch']
    message_count = 3.0
    messages = ['333579', '333585', '334008']
    nosy_count = 3.0
    nosy_names = ['serhiy.storchaka', 'Anthony Sottile', 'xtreak']
    pr_nums = ['11547', '11547', '11547']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue35733'
    versions = ['Python 3.8']

    @asottile
    Copy link
    Mannequin Author

    asottile mannequin commented Jan 14, 2019

    Noticing this in pyflakes

    PyCQA/pyflakes#408

    @asottile asottile mannequin added the 3.8 only security fixes label Jan 14, 2019
    @tirkarthi
    Copy link
    Member

    Added Serhiy since this seems to have been caused due to bpo-32892 and changes made in 6015cc5

    ➜ cpython git:(6015cc5) ./python.exe -c 'import ast; print(isinstance(ast.Constant(False), ast.Num))'
    True
    ➜ cpython git:(6015cc5) git checkout 6015cc5~1
    ➜ cpython git:(913876d) make > /dev/null
    ➜ cpython git:(913876d) ./python.exe -c 'import ast; print(isinstance(ast.Constant(False), ast.Num))'
    False

    @serhiy-storchaka
    Copy link
    Member

    New changeset 7417622 by Serhiy Storchaka (Anthony Sottile) in branch 'master':
    bpo-35733: Make isinstance(ast.Constant(boolean), ast.Num) be false. (GH-11547)
    7417622

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants