Icxolu
aef0a05719
deprecate implicit default for trailing optional arguments ( #4078 )
...
* deprecate "trailing optional arguments" implicit default behaviour
* add newsfragment
* generate individual deprecation messages per function
* add migration guide entry
2024-05-10 10:34:58 +00:00
David Hewitt
351c6a0a49
deprecate optional GIL Ref in function argument ( #3975 )
2024-03-21 07:24:40 +00:00
Icxolu
4f8ee96881
fix `AsRef` and `Deref` impls on `Bound<T>` ( #3879 )
...
* fix `AsRef` and `Deref` of `Bound<T>` to `Bound<PyAny>`
* cleanup unnessesary `.as_any()` calls
* remove trait bound on `AsRef` impl
* add comment for `Deref` trait bound
* rename marker trait
2024-02-22 22:38:42 +00:00
Icxolu
4ce9c35983
port `Python::get_type` to `Bound` API ( #3846 )
...
* port `Python::get_type` to `Bound` API
* fix `is_subclass_and_is_instance` FIXME
2024-02-18 18:27:19 +00:00
Lily Foote
0dd568d397
Use the new bound API instead of .as_ref(py) ( #3853 )
...
* Use the new bound API instead of .as_ref(py)
* Move import into a nested scope
* Use to_cow instead of to_str for compatibility
`to_str` is not available before Python 3.10 on the limited api.
* Relax &self lifetimes
* Use Bound<'py, PyAny> in test Mapping signatures
* Use .as_bytes(py)
* Simplify ThrowCallback::throw signature
* Avoid .as_any call with Py api instead of Bound
2024-02-18 00:09:56 +00:00
Icxolu
e45fbe493c
port `IntoPyDict` to `Bound` API
2024-02-10 15:47:26 +01:00
David Hewitt
7d486bb72a
tests/common.rs -> src/tests/common.rs
2023-09-24 13:34:53 +01:00
Ashley Anderson
5d88e1d1c4
Update PyTryFrom for PyMapping and PySequence to more accurately check types ( #2477 )
...
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2022-08-10 21:03:18 +01:00
mejrs
984fdf57c7
Use Python:;with_gil in tests
2022-07-19 19:34:23 +02:00
David Hewitt
c16cc35b30
pyclass: mapping flag
2022-04-02 16:15:44 +01:00
mejrs
6f1cf1b662
Add more lints
2022-03-23 08:07:28 +01:00
David Hewitt
558549e1c2
pyproto: split into new feature
2022-02-05 16:51:31 +00:00
David Hewitt
6433d884fc
dev: remove self dev dependency
2021-12-08 07:48:58 +00:00
David Hewitt
c9a4cd1f87
deprecations: remove items deprecated in PyO3 0.14
2021-11-19 16:33:29 +00:00
David Hewitt
48823e22d6
pyproto: deprecate py_methods
2021-04-20 00:21:19 +01:00
kngwyu
9b88a452e2
Refactor tests to use shorter macros
2021-03-14 23:43:53 +09:00
David Hewitt
b9e95dc7c9
Implement std::error::Error for PyErr
2020-09-10 19:04:24 +01:00
David Hewitt
4ed9748b45
Rename exceptions to PyException etc; reintroduce deprecated ones
2020-07-18 06:02:57 +01:00
David Hewitt
a9c7e12be0
Allow skipping the return type completely for `#[pyproto]` methods returning `()`.
2020-06-23 11:51:02 +01:00
kngwyu
69dba08b01
Use PyMethodsImpl instead of *ProtocolImpl::methods
2020-05-11 20:08:21 +09:00
kngwyu
58590393c5
Fix accidently changed file permission
2019-12-24 12:27:22 +09:00
kngwyu
a6639076b9
Introduce PyInternalCaster
2019-12-14 23:16:39 +09:00
Sebastian Puetz
3b707c8511
Remove contains and iter from PyMappingProtocol.
...
The methods are not expected by CPython and are only explicitly
callable. To get iteration support, PyIterProtocol should be
implemented and to get support for `x in mapping`,
PySequenceProtocol's __contains__ should be implemented.
https://github.com/PyO3/pyo3/issues/611
2019-10-25 17:20:44 +02:00