File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 55from dataclasses import _init_fn # type: ignore
66from dataclasses import _set_new_attribute # type: ignore
77from dataclasses import dataclass as parent_dataclass , MISSING
8+ from dataclasses import _fields_in_init_order
89from typing import Generator , Tuple , Any , TypeVar
910
1011T = TypeVar ('T' )
@@ -102,13 +103,14 @@ def gen_fields():
102103
103104 yield field
104105
105- flds = list (gen_fields ())
106+ all_init_fields = list (gen_fields ())
107+ (std_init_fields , kw_only_init_fields ) = _fields_in_init_order (all_init_fields )
106108
107109 # Does this class have a post-init function?
108110 has_post_init = hasattr (cls , _POST_INIT_NAME )
109111
110112 _set_new_attribute (cls , '__init__' ,
111- _init_fn (flds ,
113+ _init_fn (all_init_fields , std_init_fields , kw_only_init_fields ,
112114 frozen ,
113115 has_post_init ,
114116 # The name to use for the "self"
Original file line number Diff line number Diff line change 1010
1111setup (
1212 name = 'dataclass_abc' ,
13- version = '0.0.4 ' ,
13+ version = '0.0.5 ' ,
1414 description = 'Library that lets you define abstract properties for dataclasses.' ,
1515 long_description = long_description ,
1616 long_description_content_type = 'text/markdown' ,
1919 author_email = 'michael.schneeb@outlook.com' ,
2020 classifiers = [
2121 'License :: OSI Approved :: MIT License' ,
22- 'Programming Language :: Python :: 3.7' ,
23- 'Programming Language :: Python :: 3.8' ,
22+ 'Programming Language :: Python :: 3.10' ,
2423 ],
2524 keywords = 'dataclass_abc abstract abc property' ,
2625 packages = ['dataclass_abc' ],
27- python_requires = '>=3.7 ' ,
26+ python_requires = '>=3.10 ' ,
2827)
You can’t perform that action at this time.
0 commit comments