[Python-checkins] Add dataclass field default change to 3.11 what's new (#96790)

gvanrossum webhook-mailer at python.org
Tue Sep 13 11:56:37 EDT 2022


https://github.com/python/cpython/commit/4995f5f9a07921c5b90066a22285a538551b36d8
commit: 4995f5f9a07921c5b90066a22285a538551b36d8
branch: main
author: Laurie O <laurie_opperman at hotmail.com>
committer: gvanrossum <gvanrossum at gmail.com>
date: 2022-09-13T08:56:08-07:00
summary:

Add dataclass field default change to 3.11 what's new (#96790)

Co-authored-by: Hugo van Kemenade <hugovk at users.noreply.github.com>

files:
M Doc/whatsnew/3.11.rst

diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 0f6490e6a7c..e3580c5a36f 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -523,6 +523,14 @@ Added non parallel-safe :func:`~contextlib.chdir` context manager to change
 the current working directory and then restore it on exit. Simple wrapper
 around :func:`~os.chdir`. (Contributed by Filipe Laíns in :issue:`25625`)
 
+dataclasses
+-----------
+
+* Change field default mutability check, allowing only defaults which are
+  :term:`hashable` instead of any object which is not an instance of
+  :class:`dict`, :class:`list` or :class:`set`. (Contributed by Eric V. Smith in
+  :issue:`44674`.)
+
 datetime
 --------
 



More information about the Python-checkins mailing list