Georg Brandl
77b1ae3137
lib: overhaul docstrings
2020-03-17 15:16:30 +01:00
Georg Brandl
4da5dbcd01
Apply suggestions from code review
...
Co-Authored-By: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
2020-03-17 10:54:05 +01:00
Georg Brandl
e649e58674
docstrings: fixes, also point to the new guide chapter
2020-03-17 10:04:29 +01:00
kngwyu
107c0cf1ba
Unify AsPyRef for Py<T> to make rust-numpy work
2020-03-09 18:31:43 +09:00
kngwyu
9bc41923be
More documents for AsPyRef and PyRef
2020-02-25 19:56:58 +09:00
kngwyu
68a3b15943
Use PyBorrowFlagLayout to ensure the baseclass has a borrow flag
2020-02-23 01:02:14 +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
4a5f219cc4
New AsPyRef
2020-02-11 18:50:50 +09:00
kngwyu
5d4e7374e9
Introduce PyDownCastImpl and Change PyTryFrom and FromPyPointer
2020-02-09 16:35:52 +09:00
kngwyu
a2408cacbb
Rename PyClassShell with PyCell
2020-02-08 15:05:13 +09:00
kngwyu
b88fe39ed6
Implement From<&PyNativeType> for Py
2020-02-02 15:28:44 +09:00
kngwyu
f26e07cfd6
Replace IntoInitializer<T> with Into<PyClassInitializer<T>>
2020-01-07 13:08:41 +09:00
David Hewitt
60edeb889e
Simplify IntoInitializer
2020-01-06 13:19:58 +00:00
kngwyu
18e565fab5
New PyClassInitializer
2020-01-05 16:01:05 +09:00
kngwyu
6b84401126
Make it enable to safely inherit native types
2019-12-21 23:28:55 +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
bdb66afe0a
Make PyClassShell have dict&weakref
2019-12-08 17:18:25 +09:00
kngwyu
4b5fa7e977
Introduce PyClass trait and PyClassShell
2019-12-07 17:56:49 +09:00
kngwyu
7977fe68e2
Use Unsendable alias instead of Phantomdata<Rc<()>>
2019-10-27 23:12:59 +09:00
Martin Larralde
5397a62f48
Fix broken specialized implementations with Rust 1.40
2019-10-07 16:01:15 +02:00
konstin
30e82a3018
Replace IntoPyObject with IntoPy<PyObject>
2019-08-24 19:23:28 +02:00
kngwyu
5ab216dfe0
Implement IntoPyObject to PyRef
2019-08-11 18:43:50 +09:00
kngwyu
5a2b021fda
Remove FromPyObject from PyRef
...
It's invalid
2019-04-23 23:16:09 +09:00
kngwyu
b2e01066f0
Introduce FromPyPointer for slf: PyRef/PyRefMut
2019-04-23 23:16:09 +09:00
kngwyu
515c7beac0
Allow slf: Py<Self>/PyRef<Self>/PyRefMut<Self> in pymethods
2019-04-23 23:16:08 +09:00
konstin
20481e8324
Whitelist clippy error
2019-03-24 17:33:08 +01:00
kngwyu
f3fe0dfdd5
Move From<PyRef> impl to any.rs
2019-03-04 21:49:43 +09:00
kngwyu
874d8a0835
Rename PyObjectRef with PyAny
2019-03-04 13:50:43 +09:00
konstin
dcce57f4f9
Merge pull request #369 from kngwyu/hide-nativetype
...
Make PyNativeType unsafe
2019-02-26 23:53:12 +01:00
kngwyu
498689423e
Make PyNativeType unsafe
2019-02-25 23:15:13 +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
kngwyu
8d9b4dd153
Introduce PyDictItem
2019-02-18 16:06:37 +09:00
konstin
6cb098ee12
Replace py.init_[ref|mut] with Py[Ref|Mut]::new
2019-02-13 21:52:21 +01:00
konstin
1a489d2829
Make the init methods use a value instead of a function
2019-02-13 13:59:47 +01:00
kngwyu
4a552a88cf
Py::new_ref -> PyRef::new
2019-02-08 23:51:14 +09:00
kngwyu
c80134fbcd
Refactor PyRef/PyRefMut based on reviews
2019-02-08 13:58:44 +09:00
kngwyu
1d3dd2c343
Write documents of PyRef/PyRefMut
2019-02-07 15:17:27 +09:00
kngwyu
01fc1405b0
Modify AsPyRef::as_ref to return PyRef
2019-02-07 14:27:13 +09:00
kngwyu
22687c3712
Modify PyIterProtocol to take PyRefMut
2019-02-05 17:27:34 +09:00
kngwyu
76e30b5248
Remove ToPyPointer and so on from pyclass
2019-02-04 00:34:06 +09:00
konstin
936f0153e8
Migrate to rust 2018
2019-02-01 14:23:29 +01:00
konstin
3614f38154
Remove some transmute
2018-11-12 21:38:20 +01:00
konstin
d1de3338d1
Refactor PyObjectAlloc
2018-11-12 16:45:57 +01:00
konstin
6cec1c39cc
Update changelog
2018-11-12 15:11:03 +01:00
konstin
aed0466915
s/PyObjectWithToken/PyObjectWithGIL/g
2018-11-12 15:10:53 +01:00
konstin
57afb51604
Remove PyToken completely; Fixes #94
2018-11-12 14:42:21 +01:00
konstin
9f45efebaf
Format
2018-11-11 12:25:53 +01:00
ijl
50c6129607
NonNull pointer for Py, PyObject
2018-11-08 15:09:52 +00:00
konstin
8b27f1e412
Get ready for rust 2018
2018-10-31 11:43:21 +01:00
konstin
dbaa2de061
Small improvements around function calling
2018-10-31 11:38:45 +01:00
konstin
5100676497
Splitted PyTypeCreate of PyTypeObject to remove specialization
2018-10-03 22:12:22 +02:00
konstin
302c099a76
Big refactoring to shrink the prelude
2018-09-21 23:34:28 +02:00
konstin
f58549f1d8
Get rid of a bunch of PyTokens
2018-09-02 23:33:45 +02:00
konstin
0101dc8136
Two default fn less
2018-08-31 21:11:08 +02:00
konstin
8de0574aad
Clippy stuff
2018-08-26 21:35:53 +02:00
konstin
3e7d5280ca
Merge pull request #200 from pganssle/datetime
...
Initial datetime bindings
2018-08-22 18:00:05 +02:00
konstin
7053c897aa
Get rid of #[inline(always)] and replace it with #[inline]
...
I've just seen that this had been hidden from clippy through the ffi module reordering, but fixing this on master would cause merge conflicts, so I'm fixing this here directly
2018-08-21 18:33:33 -04:00
konstin
771d59b913
Fix another bunch of clippy lints
2018-08-21 23:51:13 +02:00
konstin
fe8a719ee1
Rustfmt all the things ✔️
2018-07-30 23:05:10 +02:00
konstin
83db765889
Refactoring
2018-07-30 22:56:25 +02:00
konstin
eb613c64d9
Add repr(transparent) where applicable
2018-07-13 18:10:09 +02:00
Vlad Shcherbina
2aedbffcd0
Fix typos
2018-03-15 14:41:16 +03:00
Nikolay Kim
b738c1a04b
clippy warnings
2018-01-19 10:02:36 -08:00
Nikolay Kim
d6035bce15
Fix impl FromPyObject for Py<T>
2018-01-17 08:09:44 -08:00
Nikolay Kim
050397b723
mark method that work with raw pointer unsafe
2017-12-26 13:41:27 -08:00
Nikolay Kim
03b6e5c122
refactor object allocation system
2017-08-11 20:17:09 -07:00
Nikolay Kim
ed8599cfd3
refactor __new__ method implementation
2017-08-08 00:27:33 -07:00
Nikolay Kim
cd6558a19b
Introduce IntoPyDictPointer similar to IntoPyTuple #69
2017-08-03 15:01:52 -07:00
Nikolay Kim
e44365bec6
make cast_xxx api consistent with PyObject::from_xxx api
2017-08-01 14:29:25 -07:00
Nikolay Kim
325070f6c9
refactor downcast process
2017-07-28 23:19:00 -07:00
Nikolay Kim
afcfed492b
only c classes only as base class
2017-07-27 19:47:01 -07:00
Nikolay Kim
d567817035
add base support for inheritance
2017-07-26 22:29:55 -07:00
Nikolay Kim
a120bbf15e
Refactor implementation. Drop parameter from constructor
2017-07-26 01:11:00 -07:00
Nikolay Kim
98bdf63a4d
use const_fn for type size and offset calculation
2017-07-21 09:48:48 -07:00
Nikolay Kim
fc1df289bd
drop PyClone trait; doc cleanups
2017-07-18 10:13:50 -07:00
messense
e69163344a
Fix some clippy warnings ( #49 )
2017-07-18 19:28:49 +08:00
Nikolay Kim
149aa3a0eb
always inline all py()
2017-07-14 16:21:18 -07:00
Nikolay Kim
292bd2c139
inline py() call
2017-07-14 14:21:07 -07:00
Nikolay Kim
c5f5620f77
rename token() to py()
2017-07-13 19:04:00 -07:00
Nikolay Kim
ed31492d36
rename pointer mod to object
2017-07-13 13:05:50 -07:00
Nikolay Kim
c1c4648add
delay decref until gil available
2017-07-09 12:08:57 +06:00
Nikolay Kim
3a2004eab2
rename PyInstance to PyObjectRef
2017-06-24 08:28:31 -07:00
Nikolay Kim
14c6aaad55
py.init returns ptr, init_ref and init_mut ref and mut ref
2017-06-23 15:15:07 -07:00
Nikolay Kim
8238a141ae
py.init(..) return reference
2017-06-23 15:03:52 -07:00
Nikolay Kim
a58aa7b5e6
rename PyObject
2017-06-22 20:56:09 -07:00
Nikolay Kim
2faf18bb9e
rename token method
2017-06-22 13:35:21 -07:00
Nikolay Kim
b9377849c8
rename modules
2017-06-22 01:16:22 -07:00