Commit Graph

753 Commits

Author SHA1 Message Date
David Hewitt cdf86482d8 ffi: many fixes to pypy definitions 2022-06-04 12:47:40 +01:00
David Hewitt a746411b24
Merge pull request #2422 from davidhewitt/frompyobject-fixes
frompyobject: improve error messages of derived impls
2022-06-02 13:30:03 +01:00
David Hewitt f50406a034
Merge pull request #2413 from davidhewitt/simpler-interned
macros: simpler expansion for `intern!`
2022-06-02 12:54:11 +01:00
David Hewitt 0aa4f95a98 frompyobject: improve error messages of derived impls 2022-06-02 11:13:35 +01:00
David Hewitt 261c0c5f56 macros: simpler expansion for `intern!` 2022-06-02 09:57:58 +01:00
David Hewitt cfb91057af frompyobject: improve error message for tuple case 2022-06-02 08:54:20 +01:00
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 8636db67f5 add regression test for PEP 587 2022-05-15 16:08:21 +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
Bruno Kolenbrander dce4377eb4
Allow more methods to take interned arguments (#2312)
* Allow more methods to take interned arguments

* Changelog

* Unify name bounds

* Resolve merge conflict

* reduce use of py_decref

* Add some attr tests

* Update migration
2022-05-02 11:13:15 +02:00
David Hewitt 4168feed1b opt: tidy some generic code bloat 2022-04-26 05:36:57 +01:00
cuishuang 19e32a0621 fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-04-24 22:06:32 +08:00
David Hewitt 7e2d3117ce cleanup: deprecate PyTypeObject trait 2022-04-23 13:36:32 +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 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 5cc3ce99f1 pyclass: unify pyclass with its pyo3 arguments 2022-03-20 08:24:09 +00:00
Alex Gaynor 69655454c1 Added an as_bytes method for Py<PyBytes>
This allows for obtaining a slice that's not lexically bound to the GIL which can be helpful to avoid copying.
2022-03-19 13:28:06 -04:00
David Hewitt ddf13ea98f clippy: enable some more lints 2022-03-03 07:23:28 +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
Georg Brandl 03dc96bff1
Py/PyAny: remove PartialEq impl and add is() (#2183) 2022-02-25 19:39:45 +00: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 ed698c4b43 Add documentation related to from_py_with for the FromPyObject trait 2022-02-24 22:54:30 +01:00
Rico Hageman fc186cdb3b Remove item annotation in tuple struct 2022-02-24 22:20:54 +01:00
Rico Hageman 76233e1924 Address pull request comments 2022-02-24 11:27:53 +01:00
Rico Hageman 84a763da14 Add test to ensure support for from_py_with for enums 2022-02-24 00:22:33 +01:00
Rico Hageman 10804b0d65 Support from_py_with on struct tuples 2022-02-24 00:06:33 +01:00
David Hewitt 24445df633 pyproto: deprecate protocol traits 2022-02-23 07:50:52 +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 10c3e5b094 Try to add nightly feature to CI
Fix stray "
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
Rico Hageman 3fbdc863cb Include the causes when throwing a PyTypeError when argument parsing failed 2022-02-22 09:48:41 +01:00