konstin
ad590bd158
Some api improvements
2019-02-23 18:01:22 +01:00
konstin
0cd72ac213
Bump to 0.6.0-alpha.4
2019-02-20 11:30:09 +01:00
konstin
32a15bc4a9
Merge pull request #364 from PyO3/parser_refactoring
...
Big proc macro refactoring
2019-02-19 22:22:23 +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
kngwyu
8d9b4dd153
Introduce PyDictItem
2019-02-18 16:06:37 +09:00
Chris Jones
5a28a1c4f0
Add PyList.reverse()
.
2019-02-17 22:22:46 +00:00
Yuji Kanagawa
b01592e201
Merge pull request #359 from chr1sj0nes/pylist_from_iterator
...
Add support for creating `PyList` from any `IntoIterator` for known s…
2019-02-17 09:50:06 +09:00
Chris Jones
e1ffd6c352
Add support for creating PyList
from any IntoIterator
for known size.
2019-02-16 23:28:03 +00:00
Chris Jones
275e6cb7c8
Add PyList.sort()
.
2019-02-15 23:20:02 +00: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
konstin
ce659941e8
Cleanup PyTypeObject and PyTypeCreate
2019-02-13 12:32:59 +01:00
konstin
c13f0708a4
Replace IntoPyTuple with IntoPy<Py<PyTuple>>
2019-02-12 22:58:23 +01:00
kngwyu
4a552a88cf
Py::new_ref -> PyRef::new
2019-02-08 23:51:14 +09:00
kngwyu
f95f4e8c14
Fix python2 test
2019-02-08 14:09:49 +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
56f2257e90
rust 2018 fixes
2019-02-01 16:23:34 +01:00
konstin
c71c116f29
Better trait bounds with PyMethodsProtocol
2019-02-01 16:23:34 +01:00
konstin
ae8a37cd0a
Allow 0..n pymethod blocks without specialization
2019-02-01 16:23:34 +01:00
konstin
829f35af5b
Migrate to rust 2018
2019-02-01 16:23:34 +01:00
konstin
e1154120d1
ffi2 to rust 2018
2019-02-01 16:23:34 +01:00
konstin
0495ee52d3
ffi2 to rust 2018
2019-02-01 15:25:58 +01:00
konstin
936f0153e8
Migrate to rust 2018
2019-02-01 14:23:29 +01:00
konstin
423b5d1099
Merge pull request #327 from StarryInternet/fix-cross-compilation
...
Implement Basic Cross Compile Support
2019-02-01 13:50:39 +01:00
Matt Pelland
80a6318b43
avoid signedness issues when cross compiling
2019-01-30 18:08:03 -05:00
Alexander Niederbühl
df36292523
Add $crate:: prefix in import_exception!
...
Also change doctest to use Rust 2018 macro includes.
2019-01-28 18:25:02 +01:00
Alexander Niederbühl
fbd012601e
Fix kwargs
...
kwargs was broken by a check for the number of given arguments. Only
apply this check if no arbitary number of keyword arguments are allowed
by a "**" parameter of `#[args(...)`.
Closes #318
2019-01-25 00:47:28 +01:00
Joel Höner
262b708de2
Add $crate:: prefix in create_exception!
2019-01-13 22:00:52 +01:00
konstin
5edd263371
rustfmt
2019-01-08 20:18:06 +01:00
konstin
146cb31c59
Merge pull request #317 from PyO3/issue_313
...
Fix #313
2019-01-08 19:39:25 +01:00
konstin
27520cb683
Fix #313
...
Thanks to @sumeet for the patch
2018-12-28 20:41:03 +01:00
konstin
322594128c
Merge pull request #316 from kngwyu/arraylist-fix
...
Fix memory leak in ArrayList
2018-12-28 20:31:26 +01:00
kngwyu
bbfe79fa57
Fix memory leak in ArrayList
2018-12-26 20:18:02 +09:00
kngwyu
419884c6ba
Use Box::into_raw instead of forget vec
2018-12-26 17:49:08 +09:00
ijl
984751a57f
Macro Rust doc
2018-12-21 02:07:43 +00:00
ijl
3452d6544a
ffi3 list macros, matching ffi2
2018-12-20 23:32:35 +00:00
Pavel Potoček
cbe668a0f4
Add (probably) forgotten type parameters to the pyobject_native_type_convert
macro.
...
This is needed for `rust-numpy` to compile.
2018-12-05 10:56:39 +01:00
ijl
b8a6d67e31
PyTryFrom::try_from_mut_unchecked()
2018-12-01 10:27:48 -05:00
ijl
d18ebea1c2
PyTryFrom::try_from_unchecked()
...
This allows casting a PyObjectRef to a specific type of PyObject
with no overhead.
2018-12-01 10:12:27 -05:00
konstin
790a103753
Merge pull request #291 from PyO3/exception_macros
...
Refactor the exception macros
2018-12-01 13:04:06 +01:00
kngwyu
7a83c1dc0f
Revert removing default from impl FromPyObject for &T and &mut T
2018-11-29 22:45:36 +09:00
konstin
9102f2e364
Refactor the exception macros
...
* Renamed `py_exception` to `create_exception`
* The split up of the macros makes it possible to create exception structs with bodies to mimic python exceptions' members
* Used `Once` to fix a (theoretical) race condition with the is_null check
2018-11-27 23:07:15 +01:00
kngwyu
b8f1373bec
Remove default for impl PyTryFrom for &T and &mut T
2018-11-27 14:42:09 +09:00
kngwyu
2539acc1e8
Remove default from ReturnTypeIntoPyResult
2018-11-27 14:31:00 +09:00
kngwyu
119e0abde2
Fix ArrayList::truncate
2018-11-21 16:28:26 +09:00
kngwyu
949097874f
Fix bug in ArrayList::pop_back
2018-11-21 16:00:26 +09:00