Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add weakref_slot to dataclass decorator, to allow instances with slots to be ↵ | Eric V. Smith | 2022-05-02 | 1 | -5/+12 |
| | | | | weakref-able. (#92160) | ||||
* | bpo-46382 dataclass(slots=True) now takes inherited slots into account ↵ | Arie Bovenberg | 2022-03-19 | 1 | -0/+10 |
| | | | | | (GH-31980) Do not include any members in __slots__ that are already in a base class's __slots__. | ||||
* | bpo-43532: add version added to KW_ONLY (GH-31235) | Henry Schreiner | 2022-02-09 | 1 | -0/+2 |
| | | | | | Minor missing version note mentioned at the end of (and affected me independently before reading that note). Automerge-Triggered-By: GH:ericvsmith | ||||
* | bpo-46290: Fix parameter names in dataclasses docs (GH-30450) | Zsolt Dollenstein | 2022-01-08 | 1 | -12/+12 |
| | |||||
* | Remove erroneous padding in dataclasses (GH-30076) | Andre Delfino | 2021-12-12 | 1 | -63/+63 |
| | | | Automerge-Triggered-By: GH:ericvsmith | ||||
* | bpo-44674: Use unhashability as a proxy for mutability for default dataclass ↵ | Eric V. Smith | 2021-12-11 | 1 | -3/+9 |
| | | | | | __init__ arguments. (GH-29867) `@dataclass` in 3.10 prohibits using list, dict, or set as default values. It does this to avoid the mutable default problem. This test is both too strict, and not strict enough. Too strict, because some immutable subclasses should be safe, and not strict enough, because other mutable types should be prohibited. With this change applied, `@dataclass` now uses unhashability as a proxy for mutability: if objects aren't hashable, they're assumed to be mutable. | ||||
* | bpo-43905: Expand dataclasses.astuple() and asdict() docs (GH-26154) | andrei kulakov | 2021-11-29 | 1 | -4/+18 |
| | | | | | | Expanded ``astuple()`` docs, warning about deepcopy being applied and providing a workaround. Automerge-Triggered-By: GH:ericvsmith | ||||
* | [doc] Reword sentinel object summary in dataclasses (GH-27792) | Ville Korhonen | 2021-09-02 | 1 | -4/+3 |
| | | | | | This sentinel value (`MISSING`) is also used as default value for the `kw_only` parameter introduced in Python 3.10. It's cleaner to simply omit the usage here. Co-authored-by: Łukasz Langa <lukasz@langa.pl> | ||||
* | Fix reST markup in dataclasses.rst (GH-27843) | Jean-Abou-Samra | 2021-08-19 | 1 | -1/+1 |
| | | | | The signature of field() had an extraneous colon at the end, causing it to appear all bold and without the module name. | ||||
* | Fix typo in dataclasses documentation (#27360) | thomkeh | 2021-07-26 | 1 | -1/+1 |
| | | | "affect" -> "effect" | ||||
* | bpo-43558: Add note about base class initialization to dataclasses doc ↵ | dhoekstra2000 | 2021-05-10 | 1 | -0/+21 |
| | | | | (GH-25967) | ||||
* | Fix a word in dataclasses docs. (GH-26003) | Eric V. Smith | 2021-05-09 | 1 | -1/+1 |
| | |||||
* | Fix minor grammar problems in dataclasses documentation (GH-25948) | Scott Noyes | 2021-05-06 | 1 | -7/+7 |
| | | | Some missing words; some odd word choices. | ||||
* | dataclasses docs: add a missing word. (GH-25839) | Eric V. Smith | 2021-05-03 | 1 | -1/+1 |
| | |||||
* | More clarification of kw_only args. (GH-25838) | Eric V. Smith | 2021-05-03 | 1 | -13/+20 |
| | | | Also, clarify that the dataclass decorator is what raises an error for some mutable defaults. | ||||
* | Fix invalid markup (#25833) | Raymond Hettinger | 2021-05-03 | 1 | -2/+1 |
| | |||||
* | More work on documenting dataclass keyword-only fields. (GH-25828) | Eric V. Smith | 2021-05-03 | 1 | -16/+40 |
| | |||||
* | bpo-43997: Add versionadded directives for to match_args, kw_only, and slots ↵ | Shreyan Avigyan | 2021-05-02 | 1 | -0/+8 |
| | | | | in dataclasses.dataclasses documentation (GH-25803) | ||||
* | Minor tweaks to dataclasses keyword-only fields documentation. (GH-25801) | Eric V. Smith | 2021-05-02 | 1 | -5/+5 |
| | |||||
* | Improve the dataclasses kw_only documentation. (GH-25799) | Eric V. Smith | 2021-05-01 | 1 | -13/+28 |
| | |||||
* | bpo-42269: Add slots parameter to dataclass decorator (GH-24171) | Yurii Karabas | 2021-05-01 | 1 | -5/+10 |
| | | | Add slots parameter to dataclass decorator and make_dataclass function. | ||||
* | bpo-43971: Add spaces around annotated arg default '=' (GH-25702) | Mohamed Moselhy | 2021-04-30 | 1 | -1/+1 |
| | | | Result: "quantity_on_hand: int = 0". | ||||
* | bpo-43938: improve dataclasses.FrozenInstanceError documentation (GH-25603) | Llandy Riveron Del Risco | 2021-04-26 | 1 | -1/+1 |
| | |||||
* | Add keyword-only fields to dataclasses. (GH=25608) | Eric V. Smith | 2021-04-26 | 1 | -6/+36 |
| | |||||
* | bpo-43764: Add match_args=False parameter to dataclass decorator and to ↵ | Eric V. Smith | 2021-04-11 | 1 | -5/+14 |
| | | | | | make_dataclasses function. (GH-25337) Add match_args=False parameter to dataclass decorator and to make_dataclass function. | ||||
* | bpo-43415: Fix typo on dataclasses.rst (#24789) | Guilherme Martins Crocetti | 2021-03-08 | 1 | -1/+1 |
| | |||||
* | [doc] Use list[int] instead of List[int] (etc.) in a few more places (GH-22524) | Andre Delfino | 2020-10-03 | 1 | -2/+2 |
| | | | | | This changes a few occurrences left behind by #22340. Automerge-Triggered-By: @gvanrossum | ||||
* | bpo-41199: Docstring convention not followed for dataclasses documentation ↵ | marload | 2020-07-09 | 1 | -1/+1 |
| | | | | | page (GH-21413) Automerge-Triggered-By: @ericvsmith | ||||
* | Make the first dataclass example more useful (GH-19994) | Ned Batchelder | 2020-05-08 | 1 | -0/+2 |
| | |||||
* | bpo-33961: Adjusted dataclasses docs to correct exceptions raised. (GH-7917) ↵ | Fabio Sangiovanni | 2019-12-25 | 1 | -3/+4 |
| | | | | (GH-17677) | ||||
* | bpo-38738: Fix formatting of True and False. (GH-17083) | Serhiy Storchaka | 2019-11-12 | 1 | -3/+3 |
| | | | | | | | | | * "Return true/false" is replaced with "Return ``True``/``False``" if the function actually returns a bool. * Fixed formatting of some True and False literals (now in monospace). * Replaced "True/False" with "true/false" if it can be not only bool. * Replaced some 1/0 with True/False if it corresponds the code. * "Returns <bool>" is replaced with "Return <bool>". | ||||
* | bpo-37163: Make the obj argument of dataclasses.replace() a positional-only. ↵ | Serhiy Storchaka | 2019-06-26 | 1 | -1/+1 |
| | | | | (GH-14390) | ||||
* | bpo-35566: Add links to annotation glossary term (GH-11291) | Cheryl Sabella | 2018-12-24 | 1 | -3/+3 |
| | |||||
* | Fix astuple in dataclasses documentation (GH-9631) | 방성범 (Bang Seongbeom) | 2018-09-29 | 1 | -1/+1 |
| | |||||
* | Fix typo in the dataclasses's doc (GH-8896) | Daniel Dương | 2018-08-24 | 1 | -1/+1 |
| | |||||
* | Dataclasses: Fix example on 30.6.8, add method should receive a list rather ↵ | Tom Faulkner | 2018-07-11 | 1 | -1/+1 |
| | | | | | | than an integer. (GH-8038) Change example function to append rather than add lists. | ||||
* | bpo-32216: Update dataclasses documentation (#6913) | Barry Warsaw | 2018-05-16 | 1 | -75/+79 |
| | |||||
* | Minor tweaks to dataclasses docs. (GH-6903) | Eric V. Smith | 2018-05-16 | 1 | -3/+3 |
| | |||||
* | bpo-32216: Add documentation for dataclasses (GH-6886) | Eric V. Smith | 2018-05-16 | 1 | -0/+588 |
This is an initial version that likely requires much polishing. I'm adding it lay out the structure and so we have something to start working from. |