Commit Graph

358 Commits

Author SHA1 Message Date
David Hewitt 3d6356223e docs: fix warnings 2020-12-18 23:11:10 +00:00
Alex Gaynor 3edd961fa3 Clearly document the limitations of abi3
closes #1288
2020-12-13 10:26:37 -05:00
Yuji Kanagawa 9aa70f7c89
Merge pull request #1263 from PyO3/abi3-min-python
Add abi3-py* features
2020-12-08 12:52:00 +09:00
kngwyu 49143724d5 Rename PYO3_NO_INTERPRETER by PYO3_NO_PYTHON 2020-12-07 17:30:04 +09:00
Yuji Kanagawa 6da6bc9461
Apply suggestions from @davidhewitt
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2020-12-06 16:06:10 +09:00
kngwyu 1b838504b7 Introduce PYO3_NO_INTERPRETER variable for build script 2020-12-01 23:40:49 +09:00
Patrick Chieppe bba1cf19b3 Add section about Python::check_signals to the FAQ 2020-11-30 11:38:40 +11:00
David Hewitt fc34e41163 pyany: add is_instance 2020-11-22 19:24:59 +00:00
kngwyu 93282e9a70 Note abi3-py* features in the guide and Add CHANGELOG 2020-11-16 00:47:24 +09:00
David Hewitt 9617edfca9 msrv: bump to 1.45 2020-11-12 11:33:08 +00:00
Yuji Kanagawa 3b3ba4e3ab
Merge pull request #1152 from PyO3/abi3
Complete abi3 support
2020-10-27 23:30:36 +09:00
kngwyu eb0e6f6b55 Note the minimum required version of maturin supporting abi3 2020-10-27 13:19:01 +09:00
kngwyu 6627658127 Renew proc-macros for new `#[pyproto]` backend 2020-10-21 01:29:28 +09:00
Alex Gaynor ba6f0ecdfa Merge branch 'master' into abi3-merge-master 2020-10-18 10:47:06 -04:00
David Hewitt 84b893b261 guide: improve "calling Python from Rust" section 2020-10-18 10:08:11 +01:00
David Hewitt 27f2d0ee3b
Merge pull request #1212 from Askaholic/issue/#1055-add-arg-name-to-conversion-error
Enhance error messages of conversion errors
2020-10-18 09:15:42 +01:00
David Hewitt 4a916eb3ed
guide: fix broken link 2020-10-16 09:00:46 +01:00
Askaholic 6724783395
Change wording of PyDowncastError display implementation
Displays type(obj) instead of repr(obj) and uses `cannot` instead of
`can't`
to be more consistent with existing python error messages.

See discussion at #1212.
2020-10-14 17:32:00 -08:00
Alex Gaynor 9e34835b76 Merge branch 'master' into abi3-merge-master 2020-10-12 18:03:14 -04:00
Alex Gaynor aabad7cf7f Assorted updates to the abi3 branch from review 2020-10-11 19:51:27 -04:00
Alex Gaynor 877667a1c6 Improved documentation 2020-10-11 15:18:05 -04:00
Alex Gaynor 140790b15f Merge branch 'master' into abi3-merge-master 2020-10-10 10:11:49 -04:00
David Hewitt 23d9d259a7 migration guide: tiny typo fix 2020-10-10 06:24:57 +01:00
kngwyu 41c2f5a748 Use &'static CStr for representing method names and docs 2020-10-08 17:26:55 +09:00
Alex Gaynor e615ce8c05 Start documenting abi3 support 2020-09-23 18:42:49 -04:00
kngwyu 1985578bb7 Don't compile extends=PyDict test in class.md with abi3 2020-09-20 16:20:08 +09:00
Sebastian Pütz 0a346dfa7c Add documentation for raw_pycfuntion 2020-09-17 09:47:53 +02:00
Alex Gaynor ba1056006a Get all the tests building, everythign except doctests passes! 2020-09-16 08:42:22 -04:00
Alex Gaynor 5bfb4674b1 Merge branch 'master' into abi3-merge-master 2020-09-10 17:01:13 -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 73507dbf5e
Merge pull request #1163 from sebpuetz/pyfunction
Add native Function types.
2020-09-10 19:05:57 +01:00
David Hewitt b9e95dc7c9 Implement std::error::Error for PyErr 2020-09-10 19:04:24 +01: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
Alex Gaynor 117f60bed0 Make PyType::name abi3 compatible
The implementation is more complex, because there's no equivalent to tp_name in the limited API
2020-09-08 12:22:59 -04:00
David Hewitt 16fe583b82
Merge pull request #1143 from sebpuetz/pyfunction-modules
PyModule in #[pyfunction]
2020-09-06 20:55:29 +01:00
David Hewitt a1d6c7a838
Merge pull request #1157 from davidhewitt/conversion-detail
docs: add detail to wrapper type conversions
2020-09-06 20:52:34 +01:00
David Hewitt 192c2c2b2c docs: add detail to wrapper type conversions 2020-09-06 10:21:08 +01:00
Sebastian Pütz 64b06ea9ec Change `add_submodule()` to take `&PyModule`.
The C-exported wrapper generated through `#[pymodule]` is only
required for the top-level module.
2020-09-05 15:54:57 +02:00
David Hewitt 2b0b853912 Add CHANGELOG to the guide 2020-09-05 14:44:39 +01:00
Sebastian Pütz 06cd7c7d5a Fix some more docs. 2020-09-05 11:24:12 +02:00
Sebastian Pütz e65b849ab6 Doc fixes, changelog and rename. 2020-09-05 10:20:22 +02:00
Sebastian Pütz 9137855e81 Add documentation for accessing PyModule in #[pyfunction]s. 2020-09-04 10:02:40 +02:00
Sebastian Pütz 4aae523e54 Rename add_module to add_submodule, documentation fixes. 2020-09-04 09:02:49 +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 81afdaf6cd Start splitting long guide pages into subchapters 2020-09-01 22:44:27 +01:00
David Hewitt f0650ebd94 Add doc for extracting Union via FromPyObject 2020-09-01 22:04:57 +01:00
Yuji Kanagawa 729f2f42e7
Merge pull request #1065 from sebpuetz/union
FromPyObject derivation for structs and enums
2020-08-31 21:28:49 +09:00