pyo3/newsfragments
newcomertv 88f2f6f4d5
feat: support pyclass on tuple enums (#4072)
* feat: support pyclass on tuple enums

* cargo fmt

* changelog

* ruff format

* rebase with adaptation for FnArg refactor

* fix class.md from pr comments

* add enum tuple variant getitem implementation

* fmt

* progress toward getitem and len impl on derive pyclass for complex enum tuple

* working getitem and len slots for complex tuple enum pyclass derivation

* refactor code generation

* address PR concerns
- take py from function argument on get_item
- make more general slot def implementation
- remove unnecessary function arguments
- add testcases for uncovered cases including future feature match_args

* add tracking issue

* fmt

* ruff

* remove me

* support match_args for tuple enum

* integrate FnArg now takes Cow

* fix empty and single element tuples

* use impl_py_slot_def for cimplex tuple enum slots

* reverse erroneous doc change

* Address latest comments

* formatting suggestion

* fix :
- clippy beta
- better compile error (+related doc and test)

---------

Co-authored-by: Chris Arderne <chris@translucent.app>
2024-05-17 02:59:00 +00:00
..
.gitignore use towncrier to generate CHANGELOG 2022-09-08 07:58:53 +01:00
3761.changed.md Change the types of PySliceIndices and `PySlice::indices (#3761) 2024-04-18 07:33:07 +00:00
3966.packaging.md Update heck requirement from 0.4 to 0.5 (#3966) 2024-04-18 10:22:34 +00:00
4061.packaging.md build(deps): update chrono-tz requirement from >= 0.6, < 0.9 to >= 0.6, < 0.10 (#4061) 2024-04-18 08:58:51 +00:00
4072.added.md feat: support pyclass on tuple enums (#4072) 2024-05-17 02:59:00 +00:00
4078.changed.md deprecate implicit default for trailing optional arguments (#4078) 2024-05-10 10:34:58 +00:00
4079.added.md Allow use of scientific notation on rust decimal (#4079) 2024-04-14 20:07:17 +00:00
4086.fixed.md fix declarative module compile error with create_exception! (#4086) 2024-04-16 20:12:18 +00:00
4095.added.md Remove deferred reference count increments and make the global reference pool optional (#4095) 2024-05-11 14:48:45 +00:00
4095.changed.md Remove deferred reference count increments and make the global reference pool optional (#4095) 2024-05-11 14:48:45 +00:00
4098.changed.md add #[track_caller] to all Py/Bound/Borrowed methods which panic (#4098) 2024-04-19 11:44:36 +00:00
4100.changed.md change PyAnyMethods::dir to be fallible (#4100) 2024-04-19 19:35:52 +00:00
4104.fixed.md fix vectorcall argument handling (#4104) 2024-04-22 08:56:39 +00:00
4116.fixed.md Disable PyUnicode_DATA on PyPy (#4116) 2024-04-26 06:00:13 +00:00
4117.fixed.md handle #[pyo3(from_py_with = ...)] on dunder (__magic__) methods (#4117) 2024-05-04 07:39:40 +00:00
4129.changed.md Update MSRV to 1.63 (#4129) 2024-04-28 16:11:28 +00:00
4148.added.md Add num-rational support for Python's fractions.Fraction type (#4148) 2024-05-09 15:37:53 +00:00
4158.added.md allow constructor customization of complex enum variants (#4158) 2024-05-09 21:08:23 +00:00