David Hewitt
4168feed1b
opt: tidy some generic code bloat
2022-04-26 05:36:57 +01:00
David Hewitt
e9bd41efb2
better mutability inheritance rules
2022-04-21 20:51:28 +01:00
mejrs
53a642eda7
Fix ui test
2022-04-12 15:49:23 +02:00
Bruno Kolenbrander
bc6bd6099c
Merge branch 'main' into immutable
2022-04-12 14:22:33 +02:00
mejrs
b7745dffc8
Fix everything
2022-04-12 14:19:02 +02:00
mejrs
4fc0cdd636
Fix ui test
2022-04-07 23:56:15 +02:00
David Hewitt
c16cc35b30
pyclass: mapping flag
2022-04-02 16:15:44 +01:00
mejrs
086424b88c
Merge branch 'main' of https://github.com/mejrs/pyo3 into immutable
2022-04-01 23:11:02 +02:00
mejrs
9ab1e6927a
Merge branch 'immutable' of https://github.com/mejrs/pyo3 into immutable
2022-04-01 22:59:59 +02:00
Bruno Kolenbrander
43944aef76
Create a better error message for moving self ( #2238 )
2022-03-24 10:27:37 +01:00
Bruno Kolenbrander
fb689340b4
Merge branch 'main' into lint-more
2022-03-23 09:34:31 +01:00
mejrs
6f1cf1b662
Add more lints
2022-03-23 08:07:28 +01:00
David Hewitt
5cc3ce99f1
pyclass: unify pyclass with its pyo3 arguments
2022-03-20 08:24:09 +00:00
David Hewitt
d8ee35e19c
Merge pull request #2165 from mejrs/auto_trait
...
Implement Auto trait
2022-02-23 07:16:17 +00:00
mejrs
ec275d49cb
Explicitly (un)implement Ungil
2022-02-22 22:43:40 +01:00
mejrs
9e29c1058c
Gut specialization and implement auto trait
...
Implement auto trait
Implement auto trait
Undo oopsie
Fix versions
Fix CI errors
Fix CI
Remove more specialization remnants
2022-02-22 22:43:23 +01:00
David Hewitt
79123b396c
pyclass: deprecate gc option
2022-02-15 08:01:46 +00:00
David Hewitt
c93ee00130
refactor: inline handle_panic into macro output
2022-02-10 20:20:03 +00:00
David Hewitt
f5b2a88a70
refactor: include __new__ as slot
2022-02-09 08:07:14 +00:00
David Hewitt
6f39deaa37
finish off implementation
2022-02-08 18:17:44 +00:00
mejrs
7520b49ac1
Implement opt-in immutable pyclasses
2022-02-08 18:08:18 +00:00
David Hewitt
558549e1c2
pyproto: split into new feature
2022-02-05 16:51:31 +00:00
David Hewitt
1beb2bbb2d
opt: optimize argument extraction
2022-02-04 20:53:49 +00:00
mejrs
f7d7da9b7a
Try fix the ci some more
2022-01-13 23:11:33 +01:00
mejrs
2006ee0d21
Fix ci
2022-01-13 22:25:23 +01:00
David Hewitt
dc8032a5ff
pyfunction: allow required positional after option
2022-01-11 00:44:41 +00:00
David Hewitt
2cee7feaaf
Merge pull request #2083 from aviramha/magic_methods
...
verify py method args count
2022-01-07 00:13:05 +00:00
Aviram Hassan
9ae31f2b87
fix tests
2022-01-06 09:59:10 +02:00
David Hewitt
be70e5441b
Merge pull request #2085 from davidhewitt/opt-argument-extraction
...
opt: move fastcall boilerplate out of generated code
2022-01-03 08:13:31 +00:00
Aviram Hassan
50659b6b02
`__ipow__` now supports modulo argument on Python 3.8+.
...
`pyo3-macros-backend` is now compiled with PyO3 cfgs to enable different magic method definitions based on version.
Add check for correct number of arguments on magic methods.
2022-01-03 09:53:56 +02:00
David Hewitt
1a782ce4db
opt: move fastcall boilerplate out of generated code
2022-01-03 00:07:32 +00:00
David Hewitt
cf965155f4
pymethods: support buffer protocol
2021-12-30 15:48:55 +00:00
David Hewitt
e33b3e6a5b
opt: don't emit T::dict_offset and T::weakref_offset without attributes
2021-12-30 14:57:27 +00:00
David Hewitt
5be5d77589
opt: improve handle_panic generated code
2021-12-24 00:17:04 +00:00
David Hewitt
469d72a001
Merge pull request #2022 from PyO3/pyo3_path
...
Hygiene: offer a way to set path to pyo3 crate
2021-12-09 20:27:48 +00:00
Juniper Parsons
47cf13239f
Disallow positional args after optional args
2021-12-09 10:01:59 -05:00
Georg Brandl
a5b76bc365
pyo3_path, part 4: rename to `crate` to keep consistent with serde
2021-12-09 07:36:48 +01:00
Georg Brandl
e4f608f605
pyo3_path, part 2: add pyo3_path options and use them.
2021-12-09 07:24:18 +01:00
David Hewitt
4c8abd1426
rust: support 1.57
2021-12-08 07:10:16 +00:00
b05902132
d339cd0dc9
Let #[pyclass] reject empty enums.
2021-11-23 01:15:07 +08:00
mejrs
a44e2f8eea
Fix formatting.
2021-11-22 10:19:46 +01:00
Bruno Kolenbrander
3bf9ef0706
Merge branch 'main' into immutable
2021-11-22 10:08:51 +01:00
mejrs
0fa03a67cd
Implement opt-in immutable pyclasses
2021-11-22 09:26:34 +01:00
b05902132
b7419b5278
Refactor #[pyclass] and now it supports enum.
...
There's no functionality since it does not generate __richcmp__.
Also it only works on enums with only variants, and does not support
C-like enums.
2021-11-21 20:05:53 +08:00
David Hewitt
c9a4cd1f87
deprecations: remove items deprecated in PyO3 0.14
2021-11-19 16:33:29 +00:00
David Hewitt
6a65f98bd2
msrv: bump to 1.48
2021-11-19 10:10:59 +00:00
Bruno Kolenbrander
7b9ae8e663
Clean up `Python` documentation ( #1963 )
...
* Clean up `Python` documentation
* Apply suggestion
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
* Fix some things
* Fix PyPy link
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-11-02 23:05:44 +00:00
David Hewitt
3ab32ff01f
guide: magic methods in pymethods
2021-10-24 15:59:22 +01:00
David Hewitt
0e0e6f8bf5
pymethods: support protocols with `multiple-pymethods` feature
2021-10-23 00:07:35 +01:00
David Hewitt
4b2345fe80
pymethods: support __call__ proto
2021-10-23 00:06:46 +01:00