Commit Graph

38 Commits

Author SHA1 Message Date
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
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 22687c3712 Modify PyIterProtocol to take PyRefMut 2019-02-05 17:27:34 +09:00
konstin 936f0153e8 Migrate to rust 2018 2019-02-01 14:23:29 +01:00
konstin 57afb51604 Remove PyToken completely; Fixes #94 2018-11-12 14:42:21 +01:00
konstin fb2349b6ec Remove PyToken usages from tests 2018-11-12 14:41:29 +01:00
konstin 3a95d163ca New rustfmt version
You might need to upgrade to the latest nightly to get the same results
2018-09-28 23:34:57 +02:00
konstin 302c099a76 Big refactoring to shrink the prelude 2018-09-21 23:34:28 +02:00
konstin 991a8b94d2 More nightly fixes 2018-08-19 20:42:17 +02:00
konstin b12b65cfae Cleanup 2018-08-19 20:06:47 +02:00
konstin fe8a719ee1 Rustfmt all the things ✔️ 2018-07-30 23:05:10 +02:00
konstin d59bebcc38 Upgrade from proc_macro to use_extern_macros 2018-07-18 13:08:05 +02:00
konstin 4013d40897 Add `py` prefix to the proc macros and move them into the root module
This is important because `proc_macro_path_invoc` isn't going to be stabilized soon.
2018-07-08 23:33:48 +02:00
konstin 6645708e4f Get rid of #[py*] methods 2018-07-03 20:42:02 +02:00
konstin 80096ae143 rudtfmt the tests
With some careful refactoring alongside
2018-06-15 21:21:12 +02:00
konstin f2be73c4f3 Fix tests 2018-06-14 16:20:55 +02:00
konstin 76510bdd0e Refactoring
This is actually a failed bugfix attempt, but still useful
2018-06-13 18:02:45 +02:00
Renamed from tests/test_underscore_methods.rs (Browse further)