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

Incorrect signatures of object.__reduce__() and object.__reduce_ex__() #74100

Closed
serhiy-storchaka opened this issue Mar 27, 2017 · 2 comments
Closed
Assignees
Labels
3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 29914
Nosy @avassalotti, @serhiy-storchaka
PRs
  • bpo-29914: Fix default implementations of __reduce__ and __reduce_ex__. #843
  • 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 = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2017-04-08.06:56:08.816>
    created_at = <Date 2017-03-27.08:01:08.344>
    labels = ['interpreter-core', 'type-bug', '3.7']
    title = 'Incorrect signatures of object.__reduce__() and object.__reduce_ex__()'
    updated_at = <Date 2017-04-08.06:56:08.815>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2017-04-08.06:56:08.815>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2017-04-08.06:56:08.816>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2017-03-27.08:01:08.344>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 29914
    keywords = []
    message_count = 2.0
    messages = ['290567', '291323']
    nosy_count = 2.0
    nosy_names = ['alexandre.vassalotti', 'serhiy.storchaka']
    pr_nums = ['843']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue29914'
    versions = ['Python 3.7']

    @serhiy-storchaka
    Copy link
    Member Author

    The special method __reduce__() doesn't take arguments, the special method __reduce_ex__() takes one mandatory argument. But default implementations in the object class takes one optional argument. This looks as an oversign. Proposed patch fixes signatures of object.__reduce__() and object.__reduce_ex__().

    @serhiy-storchaka serhiy-storchaka added 3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Mar 27, 2017
    @serhiy-storchaka serhiy-storchaka self-assigned this Apr 7, 2017
    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 205e00c by Serhiy Storchaka in branch 'master':
    bpo-29914: Fix default implementations of __reduce__ and __reduce_ex__(). (#843)
    205e00c

    @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 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant