mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
bpo-33116: Add 'Field' to dataclasses.__all__. (GH-6182) (GH-6183)
- Add missing 'Field' to __all__.
- Improve tests to catch this.
(cherry picked from commit 8e4560a9da
)
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
This commit is contained in:
parent
f5625d58fa
commit
4ddc99d159
3 changed files with 8 additions and 5 deletions
|
@ -1,7 +1,8 @@
|
|||
from dataclasses import (
|
||||
dataclass, field, FrozenInstanceError, fields, asdict, astuple,
|
||||
make_dataclass, replace, InitVar, Field, MISSING, is_dataclass,
|
||||
)
|
||||
# Deliberately use "from dataclasses import *". Every name in __all__
|
||||
# is tested, so they all must be present. This is a way to catch
|
||||
# missing ones.
|
||||
|
||||
from dataclasses import *
|
||||
|
||||
import pickle
|
||||
import inspect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue