Commit Graph

619 Commits

Author SHA1 Message Date
David Hewitt 9fa0abe85d
Merge pull request #1864 from davidhewitt/pymethods-protos
pymethods: add support for protocol methods
2021-09-24 22:22:16 +01:00
David Hewitt 179b5d1f47 pymethods: fix support for MSRV 2021-09-18 16:42:02 +01:00
David Hewitt 592c98c722 pymethods: disable protocols with multiple-pymethods for now 2021-09-18 13:08:24 +01:00
David Hewitt a551b005b4 pymethods: finish support for number protocol 2021-09-18 12:59:25 +01:00
David Hewitt c2d78ca76e pymethods: faster compilation for protos, tidy ups 2021-09-18 09:49:05 +01:00
David Hewitt 43eb762346 pymethods: support most numerical methods 2021-09-18 00:31:17 +01:00
David Hewitt 70d829de66 gil: try to initialize threads on Python 3.6 if possible 2021-09-17 08:48:21 +01:00
David Hewitt 92e2156161 pymethods: support inplace numerical operations 2021-09-17 08:13:54 +01:00
David Hewitt b544b5a6d7 pymethods: support iter and async protocols 2021-09-17 08:13:54 +01:00
David Hewitt 8408328cb3 pymethods: add support for protocol methods 2021-09-17 08:13:54 +01:00
mejrs 4cd9f4b570 import FromPyObject into crate root 2021-09-14 14:07:23 +02:00
mejrs d6973b1b6a clean up lib.rs 2021-09-13 22:58:15 +02:00
mejrs 68cba78a44
chore: update rust 1.55 (#1865)
* chore: update rust 1.55

* move test to 1.55 only

* make ci happy

* make ci happy

* make ci happy

* make ci happy

* make clippy happy

* make ci happy

* formatting
2021-09-12 18:07:24 +01:00
David Hewitt f4c834f5fc
Merge pull request #1843 from PyO3/pymethods_hygiene
more macro hygiene cleanup: test #[pymethods] and more arg parsing and protos
2021-08-29 11:26:10 +01:00
Georg Brandl 381eb9c501
Apply suggestions from code review
Co-authored-by: mejrs <59372212+mejrs@users.noreply.github.com>
2021-08-29 08:30:05 +02:00
David Hewitt 95a11d0725
Merge pull request #1842 from PyO3/frompyobject_hygiene
more macro hygiene cleanup: test the FromPyObject derive macro
2021-08-29 07:15:16 +01:00
David Hewitt 604b28451b
Merge pull request #1841 from PyO3/exception_hygiene
more macro hygiene cleanup: test the exception macros
2021-08-29 07:14:36 +01:00
David Hewitt f76535fd07 pyo3-macros-backend: support macros inside doc attributes 2021-08-28 22:47:20 +01:00
Georg Brandl 6f75fc8eb7 more macro hygiene cleanup: test #[pymethods] and more arg parsing and protos 2021-08-28 18:05:32 +02:00
Georg Brandl 585487c3c1 more macro hygiene cleanup: test the FromPyObject derive macro 2021-08-28 16:42:29 +02:00
Georg Brandl db00a34a56 more macro hygiene cleanup: test the exception macros 2021-08-28 15:45:49 +02:00
David Hewitt 313610993a pyo3-macros-backend: more tests for macro hygiene 2021-08-28 10:28:27 +01:00
Georg Brandl 2979fb8268 tests: fix new clippy warning (does not like Foo::foo) 2021-08-23 15:47:09 +02:00
David Hewitt 0613b5a8f8
Merge pull request #1805 from mejrs/proc_macro_hygiene
Test proc macro hygiene for `#[pyclass]` macro.
2021-08-18 19:08:41 +01:00
mejrs f79420dabd remove shadowing 2021-08-17 21:38:28 +02:00
mejrs 3be3af4121 fix extends param 2021-08-17 15:19:19 +02:00
mejrs bce5100dc3 use macro to shadow 2021-08-17 15:16:03 +02:00
David Hewitt 37d39aa83a
Merge pull request #1751 from davidhewitt/pyany-py
pyany: add PyAny::py()
2021-08-17 14:10:16 +01:00
mejrs 370968b595 test macro hygiene for pyclass 2021-08-16 16:32:11 +02:00
Gregory Szorc 410c9f13c9 macros: raise AttributeError on property deletion requests
The setter function will receive a NULL value on deletion requests.
This wasn't properly handled before, leading to a panic.

The new code raises AttributeError in this scenario instead.

A test for the behavior has been added. Documentation has also
been updated to reflect the behavior.
2021-08-13 21:01:00 -07:00
David Hewitt ebada76ae3 pyany: add PyAny::py() 2021-08-13 08:00:13 +01:00
David Hewitt b6e8da104d coverage: also run compile_error tests 2021-08-07 22:45:07 +01:00
R2D2 d809e50c9b Replaced require_gil with Python::with_gil in test_frompyobject.rs. Removed all unsafe code from macro generated code. Two other small fixes 2021-08-02 09:49:13 +02:00
R2D2 3cfc76ae93 Reworked struct error messages to use the of an error rather than concatenating all error messages 2021-07-31 23:21:07 +02:00
R2D2 403d882d6c Merge branch 'main' of https://github.com/PyO3/pyo3 into enhanced_extract_type_errors 2021-07-31 21:21:10 +02:00
David Hewitt ee9a1678d5 rust: updates for rust & clippy 1.54 2021-07-31 08:19:38 +01:00
David Hewitt d11943ab6d macros-backend: don't error on #[doc(hidden)] 2021-07-08 23:41:24 +01:00
mejrs c07c5a4c93 Add full path for PyCell 2021-07-03 07:51:18 +01:00
scalexm 7e8eeec02f Add a test 2021-06-25 00:18:53 +02:00
messense b5b9a480cd Add `wrap_pyfunction` macro to prelude 2021-06-24 22:34:55 +08:00
Giles Cope 08802e2024 property rename via macro 2021-06-24 09:06:47 +01:00
Giles Cope 2688e26391 Bit more coverage 2021-06-24 08:59:35 +01:00
Giles Cope aaad7ffd63 Need to be able to create structs via macro_rules
(Currently only possible using tt escape type.)
2021-06-24 08:40:49 +01:00
David Hewitt f916867375 pyclass: refactor initialization, call native type dealloc 2021-06-23 07:45:51 +01:00
mejrs 445f5163d4 update error message for rust 1.53 2021-06-19 16:11:03 +02:00
R2D2 d3208b005e Removed stray newline character from error message 2021-06-09 14:25:49 +02:00
R2D2 ec40446fa3 Removed stray newline character from error message 2021-06-09 14:23:16 +02:00
R2D2 e6da1ebc73 Fixed formatting of error messages and tests 2021-06-09 11:40:14 +02:00
R2D2 0b3fbb5533 Fixed formatting 2021-06-07 10:26:58 +02:00
R2D2 973f0a5bae Removed the custom error messages from the macro api 2021-06-07 10:18:38 +02:00