This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients eric.smith, ned.deily
Date 2018-02-24.01:44:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za>
In-reply-to
Content
See https://mail.python.org/pipermail/python-dev/2018-February/152150.html for a discussion.

This will remove the @dataclass hash= tri-state parameter, and replace it with an unsafe_hash= boolean-only parameter.

From that thread:

"""
I propose that with @dataclass(unsafe_hash=False) (the default), a __hash__
method is added when the following conditions are true:

- frozen=True (not the default)
- compare=True (the default)
- no __hash__ method is defined in the class

If we instead use @dataclass(unsafe_hash=True), a __hash__ will be added
regardless of the other flags, but if a __hash__ method is present, an
exception is raised.

Other values (e.g. unsafe_hash=None) are illegal for this flag.
"""
History
Date User Action Args
2018-02-24 01:44:53eric.smithsetrecipients: + eric.smith, ned.deily
2018-02-24 01:44:53eric.smithsetmessageid: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za>
2018-02-24 01:44:53eric.smithlinkissue32929 messages
2018-02-24 01:44:52eric.smithcreate