Skip to content

No longer use implicit convertion to int with loss #82180

Closed

Description

@serhiy-storchaka
BPO 37999
Nosy @mdickinson, @serhiy-storchaka, @hpjansson
PRs
  • bpo-37999: No longer use __int__ in implicit integer conversions. #15636
  • bpo-37999: Simplify the conversion code for %c, %d, %x, etc. #20437
  • bpo-37999: Fix outdated __int__ and nb_int references in comments #20449
  • gh-81163: Add support for extended color functions in ncurses 6.1 #17536
  • 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 2020-05-28.08:12:43.571>
    created_at = <Date 2019-09-01.11:24:04.696>
    labels = ['interpreter-core', 'type-feature', '3.10']
    title = 'No longer use implicit convertion to int with loss'
    updated_at = <Date 2020-07-01.19:01:56.267>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2020-07-01.19:01:56.267>
    actor = 'hpj'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-05-28.08:12:43.571>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2019-09-01.11:24:04.696>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37999
    keywords = ['patch']
    message_count = 6.0
    messages = ['350947', '370004', '370063', '370072', '370173', '372622']
    nosy_count = 3.0
    nosy_names = ['mark.dickinson', 'serhiy.storchaka', 'hpj']
    pr_nums = ['15636', '20437', '20449', '17536']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue37999'
    versions = ['Python 3.10']

    Linked PRs

    Activity

    1. serhiy-storchaka commented on Sep 1, 2019

      @serhiy-storchaka
      MemberAuthor

      Use only the __index__() method for implicit conversion to iteger, and not __int__().

      This converts deprecation warnings added in bpo-36048 into TypeError.

    2. serhiy-storchaka commented on May 26, 2020

      @serhiy-storchaka
      MemberAuthor

      New changeset 578c395 by Serhiy Storchaka in branch 'master':
      bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)
      578c395

    3. mdickinson commented on May 27, 2020

      @mdickinson
      Member

      There are some comments in the Objects/longobject.c code that still refer to __int__, and could use an update.

      For example:

      /* Get a C long int from an int object or any object that has an __int__

    4. mdickinson commented on May 27, 2020

      @mdickinson
      Member

      New changeset 20941de by Mark Dickinson in branch 'master':
      bpo-37999: Fix outdated __int__ and nb_int references in comments (GH-20449)
      20941de

    5. serhiy-storchaka commented on May 28, 2020

      @serhiy-storchaka
      MemberAuthor

      I think it is all here. Thank you Mark for your review and for fixing outdated docs and comments.

    6. serhiy-storchaka commented on Jun 29, 2020

      @serhiy-storchaka
      MemberAuthor

      New changeset e67f7db by Serhiy Storchaka in branch 'master':
      bpo-37999: Simplify the conversion code for %c, %d, %x, etc. (GH-20437)
      e67f7db

    7. transferred this issue fromon Apr 10, 2022
    8. added a commit that references this issue on Aug 12, 2022
    9. added a commit that references this issue on Aug 12, 2022
    10. 2 remaining items

    11. added a commit that references this issue on Aug 12, 2022
    12. added a commit that references this issue on Sep 14, 2022
    13. added 3 commits that reference this issue on Jun 6, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions