Bruno Kolenbrander
43944aef76
Create a better error message for moving self ( #2238 )
2022-03-24 10:27:37 +01:00
mejrs
00ea040834
Feedback
2022-03-23 13:30:32 +01:00
mejrs
1b9763fef2
Fix merge conflict
2022-03-23 10:10:35 +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
Sergey Kvachonok
7a44aa1070
pyo3-macros-backend: Replace `pyo3-build-config` with `abi3` feature
...
Python 3.6 and older are not supported by the current PyO3 version,
so the removed interpreter version check was a no-op.
`pyo3_build_config::get()` attempts to read a config file from disk
when PyO3 is cross-compiling, which is probably bad for rust-analyzer
and other IDEs that attempt to sandbox the proc macro code.
2022-03-23 09:48:15 +03:00
David Hewitt
87c79c0319
Merge pull request #2234 from davidhewitt/pyclass-args-refactor
...
pyclass: unify pyclass with its pyo3 arguments
2022-03-22 11:38:05 +00:00
David Hewitt
c734b116f9
macros: fix syn patch version
2022-03-21 23:53:08 +00:00
David Hewitt
5cc3ce99f1
pyclass: unify pyclass with its pyo3 arguments
2022-03-20 08:24:09 +00:00
Adam Reichold
922bbfc92d
release: 0.16.2
2022-03-15 19:20:00 +01:00
David Hewitt
7056bae21f
release: 0.16.1
2022-03-05 16:21:44 +00:00
David Hewitt
ddf13ea98f
clippy: enable some more lints
2022-03-03 07:23:28 +00:00
David Hewitt
4c434a21bd
release: 0.16.0
2022-02-27 20:28:51 +00:00
David Hewitt
b59ee9b54b
misc: tidy ups pre 0.16
2022-02-27 10:02:28 +00:00
Georg Brandl
0678f11266
Protocols: implement __getattribute__
...
converting tp_getattro to a shared slot
Fixes #2186
2022-02-26 20:05:50 +01:00
David Hewitt
7c865fcc25
Merge pull request #2173 from davidhewitt/deprecate-pyproto
...
pyproto: deprecate protocol traits
2022-02-24 23:54:40 +00:00
David Hewitt
424644181b
pymethods: add support for inplace concat & repeat
2022-02-24 23:07:24 +00:00
Rico Hageman
76233e1924
Address pull request comments
2022-02-24 11:27:53 +01:00
Rico Hageman
10804b0d65
Support from_py_with on struct tuples
2022-02-24 00:06:33 +01:00
David Hewitt
6af47c78f1
pymethods: more tests for magic methods
2022-02-16 07:42:25 +00:00
David Hewitt
79123b396c
pyclass: deprecate gc option
2022-02-15 08:01:46 +00:00
David Hewitt
676295b8de
pymethods: support gc protocol
2022-02-15 08:01:23 +00:00
mejrs
a8ec8b4176
Make Pyo3MethodsInventoryFor<class>::new public
2022-02-14 23:27:54 +01: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
75e44585de
refactor: pass tp_alloc and tp_free via slots
2022-02-09 08:07:14 +00:00
David Hewitt
4d471077b4
refactor: inline pyclass_default_items trait
2022-02-08 19:39:37 +00:00
b05902132
78f5afc82e
Finish implementation for pyclass enums
2022-02-07 22:17:11 +00:00
David Hewitt
e39881c208
refactor: inline pyclass_intrinsic_items
2022-02-06 23:26:57 +00:00
David Hewitt
ecfd2c2434
pyclass: simplify generated code for PyClassImpl
2022-02-05 16:58:01 +00:00
David Hewitt
558549e1c2
pyproto: split into new feature
2022-02-05 16:51:31 +00:00
David Hewitt
53c170078d
pymethods: seq methods from mapping methods
2022-02-05 15:59:22 +00:00
David Hewitt
1beb2bbb2d
opt: optimize argument extraction
2022-02-04 20:53:49 +00:00
David Hewitt
dc8032a5ff
pyfunction: allow required positional after option
2022-01-11 00:44:41 +00:00
David Hewitt
de8174684f
pyfunction: allow wrap_pyfunction to work on imports (even cross-crate)
2022-01-07 08:43:05 +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
David Hewitt
a9b98b7433
pymethods: __ipow__ always receive None on Python 3.7
2022-01-04 22:59:08 +00: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
807e126178
pyclass: no need to try inherit base dict and weaklist
2021-12-30 14:17:58 +00:00
David Hewitt
ff37f24625
macros: accept paths in wrap_x macros
2021-12-30 12:46:57 +00:00
Bruno Kolenbrander
4d1d859a64
Merge branch 'main' into aliases
2021-12-24 22:28:22 +01:00
David Hewitt
90479ddae4
opt: make argument extraction code smaller
2021-12-24 01:52:15 +00:00
mejrs
6afd80a26f
Create full feature and change doc rendering
2021-12-22 12:09:16 +01:00
David Hewitt
492b7e4c0f
macros: optimize generated code for #[derive(FromPyObject)]
2021-12-22 08:34:05 +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