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

Pass keyword arguments from dataclasses.make_dataclass() to @dataclass. #76460

Closed
ericvsmith opened this issue Dec 11, 2017 · 2 comments
Closed
Assignees
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@ericvsmith
Copy link
Member

BPO 32279
Nosy @rhettinger, @ericvsmith, @ilevkivskyi
PRs
  • bpo-32279: Add additional params to make_dataclass(), pass through to dataclass(). #5116
  • bpo-32279: Add additional params to make_dataclass(), pass through to dataclass(). #5117
  • 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/ericvsmith'
    closed_at = <Date 2018-01-06.22:14:16.938>
    created_at = <Date 2017-12-11.19:58:58.856>
    labels = ['3.7', 'type-bug', 'library']
    title = 'Pass keyword arguments from dataclasses.make_dataclass() to @dataclass.'
    updated_at = <Date 2018-01-06.22:14:16.937>
    user = 'https://github.com/ericvsmith'

    bugs.python.org fields:

    activity = <Date 2018-01-06.22:14:16.937>
    actor = 'eric.smith'
    assignee = 'eric.smith'
    closed = True
    closed_date = <Date 2018-01-06.22:14:16.938>
    closer = 'eric.smith'
    components = ['Library (Lib)']
    creation = <Date 2017-12-11.19:58:58.856>
    creator = 'eric.smith'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32279
    keywords = ['patch']
    message_count = 2.0
    messages = ['308074', '309583']
    nosy_count = 3.0
    nosy_names = ['rhettinger', 'eric.smith', 'levkivskyi']
    pr_nums = ['5116', '5117']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue32279'
    versions = ['Python 3.7']

    @ericvsmith
    Copy link
    Member Author

    make_dataclass() should take optional keyword only arguments and pass them to @DataClass() when it uses it after it creates a new class.

    The parameters are:
    init=True, repr=True, eq=True, order=False, hash=None, frozen=False

    Obviously, these should reflect their default values in @DataClass, should that ever change.

    @ericvsmith ericvsmith added the 3.7 (EOL) end of life label Dec 11, 2017
    @ericvsmith ericvsmith self-assigned this Dec 11, 2017
    @ericvsmith ericvsmith added the stdlib Python modules in the Lib dir label Dec 11, 2017
    @ericvsmith
    Copy link
    Member Author

    New changeset d80b443 by Eric V. Smith in branch 'master':
    bpo-32279: Add additional params to make_dataclass(), pass through to dataclass(). (gh-5117)
    d80b443

    @ericvsmith ericvsmith added the type-bug An unexpected behavior, bug, or error label Jan 6, 2018
    @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 stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant