Skip to content

PEP 563 and annotations __future__ mandatory version #85486

Description

@wyz23x2
mannequin
BPO 41314
Nosy @gvanrossum, @terryjreedy, @ned-deily, @ambv, @YoSTEALTH, @miss-islington, @wyz23x2
PRs
  • bpo-41314: fixed annotations __future__ version #21616
  • [3.9] bpo-41314: fixed annotations __future__ version (GH-21616) #21620
  • [3.8] bpo-41314: fixed annotations __future__ version (GH-21616) #21621
  • 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-07-25.22:12:13.148>
    created_at = <Date 2020-07-16.10:34:24.413>
    labels = ['3.8', 'library', '3.9', '3.10', 'docs']
    title = 'PEP 563 and annotations __future__ mandatory version'
    updated_at = <Date 2020-07-25.22:12:13.147>
    user = 'https://github.com/wyz23x2'

    bugs.python.org fields:

    activity = <Date 2020-07-25.22:12:13.147>
    actor = 'gvanrossum'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2020-07-25.22:12:13.148>
    closer = 'gvanrossum'
    components = ['Documentation', 'Library (Lib)']
    creation = <Date 2020-07-16.10:34:24.413>
    creator = 'wyz23x2'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 41314
    keywords = ['patch']
    message_count = 12.0
    messages = ['373753', '373872', '373907', '374271', '374272', '374283', '374284', '374285', '374287', '374289', '374290', '374292']
    nosy_count = 8.0
    nosy_names = ['gvanrossum', 'terry.reedy', 'ned.deily', 'docs@python', 'lukasz.langa', 'YoSTEALTH', 'miss-islington', 'wyz23x2']
    pr_nums = ['21616', '21620', '21621']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue41314'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    Activity

    1. wyz23x2 commented on Jul 16, 2020

      wyz23x2mannequin
      MannequinAuthor

      In https://docs.python.org/3/library/__future__.html:
      annotations | 3.7.0b1 | *4.0* | PEP-563: Postponed evaluation of annotations

      In PEP-563:
      Starting with Python 3.7, a __future__ import is required to use the described functionality. No warnings are raised.

      In Python *3.10* this will become the default behavior. Use of annotations incompatible with this PEP is no longer supported.

      Python 4.0 or 3.10? Not clear.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      on Jul 18, 2020
    3. terryjreedy commented on Jul 18, 2020

      @terryjreedy
      Member

      The PEP was accepted apparently by Guido sometime after the second posting 21-Nov-2017. Guido added the annotations entry to __future__ on 1/26/2018 with the 'mandatory' version changed to 4.0, which means 'some indefinite undecided future version'. I consider '4.0' to the intentional and definitive until Guido or Lucasz say otherwise.

      When PEP implementations differ from the PEP, we do not usually go back and revise the PEP. The implementation rules unless clearly buggy.

    4. 15 remaining items

    5. gvanrossum commented on Jul 25, 2020

      @gvanrossum
      Member

      Waiting for someone to submit a PR.

    6. miss-islington commented on Jul 25, 2020

      @miss-islington
      Contributor

      New changeset 0028c14 by YoSTEALTH in branch 'master':
      bpo-41314: fixed annotations __future__ version (GH-21616)
      0028c14

    7. gvanrossum commented on Jul 25, 2020

      @gvanrossum
      Member

      @ned This will need your assistance to merge the 3.7 backport IIUC.

    8. gvanrossum commented on Jul 25, 2020

      @gvanrossum
      Member

      Never mind, Miss Islington failed to backport to 3.7, so let's forget about that.

    9. YoSTEALTH commented on Jul 25, 2020

      YoSTEALTHmannequin
      Mannequin

      @gvanrossum I found couple of odd places where 4.0 is mentioned like https://docs.python.org/3/library/array.html for example, should a new issue be created? I am not sure how many more there are.

    10. miss-islington commented on Jul 25, 2020

      @miss-islington
      Contributor

      New changeset b99f770 by Miss Islington (bot) in branch '3.8':
      bpo-41314: fixed annotations __future__ version (GH-21616)
      b99f770

    11. miss-islington commented on Jul 25, 2020

      @miss-islington
      Contributor

      New changeset fdc91c2 by Miss Islington (bot) in branch '3.9':
      bpo-41314: fixed annotations __future__ version (GH-21616)
      fdc91c2

    12. gvanrossum commented on Jul 25, 2020

      @gvanrossum
      Member

      In general, "4.0" means "never", and for some deprecations that seems totally appropriate. I wouldn't worry about it. I'm closing this issue now that all three PRs have been merged. Thanks for your contribution!

    13. transferred this issue fromon Apr 10, 2022
    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 life3.8 (EOL)end of life3.9 (EOL)end of lifedocsDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directory

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions