Kang Seonghoon
e884327675
Add additional tests for #3165 .
2023-05-25 21:31:17 +02:00
Kang Seonghoon
7cb1ad049f
Rename a misleading test name and add an actual panicking test.
2023-05-25 21:31:17 +02:00
Adam Reichold
18397828e5
Move locking the GIL and handling the resulting panics into a library function.
2023-05-25 20:01:35 +02:00
Adam Reichold
810ad00a76
Do not apply deferred ref count updates and prevent the GIL from being acquired inside of implementations.
2023-05-25 20:01:35 +02:00
Nate Kent
f11290d314
Add additional unit test for GC traversal
...
Since we're just testing a bug during traversal, we don't actually have
to reap the object, we just have to make a reference cycle so that it's
traverse method is called.
2023-01-26 16:27:54 -08:00
Georg Brandl
99c8dea30e
Use Python::get_type() instead of PyTypeInfo::type_object()
...
The former needs one less import and uses a familiar object.
2022-11-20 15:16:18 +01:00
messense
db177a07ad
Fix new clippy warnings in Rust 1.63.0
2022-08-12 11:50:23 +08:00
mejrs
984fdf57c7
Use Python:;with_gil in tests
2022-07-19 19:34:23 +02:00
David Hewitt
7e2d3117ce
cleanup: deprecate PyTypeObject trait
2022-04-23 13:36:32 +01:00
mejrs
6f1cf1b662
Add more lints
2022-03-23 08:07:28 +01:00
David Hewitt
ddf13ea98f
clippy: enable some more lints
2022-03-03 07:23:28 +00:00
David Hewitt
b59ee9b54b
misc: tidy ups pre 0.16
2022-02-27 10:02:28 +00:00
David Hewitt
79123b396c
pyclass: deprecate gc option
2022-02-15 08:01:46 +00:00
David Hewitt
676295b8de
pymethods: support gc protocol
2022-02-15 08:01:23 +00:00
David Hewitt
558549e1c2
pyproto: split into new feature
2022-02-05 16:51:31 +00:00
David Hewitt
807e126178
pyclass: no need to try inherit base dict and weaklist
2021-12-30 14:17:58 +00:00
David Hewitt
6433d884fc
dev: remove self dev dependency
2021-12-08 07:48:58 +00:00
messense
90c5ffbd04
Fix clippy warnings in Rust 1.51.0
2021-03-26 13:21:38 +08:00
David Hewitt
7572962828
abi3: add support for dict and weakref from Python 3.9
2020-12-28 10:22:46 +00:00
David Hewitt
db74cc85fa
pypy: final fix
2020-12-20 13:50:39 +00:00
David Hewitt
9617edfca9
msrv: bump to 1.45
2020-11-12 11:33:08 +00:00
Alex Gaynor
ba1056006a
Get all the tests building, everythign except doctests passes!
2020-09-16 08:42:22 -04:00
Alex Gaynor
400462063d
Proof of concept of using PEP384s PyType_Spec
2020-09-02 16:54:39 -04:00
David Hewitt
1f37dbc1a7
Various fixes to edge cases with GILGuard
2020-08-06 14:32:59 +01:00
David Hewitt
a85d157111
Cleanups to ensure GIL-safety of Py<T> and PyObject methods
2020-06-14 16:37:34 +01:00
David
33617bfffc
Require Send for #[pyclass]
2020-06-08 02:06:15 +01:00
David Hewitt
a5ebef4b2e
Remove ObjectProtocol; Add methods to PyAny and use Deref
2020-05-08 10:05:19 +01:00
Martin Larralde
1e8e6fd827
Fix clippy warning about unused arguments in tests/test_gc.rs
2020-04-09 02:06:19 +02:00
Martin Larralde
5f2ec47bea
Add proper test for GC double borrow issue in tp_traverse
wrapper
2020-04-09 00:52:49 +02:00
kngwyu
5280a281c9
Remove GILPool::new_no_pointer
2020-03-26 19:45:32 +09:00
kngwyu
02ee7a5afc
Expose PyAny to lib.rs and prelude
2020-03-18 13:38:18 +09:00
kngwyu
18957159f4
Add tests for inheriting class with dict or weakref
2020-02-25 20:02:27 +09:00
kngwyu
3d0ee2a28d
Use AsRef/AsMut instead of as_super/as_super_mut
2020-02-21 20:37:35 +09:00
kngwyu
4b746af11b
Rename unchecked_refmut -> unchecked_mut
2020-02-18 12:55:06 +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
a2408cacbb
Rename PyClassShell with PyCell
2020-02-08 15:05:13 +09:00
kngwyu
18e565fab5
New PyClassInitializer
2020-01-05 16:01:05 +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
konstin
30e82a3018
Replace IntoPyObject with IntoPy<PyObject>
2019-08-24 19:23:28 +02:00
Alexander Niederbühl
ceefa7cc27
Add __clear__ for test class
2019-07-14 20:45:05 +02:00
Alexander Niederbühl
72339e5bf9
Implement PyGCProtocol in test class
...
For the garbage collection to work the PyGCProtocol has to be
implemented. Ideally it should not even get compiled if it doesn't since
a missing tp_traverse can produce a segfault.
2019-07-14 15:54:45 +02:00
kngwyu
0f9a3b1194
Expose py_run macro
2019-06-13 18:18:06 +09:00
kngwyu
4bf448ecaa
Complete the PR
2019-05-25 23:19:07 +09:00
Georg Brandl
39d3ceb551
Make PyTuple constructors return &PyTuple
2019-05-25 22:40:32 +09: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
6cd07c369c
Simpler new and clippy fixes
2019-02-23 18:38:00 +01:00
konstin
ad590bd158
Some api improvements
2019-02-23 18:01:22 +01:00