David Hewitt
48823e22d6
pyproto: deprecate py_methods
2021-04-20 00:21:19 +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
78080ebbd2
macros-backend: support noargs for pyproto py_methods
2021-03-08 23:56:08 +00:00
David Hewitt
7572962828
abi3: add support for dict and weakref from Python 3.9
2020-12-28 10:22:46 +00:00
Alex Gaynor
ba1056006a
Get all the tests building, everythign except doctests passes!
2020-09-16 08:42:22 -04:00
Alex Gaynor
5bfb4674b1
Merge branch 'master' into abi3-merge-master
2020-09-10 17:01:13 -04:00
David Hewitt
b9e95dc7c9
Implement std::error::Error for PyErr
2020-09-10 19:04:24 +01:00
Alex Gaynor
400462063d
Proof of concept of using PEP384s PyType_Spec
2020-09-02 16:54:39 -04:00
kngwyu
093dda375f
Improve lifetime insertions for #[pyproto]
2020-08-10 15:18:16 +09:00
David Hewitt
1f37dbc1a7
Various fixes to edge cases with GILGuard
2020-08-06 14:32:59 +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
1207c2d03a
Make test_await more robust
2020-06-18 01:58:01 +09:00
kngwyu
2e1ed2c3c8
Descr get/set now take receiver
2020-06-15 13:43:46 +09:00
kngwyu
8c4162dfeb
Async methods now takes Receiver
2020-06-14 22:43:07 +09:00
kngwyu
f32277163a
Move nb_bool under PyObjectProtocol again
2020-06-13 15:25:04 +09:00
kngwyu
7967874177
Remove specialization from basic/buffer/descr/iter protocols
2020-06-13 15:24:56 +09:00
kngwyu
69dba08b01
Use PyMethodsImpl instead of *ProtocolImpl::methods
2020-05-11 20:08:21 +09:00
Martin Larralde
ed63902eeb
Modify existing `PyIteratorProtocol` tests to use `PyRef` where possible
2020-04-18 03:57:17 +02:00
kngwyu
c234476693
chmod -x for test files
2020-03-27 00:41:01 +09:00
kngwyu
02ee7a5afc
Expose PyAny to lib.rs and prelude
2020-03-18 13:38:18 +09:00
kngwyu
e63e0cbf5a
Make it enable to take &PyClass as arguments as pyfunctions/methods
2020-03-04 13:37:26 +09:00
kngwyu
18957159f4
Add tests for inheriting class with dict or weakref
2020-02-25 20:02:27 +09:00
kngwyu
2fd2185052
Merge branch 'master' into pycell
2020-02-17 00:07:15 +09:00
kngwyu
8f8b42591a
Fix PySelf and AsPyRef
2020-02-16 23:54:55 +09:00
kngwyu
da4ed398bb
Fix PyCell to share BorrowFlag with parents
2020-02-15 18:13:39 +09:00
kngwyu
a6fed34e23
Fix clippy warnings in build.rs and tests
2020-02-10 14:53:13 +09:00
kngwyu
a2408cacbb
Rename PyClassShell with PyCell
2020-02-08 15:05:13 +09:00
kngwyu
c57177a169
Refine tests and documents around pyclass.rs
2020-01-08 22:44:50 +09:00
kngwyu
58590393c5
Fix accidently changed file permission
2019-12-24 12:27:22 +09:00
kngwyu
b86de9376d
Introduce PyClassInitializer
2019-12-15 21:04:36 +09:00
kngwyu
a6639076b9
Introduce PyInternalCaster
2019-12-14 23:16:39 +09:00
kngwyu
d57f2423c8
Fix PySequenceProtocol::set_item
2019-10-12 21:03:21 +09:00
kngwyu
ee69ffd0f0
Support TryFromSliceError/TryFromIntError -> PyErr conversion
2019-10-12 17:25:28 +09:00
konstin
30e82a3018
Replace IntoPyObject with IntoPy<PyObject>
2019-08-24 19:23:28 +02:00
kngwyu
60cbe2f47d
Add a test that confirms __getattr__ doesn't override
2019-07-13 23:46:25 +09:00
Yuji Kanagawa
3e69389e68
Merge pull request #512 from kngwyu/expose-py-run
...
Expose py_run! macro
2019-06-15 23:50:14 +09:00
kngwyu
0f9a3b1194
Expose py_run macro
2019-06-13 18:18:06 +09:00
konstin
dfd5a2abb8
Print error before on class init panic
...
Inspired by https://github.com/rust-numpy/rust-numpy/issues/97 , also fixes some warnings from the latest nightly
2019-06-05 12:01:09 +02:00
ijl
2bb0d05a30
Drop support for python2
2019-03-29 12:37:26 +00:00
konstin
97189a16b9
Try fixing cargo fmt on travis ci
2019-03-24 17:19:15 +01:00
Miles Granger
711155d7ad
Update tests & docs with IntoPyDict::into_py_dict(py)
2019-03-20 20:04:00 +01:00
konstin
59a9d4fd9f
Merge branch 'master' into pyany
2019-03-18 01:00:26 +01:00
Alexander Niederbühl
f79f84a31b
Complete __dict__ support
...
Add `__dict__` slot to tp_getset of type_object. See
https://bugs.python.org/issue16272 for why this is necessary.
2019-03-17 20:31:05 +01:00
kngwyu
874d8a0835
Rename PyObjectRef with PyAny
2019-03-04 13:50:43 +09:00
kngwyu
86d239e445
Rename ToPyPointer with AsPyPointer
2019-02-24 16:20:04 +09:00
konstin
ad590bd158
Some api improvements
2019-02-23 18:01:22 +01:00
konstin
d02f7c3aa5
Big proc macro refactoring
...
* Removed a lot of clutter, unified some code
* Started using syn::parse::Parse for pyfunction attributes
* No more newlines between imports
* Renamed `#[prop(get, set)]` to `#[pyo3(get, set)]`
* `#[pyfunction]` now supports the same arguments as `#[pyfn()]`
* Some macros now emit proper spanned errors instead of panics.
2019-02-18 20:07:56 +01:00
konstin
6cb098ee12
Replace py.init_[ref|mut] with Py[Ref|Mut]::new
2019-02-13 21:52:21 +01:00