attrs/changelog.d
Victor Song c2824ac30f
Pass args from `__init__` to `__attrs_pre_init__` if requested (#1187)
* Pass args from `__init__` to `__attrs_pre_init__` if requested

Detect if `__attrs_pre_init__` has arguments besides `self`
using `inspect.signature`. If so, pass `__attrs_pre_init__`
the same arguments that `__init__` (or `__attrs_init__`)
expects.

* Add changelog entry for `__attrs_pre_init__` args changes

* Don't use monkeypatch in new code

* Clarify docs

* Missed one monkeypatching

---------

Co-authored-by: Hynek Schlawack <hs@ox.cx>
2023-09-29 08:47:51 +02:00
..
1141.change.md Fix type annotation for resolve_types() (#1141) 2023-06-04 11:27:09 +02:00
1158.change.md Semantic linefeeds 2023-07-07 14:36:55 +02:00
1165.change.md Fix TypeError for `asdict(<class with namedtuple>, retain_collection_types=True)` (#1165) 2023-07-29 21:31:36 +02:00
1172.change.md Allow subclassing of AttrsInstance and Protocol at once (#1172) 2023-08-06 21:33:03 +02:00
1187.change.md Pass args from `__init__` to `__attrs_pre_init__` if requested (#1187) 2023-09-29 08:47:51 +02:00
towncrier_template.md.jinja