Commit Graph

574 Commits

Author SHA1 Message Date
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
David Hewitt 18e0aa17e0 pymodule: accept `#[pyo3(name = "...")]` option 2021-06-06 08:41:20 +01:00
David Hewitt 9b8b133905 pyfunction: document `#[pyo3(pass_module)]` 2021-06-05 17:36:50 +01:00
David Hewitt cec4c2d2e9 text_signature: move to `#[pyo3(text_signature = "...")]` 2021-06-05 16:33:03 +01:00
Georg Brandl 3e8d003faf Implement METH_FASTCALL for pyfunctions and pymethods. 2021-06-05 12:57:22 +02:00
David Hewitt d011467e63 pyclass: allow `#[pyo3(get, set, name = "foo")]` 2021-06-04 11:30:40 +01:00
David Hewitt 9f74336bc9 pyfunction: better error message with `async fn` 2021-05-25 11:32:52 +01:00
David Hewitt cfdd535eea
Merge pull request #1610 from davidhewitt/pyfn-name
pyfn: deprecate name argument
2021-05-23 23:08:43 +01:00
David Hewitt a109640850 pyfn: deprecate name argument 2021-05-20 08:54:29 +01:00
Georg Brandl 4539e3524b Fix new-in-nightly clippy warning
Example:

error: used `assert_eq!` with a literal bool
   --> src/types/sequence.rs:675:9
    |
675 |         assert_eq!(empty_seq.is_empty().unwrap(), true);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(..)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
2021-05-17 09:59:40 +02:00
David Hewitt 4d46abde73 macros: support `#[pyo3(name = "...")]` 2021-05-07 22:35:52 +01:00
David Hewitt 4613b3dd7e
Merge pull request #1596 from davidhewitt/remove-pytypeinfo-layout
type_object: remove layout and base type from PyTypeInfo
2021-05-07 22:32:24 +01:00
messense 272d014518
Merge pull request #1598 from davidhewitt/rust-1.52
rust: updates for rust 1.52
2021-05-07 09:01:38 +08:00
David Hewitt defd09c166 rust: updates for rust 1.52 2021-05-06 23:18:34 +01:00
Mara Bos d33c5010c7 Add test for wrap_pyfunction!() deduction. 2021-05-06 16:05:17 +02:00
David Hewitt d81abe8344 pyclass: support extending Exception types 2021-05-04 22:00:22 +01:00
David Hewitt 7536554ceb type_object: remove layout and base type from PyTypeInfo 2021-05-04 21:39:42 +01:00
David Hewitt 48823e22d6 pyproto: deprecate py_methods 2021-04-20 00:21:19 +01:00
David Hewitt 9cdec14454
Merge pull request #1559 from davidhewitt/tidy-clippy-allows
clippy: tidy up allow lints
2021-04-12 19:02:04 +01:00
David Hewitt aa0b5d8488 buffer: tidy up exceptions 2021-04-12 01:21:48 +01:00
David Hewitt ac0bd0c0f1 clippy: tidy up allow lints 2021-04-12 01:20:04 +01:00
David Hewitt ce851ad7d9 1506: fixes to macro hygiene 2021-03-28 11:01:51 +01:00
messense 90c5ffbd04 Fix clippy warnings in Rust 1.51.0 2021-03-26 13:21:38 +08:00
David Hewitt 246335bee2
Merge pull request #1505 from scalexm/macro
Ignore `syn::Type::Group` in `is_python`
2021-03-20 11:09:04 +00:00
David Hewitt e34e87ad4a 1505: add CHANGELOG and test 2021-03-20 08:36:19 +00:00
Yuji Kanagawa f0763f069e
Merge pull request #1507 from scalexm/getter-name
Allow `#[name]` with `#[getter]` and `#[setter]`
2021-03-20 16:23:07 +09:00
Yuji Kanagawa acff3b1f3e
Merge pull request #1504 from PyO3/pyclass
Add tuple and unit struct support for pyclass macro
2021-03-20 16:14:15 +09:00
messense acd4601d2f Remove __doc__ from module's __all__ 2021-03-20 11:25:36 +08:00
messense 1c57294214 Use Python::with_gil and py_assert
Co-authored-by: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
2021-03-19 10:17:06 +08:00
messense 2cec240b0e Ban pyo3(get, set) on tuple struct field 2021-03-19 10:17:06 +08:00
messense 773a371ba5 Add tuple and unit struct support for pyclass macro 2021-03-19 10:17:06 +08:00
scalexm b27ee3fd64 Allow `#[name]` with `#[getter]` and `#[setter]` 2021-03-18 19:35:17 +01:00
Yuji Kanagawa acf7271879
Merge pull request #1494 from PyO3/enhance-py-run
Extend py_run! to take locals dict and refactor tests using it
2021-03-17 12:52:33 +09:00
kngwyu 9b88a452e2 Refactor tests to use shorter macros 2021-03-14 23:43:53 +09:00
David Hewitt b10cefdca2 pymodule: remove call_function etc. 2021-03-14 11:19:55 +00:00
kngwyu 7ec1fed798 Extend py_run! macro to take dict as *d syntax 2021-03-14 16:33:49 +09:00
David Hewitt 66b3022d0e
Merge pull request #1483 from davidhewitt/macros-tidy-ups
pymethods: macros tidy-ups
2021-03-14 00:09:23 +00:00
David Hewitt 9613228a0c pyfunction: reject generic functions 2021-03-09 23:47:47 +00:00
David Hewitt 78080ebbd2 macros-backend: support noargs for pyproto py_methods 2021-03-08 23:56:08 +00:00
David Hewitt d75d109aee
Merge pull request #1472 from davidhewitt/nightly-warnings
ci: fix nightly warnings
2021-03-06 23:10:48 +00:00
David Hewitt e19c083a81 ci: fix nightly warnings 2021-03-06 09:42:50 +00:00
David Hewitt 977735db20 pymethods: make inventory optional 2021-03-04 19:52:58 +00:00