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

Deprecate returning a subclass of complex from __complex__ #74080

Closed
serhiy-storchaka opened this issue Mar 24, 2017 · 2 comments
Closed

Deprecate returning a subclass of complex from __complex__ #74080

serhiy-storchaka opened this issue Mar 24, 2017 · 2 comments
Labels
3.7 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

BPO 29894
Nosy @mdickinson, @serhiy-storchaka
PRs
  • bpo-29894: Deprecate returning an instance of complex subclass from __complex__ #798
  • 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 2017-03-27.18:06:06.242>
    created_at = <Date 2017-03-24.08:27:24.474>
    labels = ['interpreter-core', 'type-feature', '3.7']
    title = 'Deprecate returning a subclass of complex from __complex__'
    updated_at = <Date 2017-03-27.18:06:06.241>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2017-03-27.18:06:06.241>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-03-27.18:06:06.242>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2017-03-24.08:27:24.474>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 29894
    keywords = []
    message_count = 2.0
    messages = ['290080', '290108']
    nosy_count = 2.0
    nosy_names = ['mark.dickinson', 'serhiy.storchaka']
    pr_nums = ['798']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue29894'
    versions = ['Python 3.7']

    @serhiy-storchaka
    Copy link
    Member Author

    This is similar to bpo-26983, but complex() always returned exact complex. A deprecation warning is added just for uniformity with __float__ and __int__.

    @serhiy-storchaka serhiy-storchaka added type-bug An unexpected behavior, bug, or error 3.7 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement and removed type-bug An unexpected behavior, bug, or error labels Mar 24, 2017
    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 671079e by Serhiy Storchaka in branch 'master':
    bpo-29894: Deprecate returning an instance of complex subclass from __complex__. (#798)
    671079e

    @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.7 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant