Commit Graph

254 Commits

Author SHA1 Message Date
David Hewitt eafbbc5417
Merge pull request #2399 from davidhewitt/avoid-duplicate-pymethods
pymethods: prevent methods sharing the same name
2022-05-24 22:22:31 +01:00
David Hewitt 879eb14e27
Merge pull request #2395 from davidhewitt/fix-class-raw-ident
macros: fix raw-ident pyclasses having r# at the start of the Python name
2022-05-24 22:08:56 +01:00
David Hewitt 71abeeff8b macros: fix raw-ident pyclasses having r# at the start of the Python name 2022-05-24 21:34:23 +01:00
David Hewitt a306365db8 pymethods: prevent methods sharing the same name 2022-05-24 21:15:30 +01:00
David Hewitt 126bf49b8b
Merge pull request #2377 from herquan/herquan_cr1
Add macro append_to_inittab (issue #2359)
2022-05-24 08:02:47 +01:00
herquan 2ec477344d Add macro append_to_inittab
Sometimes we need to debug in a real environment with our module installed. `append_to_inittab` will be a wrapper for PyImport_AppendInittab (https://docs.python.org/3/c-api/import.html#c.PyImport_AppendInittab) and help us to do this
2022-05-24 07:42:15 +01:00
David Hewitt 0de0e3f8d6 Allow `#[classattr]` methods to be fallible 2022-05-17 21:19:41 +01:00
David Hewitt 3dcbcb7a95 update main to reflect 0.16.5 release 2022-05-15 20:31:00 +01:00
David Hewitt 7a9e70e2c7 wrap_x: change macros back to `macro_rules!` 2022-05-14 20:42:07 +01:00
Bruno Kolenbrander c57e5098b8
Fix IntoPyCallbackOutput paper cuts (#2326)
* Implement IntoPy for arrays of IntoPy

* Improve `IntoPyCallbackOutput` compile error
2022-05-09 18:15:43 +01:00
David Hewitt e9bd41efb2 better mutability inheritance rules 2022-04-21 20:51:28 +01:00
David Hewitt 7118e94947 Merge branch 'main' into immutable 2022-04-19 19:00:33 +01:00
Adam Reichold d2caa056e9 release: 0.16.4 2022-04-14 07:56:42 +01: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
David Hewitt 1ae0971a09 release: 0.16.3 2022-04-05 04:05:57 +01:00
David Hewitt 9774a7c1c1
Merge pull request #2273 from PyO3/dog-food-intern
Make use of intern! macro for attribute names used internally
2022-04-05 00:41:35 +01:00
Adam Reichold 2c95b3abb4 Intern the attribute names used by the derive macro for FromPyObject. 2022-04-04 22:26:14 +02:00
David Hewitt 981eb2d90e
Merge pull request #2265 from davidhewitt/pyclass-mapping
pyclass: mapping flag
2022-04-04 19:54:37 +01:00
Adam Reichold d3dcbd72ba
Add PyString::intern to enable access to Python's built-in string interning. (#2268) 2022-04-03 21:07:58 +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
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