The symbols are instead kept unresolved, so that they can be used with
any compatible python interpreter, even if the target system uses a
statically linked python and lacks pythonX.Y.so altogether.
* FromPyObject for all conversions that don't need to borrow temporaries
* RefFromPyObject for extracting references out of temporaries
(currently only used for extracting `&str`)
We now use the generic <DUMMY> hack to avoid duplicate extern "C" symbols.
See rust-lang/rust#26201.
py_module_initializer!() calls now need to manually concatenate the module
name with the prefixes "init" and "PyInit_".
Since the `Python` token no longer is a part of `PyObject`,
lots of methods now require the token as additional argument.
This [breaking-change] breaks everything!
These macros now support specifying an argument list:
`py_fn!(myfn(myarg: i32))`
will expect `myfn` to be a function with the signature:
`fn myfn<'p>(py: Python<'p>, myarg: i32) -> PyResult<'p, _>`
It can called from python as `myfn(1)`
or using keyword arguments: `myfn(myarg=1)`.
If no parameter list is specified (`py_fn!(myfn)`), the expected signature
now includes the keyword arguments:
`fn run<'p>(py: Python<'p>, args: &PyTuple<'p>, kwargs: Option<&PyDict<'p>>)`
Due to the additional `kwargs` argument, this is a [breaking-change].