David Hewitt
558549e1c2
pyproto: split into new feature
2022-02-05 16:51:31 +00:00
David Hewitt
492b7e4c0f
macros: optimize generated code for #[derive(FromPyObject)]
2021-12-22 08:34:05 +00:00
David Hewitt
6433d884fc
dev: remove self dev dependency
2021-12-08 07:48:58 +00:00
Georg Brandl
9990bf9d31
Fix some clippy and dead code warnings.
2021-11-24 09:11:39 +01:00
David Hewitt
9e80f3dfdd
pep 604: use T | U
instead of Union[T, U]
in messaging
2021-09-24 22:46:25 +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
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
R2D2
416b1132b4
Added custom error messages to enum fields and container types. Covered with tests. Fixed formatting and linting issues
2021-06-01 22:44:16 +02:00
R2D2
dfc484c43b
Started adding more unit tests
2021-06-01 00:23:54 +02:00
R2D2
1a8fec2e88
Added detailed TypeError messages to enums with derive(FromPyOjbect)
2021-05-31 17:38:15 +02:00
R2D2
4a99bfaaba
Fixed tests after modifying TypeErrors originating from structs. Started work on TypeError message on Enums
2021-05-31 00:28:53 +02:00
Daniil Konovalenko
554cffd60d
add #[pyo3(from_py_with="...")] attribute ( #1411 )
...
* allow from_py_with inside #[derive(FromPyObject)]
* split up FnSpec::parse
2021-02-21 00:15:20 +09:00
Askaholic
6724783395
Change wording of PyDowncastError display implementation
...
Displays type(obj) instead of repr(obj) and uses `cannot` instead of
`can't`
to be more consistent with existing python error messages.
See discussion at #1212 .
2020-10-14 17:32:00 -08:00
David Hewitt
b9e95dc7c9
Implement std::error::Error for PyErr
2020-09-10 19:04:24 +01:00
Sebastian Pütz
0f32f886b8
More FromPyObject derive suggestions by @davidhewitt
2020-08-30 19:16:59 +02:00
Sebastian Pütz
7781bb78de
Specify item key and attr name as arguments.
2020-08-30 10:22:01 +02:00
Sebastian Pütz
60fe4925f5
'#[derive(FromPyObject)]` changes suggested by @davidwhewitt.
2020-08-30 10:22:01 +02:00
Sebastian Pütz
7168309464
Derive FromPyObject
2020-08-30 10:22:01 +02:00