David Hewitt
8a60540e25
amend code for `PyDict::get_item` change
2023-09-09 12:23:06 +01:00
mejrs
984fdf57c7
Use Python:;with_gil in tests
2022-07-19 19:34:23 +02:00
mejrs
6f1cf1b662
Add more lints
2022-03-23 08:07:28 +01:00
David Hewitt
6433d884fc
dev: remove self dev dependency
2021-12-08 07:48:58 +00:00
messense
b5b9a480cd
Add `wrap_pyfunction` macro to prelude
2021-06-24 22:34:55 +08:00
kngwyu
9b88a452e2
Refactor tests to use shorter macros
2021-03-14 23:43:53 +09:00
David Hewitt
b2675b11fe
rust 1.50: clippy and lint fixes
2021-02-11 22:03:34 +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
David Hewitt
151af7a0b7
Merge pull request #1115 from davidhewitt/std-py-err
...
Implement std::error::Error for PyErr
2020-09-10 21:17:11 +01:00
David Hewitt
b9e95dc7c9
Implement std::error::Error for PyErr
2020-09-10 19:04:24 +01:00
Sebastian Pütz
3214249010
Make python function wrapper creation fallible.
...
Wrapping a function can fail if we can't get the module name.
Based on suggestion by @kngwyu
2020-09-03 15:48:32 +02:00
Mario
608aea726c
Allow other Result types in `#[pyfunction]` ( #1118 )
...
* Added a couple basic tests
* Implemented suggested change
* Fixed type inference
* cargo fmt
* Finished tests and removed warnings
* Include in CHANGELOG.md
* Moved test into separate file
* &'static str and function rename
* Mention in the book
2020-08-29 08:25:20 +01:00
David Hewitt
77ed6d6d69
Remove AsPyRef for just Py::as_ref
2020-08-09 22:47:54 +01:00
David Hewitt
e72b682038
Remove redundant iter test
2020-08-07 13:49:52 +01:00
kngwyu
8f8b42591a
Fix PySelf and AsPyRef
2020-02-16 23:54:55 +09:00
kngwyu
a2408cacbb
Rename PyClassShell with PyCell
2020-02-08 15:05:13 +09:00
David Hewitt
7531b9fb07
Remove even more uses of `static mut`
2020-01-30 13:24:55 +00:00
kngwyu
302b3bb088
Merge branch 'master' into pyclass-new-layout
2020-01-11 15:03:25 +09:00
Alexander Niederbühl
1f675dcaa7
Clear error indicator when the exception is handled on the Rust side
...
Leaving Python's global exception state is misleading, e.g. subsequent
calls of `py.eval` will fail.
2020-01-11 00:44:11 +01:00
kngwyu
a6639076b9
Introduce PyInternalCaster
2019-12-14 23:16:39 +09:00
Samuele Maci
0aa02f715f
Address clippy::into_iter_on_array issues
2019-08-17 14:10:36 +02:00
Daniël de Kok
ac28a3114b
Fix NULL pointer deref when creating iterator for non-iterable
...
Fixes #494 .
2019-07-27 19:58:18 +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
Alexander Niederbühl
299d325375
Enable setting the module name of a class
...
This is relevant for pickling objects.
2019-05-08 23:39:22 +02:00
Miles Granger
711155d7ad
Update tests & docs with IntoPyDict::into_py_dict(py)
2019-03-20 20:04:00 +01:00
konstin
6cd07c369c
Simpler new and clippy fixes
2019-02-23 18:38:00 +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
2105fa896b
Add PyTuple tests
...
Initially proposed by athre0z in #307 , with the changes from latest master
2019-02-13 22:30:46 +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
konstin
9e53418aad
Less feature(specialization)
2019-02-01 18:09:51 +01: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
302c099a76
Big refactoring to shrink the prelude
2018-09-21 23:34:28 +02:00
konstin
d92e522243
Syn 0.15
2018-09-09 00:20:04 +02:00
konstin
991a8b94d2
More nightly fixes
2018-08-19 20:42:17 +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
76510bdd0e
Refactoring
...
This is actually a failed bugfix attempt, but still useful
2018-06-13 18:02:45 +02:00
konstin
3e8a36b297
Split up test_class into multiple files
2018-05-02 20:56:11 +02:00