Commit Graph

164 Commits

Author SHA1 Message Date
David Hewitt 06ff76fec2
examples: make `word-count` example comparison fairer 2021-08-13 14:19:46 +01:00
David Hewitt b66f539473 docs: sync README and lib.rs examples 2021-08-02 23:03:25 +01:00
David Hewitt ba0ba14fb8 pyo3-pytests: don't set profile in Cargo.toml 2021-07-31 16:52:30 +01:00
David Hewitt d46d3265cb pypy: fix FFI definition of Py_Buffer 2021-07-24 08:37:22 +01:00
David Hewitt bac1345f4d
Merge pull request #1730 from davidhewitt/pypy-pytests
pyo3-pytests: cover more tests on PyPy
2021-07-19 18:16:06 +01:00
David Hewitt ab4348c30b pyo3-pytests: remove memory leak test 2021-07-18 20:04:46 +01:00
David Hewitt 95cb5c6ef1 pyo3-pytests: cover more tests on PyPy 2021-07-18 19:30:30 +01:00
messense b5b9a480cd Add `wrap_pyfunction` macro to prelude 2021-06-24 22:34:55 +08:00
David Hewitt ab8925572b pyo3-benchmarks: add benchmark for class init 2021-06-22 07:33:46 +01:00
Georg Brandl 6c3f688a60 Add more argument parsing benchmarks.
Change output so that benchmarks belonging together are shown together.
2021-06-06 16:20:09 +02:00
messense bd1045e289 Add support for extracting PathBuf from pathlib.Path 2021-06-05 14:59:26 +08:00
David Hewitt 79c7149d52 pyo3-build-config: new crate to re-use build.rs across crates 2021-05-20 09:03:33 +01:00
Georg Brandl 473474cae7 pyo3_benchmarks: add a benchmark for the "only simple args" case
This is the case that will be helped by fastcall support,
so add it first as a baseline.
2021-05-19 08:17:33 +02:00
David Hewitt f1dd1380a5 examples: use pip 21.1 2021-04-29 08:52:01 +01:00
David Hewitt 0ae7b69295
examples: add links to packaging tools
Co-authored-by: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
2021-04-03 12:50:42 +01:00
David Hewitt 370652eba8 examples: maturin and setuptools_rust examples 2021-04-03 11:59:41 +01:00
David Hewitt fe74160a7d pyo3_benchmarks: benchmarks as separate Python example 2021-03-01 19:12:39 +00:00
David Hewitt 29a525b327 pyfunction: refactor argument extraction 2021-03-01 17:49:46 +00:00
winxton 5498b7ee3c Fix wordcount example docs 2021-02-24 13:41:45 -05:00
David Hewitt b2675b11fe rust 1.50: clippy and lint fixes 2021-02-11 22:03:34 +00:00
David Hewitt 0da12bd0dc ci: deny clippy warnings for examples 2020-12-31 22:11:48 +00:00
David Hewitt 126a74842f rustapi_module: move issue_219 regression test 2020-11-10 14:23:08 +00:00
David Hewitt 33b8aba3bb examples: simplify tox instructions 2020-11-10 12:50:41 +00:00
Yuji Kanagawa 3b3ba4e3ab
Merge pull request #1152 from PyO3/abi3
Complete abi3 support
2020-10-27 23:30:36 +09:00
Arnav Jindal 042337b423
Update lib.rs 2020-10-21 19:37:23 +05:30
Arnav Jindal a3d0c86c1c
Docs: Fixed example word_count 2020-10-21 12:36:36 +05:30
Alex Gaynor 90a825d0c2 Merge branch 'master' into abi3-merge-master 2020-10-19 14:32:49 -04:00
David Hewitt afd9b823d2 Drop support for Python 3.5 2020-10-18 19:02:27 +01:00
Alex Gaynor aabad7cf7f Assorted updates to the abi3 branch from review 2020-10-11 19:51:27 -04:00
Alex Gaynor 140790b15f Merge branch 'master' into abi3-merge-master 2020-10-10 10:11:49 -04:00
kngwyu 2e22066feb Do not test PyPy on Windows 2020-10-08 16:29:50 +09:00
Alex Gaynor 5bfb4674b1 Merge branch 'master' into abi3-merge-master 2020-09-10 17:01:13 -04:00
kngwyu 7a4c5e2960 Merge branch 'master' into abi3 2020-09-10 00:48:20 +09:00
Sebastian Pütz 22881a3c2f Change add_function, ensure static docstrings.
Change add_function to take `&PyCFunction` instead of a wrapper
fn and ensure that dostrings of functions are `&'static str`.
2020-09-09 12:37:37 +02: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
Sebastian Pütz 5bbca1a052 Set the module of `#[pyfunction]`s.
Previously neither the module nor the name of the module of
pyfunctions were registered. This commit passes the module and
its name when creating a new pyfunction.

PyModule::add_function and PyModule::add_module have been added and are
set to replace `add_wrapped` in a future release. `add_wrapped` is kept
for compatibility reasons during the transition.

Depending on whether a `PyModule` or `Python` is the argument for the
Python function-wrapper, the module will be registered with the function.
2020-09-03 14:49:28 +02:00
Alex Gaynor 400462063d Proof of concept of using PEP384s PyType_Spec 2020-09-02 16:54:39 -04:00
David Hewitt 4ed9748b45 Rename exceptions to PyException etc; reintroduce deprecated ones 2020-07-18 06:02:57 +01:00
kngwyu 016800ba4d Use travis's pypy binary instead of anaconda 2020-06-27 19:45:31 +09:00
David Hewitt 9f9137c6e4 Add ability to return from `__next__` / `__anext__` 2020-06-23 15:26:28 +01:00
kngwyu f053bc3881 Fix dealloc implementation to collectly use subtype's tp_free 2020-06-22 10:58:00 +09:00
kngwyu b70ee9a5ad Use subclass correctly in tp_new 2020-06-22 01:38:13 +09:00
Alexander Niederbühl d2c7645bad Add benchmark for Python threaded word count
Add benchmark where the sequential Rust version of the word count is
executed twice to demonstrate parallelism with Python threads.  Also
slightly simplify the benchmark functions.
2020-06-05 20:22:20 +02:00
Alexander Niederbühl bafe269dde Set debug to `False` in word-count example 2020-06-05 16:40:29 +02:00
Alexander Niederbühl de9aae1e82 Use string slices as function arguments
Also use the same names as parameters.
2020-06-05 16:40:29 +02:00
Alexander Niederbühl 4c55fa6b38 Remove unnecessary wrapping of test function 2020-06-05 16:40:29 +02:00
Alexander Niederbühl eb73105625 Make benchmarks more comparable 2020-06-05 16:40:29 +02:00
Alexander Niederbühl bcf48c0bd2 Fix clippy lints 2020-06-05 13:53:01 +02:00
Yuji Kanagawa b3566bc7d9
Merge pull request #830 from oconnor663/maxsize
use struct.calcsize("P") rather than platform.machine()
2020-03-29 16:07:57 +09:00
Jack O'Connor d2c07a87d2 xfail a couple of datetime tests on Python 3.5 + macOS 2020-03-29 15:38:42 +09:00