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
Sebastian Pütz
0f32f886b8
More FromPyObject derive suggestions by @davidhewitt
2020-08-30 19:16:59 +02:00
David Hewitt
21cdb8ab7e
Add introduction to guide
2020-08-30 13:03:28 +01:00
Sebastian Pütz
53a858c5c1
Add documentation for FromPyObject derivation.
2020-08-30 13:35:06 +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
16ef96904a
Merge pull request #1114 from mtreinish/hashbrown
...
Add optional support for conversion from Hashbrown types
2020-08-26 12:48:21 +01:00
Matthew Treinish
659d24e1a9
Add CHANGELOG entry and update conversions guide
2020-08-26 06:37:02 -04:00
David Hewitt
37d23da7d5
Add link to Bazel rules
2020-08-25 23:02:20 +01:00
Rene Leveille
441d7f52b1
apply symlink use case, change variable name
2020-08-19 12:11:14 -04:00
Rene Leveille
7beb272075
find within general lib dir, with new optional env variable
2020-08-18 22:05:29 -04:00
Rene Leveille
5dc907bc5d
apply suggestions from review
2020-08-17 18:14:05 -04:00
Rene Leveille
0cd1e5bf19
change documentation
2020-08-17 15:17:34 -04:00
Rene Leveille
aef159d4ee
appy suggestions from PR
2020-08-17 11:26:30 -04:00
David Hewitt
565e36d989
Merge pull request #1098 from davidhewitt/py-as-into-ref
...
Py::as_ref and Py::into_ref (remove AsPyRef)
2020-08-11 20:44:53 +01:00
Yuji Kanagawa
b17d4fffe2
Merge pull request #1093 from kngwyu/iterator-example
...
Improve lifetime insertions for #[pyproto]
2020-08-11 18:16:53 +09:00
David Hewitt
6b3c6fdeee
Improve docs for Py::as_ref() and Py::into_ref()
...
Co-authored-by: Georg Brandl <georg@python.org>
2020-08-11 08:36:31 +01:00
Georg Brandl
4467cf51db
guide: show exporting create_exception! exceptions in a module
2020-08-10 17:08:52 +02:00
Yuji Kanagawa
c4d9ab227e
Merge branch 'master' into iterator-example
2020-08-10 17:11:00 +09:00
kngwyu
093dda375f
Improve lifetime insertions for #[pyproto]
2020-08-10 15:18:16 +09:00