konstin
3adcac6e61
Replace concat_idents with mashup
2018-07-18 23:17:05 +02:00
konstin
d59bebcc38
Upgrade from proc_macro to use_extern_macros
2018-07-18 13:08:05 +02:00
konstin
fe931a594f
#[pymodinit] now uses the function name as default module name
2018-07-10 00:13:02 +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
68c14a5707
Merge branch 'master' of https://github.com/PyO3/pyo3
2018-07-03 21:55:43 +02:00
konstin
43eb5fa490
Rename prepare_pyo3_library to init_once
2018-07-03 21:12:57 +02:00
konstin
6645708e4f
Get rid of #[py*] methods
2018-07-03 20:42:02 +02:00
kngwyu
70e1879d59
Make python pub
2018-07-02 00:06:01 +09:00
konstin
858a124374
Merge master
2018-05-05 15:50:04 +02:00
konstin
15204bab56
Better way to add functions to modules
2018-05-02 19:26:54 +02:00
konstin
0880ac166c
Merge master
2018-05-01 20:41:35 +02:00
konstin
d0c42dfcc1
Fix compilation on nightly
2018-05-01 15:44:38 +02:00
konstin
6113428746
Allow defining functions outside of the module declarations
...
This commit consists of
* a proc macro to convert rust functions into python functions (`#[function]`),
* a macro to register a function in a module (`add_function_to_module!`)
* Documenting both the old and the new way in the book
2018-04-30 23:17:09 +02:00
konstin
45bb09b3e8
Relax return type requirements
...
Allows returning essentially arbitrary types by wrapping them into a PyResult. This is done with a conversion trait that specializes for PyResult.
2018-04-06 17:22:09 +02:00
Nikolay Kim
b7a8d25338
const fns that we use are stable now
2018-02-21 09:23:58 -08:00
Nikolay Kim
b738c1a04b
clippy warnings
2018-01-19 10:02:36 -08:00
Nikolay Kim
324a6b2697
drop RefFromPyObject; allow mut refs #106
2018-01-19 09:04:42 -08:00
dkao1978
eb9050ab90
Add documentation for compiling on MacOS ( #89 )
...
* Update README.md
* Update overview.md
* Update lib.rs
* Update README.md
* Add links
2017-10-22 11:17:35 +08:00
messense
703883687a
Add features to tests
2017-09-19 20:03:03 +08:00
messense
9da1247484
Fix build on rustc nightly-2017-09-16
...
Use forked version of spin-rs for now.
Closes #79
2017-09-19 19:51:25 +08:00
Nikolay Kim
ed8599cfd3
refactor __new__ method implementation
2017-08-08 00:27:33 -07:00
Nikolay Kim
130c33ec09
export IntoPyDictPointer
2017-08-03 15:55:23 -07:00
Nikolay Kim
cd6558a19b
Introduce IntoPyDictPointer similar to IntoPyTuple #69
2017-08-03 15:01:52 -07:00
Nikolay Kim
c44e23f4b9
add prelude mod
2017-07-31 10:42:55 -07:00
Nikolay Kim
325070f6c9
refactor downcast process
2017-07-28 23:19:00 -07:00
Nikolay Kim
a4fd878cb7
pyerr cleanups
2017-07-26 14:28:04 -07:00
Nikolay Kim
e45eb6e878
rename ToPyErr to PyErrArguments
2017-07-26 10:47:17 -07:00
Nikolay Kim
a120bbf15e
Refactor implementation. Drop parameter from constructor
2017-07-26 01:11:00 -07:00
Nikolay Kim
2ee6419464
do not catch rust panics
2017-07-20 14:21:57 -07:00
Nikolay Kim
fc1df289bd
drop PyClone trait; doc cleanups
2017-07-18 10:13:50 -07:00
Nikolay Kim
4daac50781
remove associated_consts feature
2017-07-14 03:17:57 -07:00
Nikolay Kim
8eb5dc0667
use associated consts
2017-07-13 16:45:50 -07:00
Nikolay Kim
ed31492d36
rename pointer mod to object
2017-07-13 13:05:50 -07:00
Nikolay Kim
c1c4648add
delay decref until gil available
2017-07-09 12:08:57 +06:00
Nikolay Kim
503e4221cc
support &str as fn param
2017-06-24 15:28:53 -07:00
messense
4e836cb229
Don't reexport Py_hash_t and Py_ssize_t
2017-06-24 22:36:45 +08:00
messense
378fae9659
Hide argparse module in API docs
2017-06-24 22:30:46 +08:00
messense
a5e3429d60
Remove unnecessary ObjectProtocol
import
2017-06-24 22:29:35 +08:00
messense
0ba541e762
Add missing module level docs
2017-06-24 16:47:36 +08:00
Nikolay Kim
cc56ded6bf
fix python2 extension module initialization
2017-06-23 11:51:15 -07:00
Nikolay Kim
61f85c730e
fix doc tests; fix unsued import warning
2017-06-23 10:38:04 -07:00
Nikolay Kim
a58aa7b5e6
rename PyObject
2017-06-22 20:56:09 -07:00
Nikolay Kim
cb969161c6
fix unchecked downcast; added objects pool
2017-06-22 10:26:07 -07:00
Nikolay Kim
b9377849c8
rename modules
2017-06-22 01:16:22 -07:00
Nikolay Kim
c48386affa
stopping point
2017-06-22 01:04:37 -07:00
Nikolay Kim
7cf8e1ab80
modify PyDict
2017-06-21 14:08:16 -07:00
Nikolay Kim
96788bf192
more types
2017-06-21 13:10:40 -07:00
Nikolay Kim
08ddb3f14f
other types
2017-06-21 12:33:21 -07:00
Nikolay Kim
c4ba2b0f2e
rename InstancePtr to AsPyRef
2017-06-20 14:22:49 -07:00
Nikolay Kim
40efa5c955
rename Ptr to Py
2017-06-19 23:57:34 -07:00
Nikolay Kim
7b5521fdb3
simplify instance ptr, droped #[py::ptr] annotation attr
2017-06-19 20:55:07 -07:00
Nikolay Kim
b4deb673c7
refactor #[args()] attribute #40
2017-06-19 14:05:14 -07:00
Nikolay Kim
005c36548b
add specialization to docs
2017-06-18 09:28:21 -07:00
messense
75d6684d25
Clarify Python module doc string
2017-06-18 23:15:10 +08:00
Nikolay Kim
60a965edc3
update link to example py extension
2017-06-15 14:30:11 -07:00
Nikolay Kim
e85db971f9
fix module export functions
2017-06-15 14:20:30 -07:00
Nikolay Kim
0679fec859
update docs
2017-06-15 11:13:58 -07:00
Nikolay Kim
ac0594a5b2
do not use pub pointers mod
2017-06-15 10:36:41 -07:00
Nikolay Kim
3bed79fe0b
add clippy and doc to travis
2017-06-15 09:11:19 -07:00
Nikolay Kim
5bf6ce3864
added __unicode__ method to PyObjectProtocol
2017-06-15 07:48:57 -07:00
Nikolay Kim
bd7a0feb8c
merge master
2017-06-15 07:16:40 -07:00
messense
b8b9daf67a
Enable doc test for src/lib.rs examples
2017-06-15 16:06:04 +08:00
Nikolay Kim
d9bd485072
macro_use is not requires
2017-06-14 14:42:05 -07:00
Nikolay Kim
293569b6af
remove import
2017-06-14 14:23:51 -07:00
Nikolay Kim
706477f139
replace py_fn! macro with pyfn attribute
2017-06-14 14:08:30 -07:00
Nikolay Kim
6204a06cbc
update docstring
2017-06-11 23:54:24 -07:00
Nikolay Kim
fdd9ac7ae9
various improvements
2017-06-11 18:30:56 -07:00
Nikolay Kim
805429e0f4
remove unneeded macro
2017-06-11 16:49:25 -07:00
Nikolay Kim
05d4a0a9a4
rename ffi to ffi3
2017-06-11 16:47:27 -07:00
Nikolay Kim
3b4d147219
initial impl for py2
2017-06-11 16:35:24 -07:00
messense
cb68cd23a2
Fix some clippy warnings ( #26 )
2017-06-11 23:46:23 +08:00
Nikolay Kim
c28a619efd
add free list support
2017-06-09 14:27:37 -07:00
messense
e12e98a7c1
Convert some std error types to PyErr ( #22 )
...
* Convert some std error types to PyErr
* Add ToPyErr trait
2017-06-08 09:40:30 +08:00
Nikolay Kim
a584ce12e5
release py objects aftre use
2017-06-06 19:26:59 -07:00
Nikolay Kim
84f5578997
varios cleanups
2017-06-05 20:25:00 -07:00
Nikolay Kim
a448aa54cc
clone_ref return Self
2017-06-03 17:42:12 -07:00
Nikolay Kim
57cc139c81
drop Py pointer
2017-06-03 17:27:26 -07:00
Nikolay Kim
b75160daf3
remove pyobject lifetime
2017-06-02 18:58:16 -07:00
Nikolay Kim
27bd365f5c
cleanups
2017-06-02 09:23:48 -07:00
Nikolay Kim
cbfdfa2d07
better naming
2017-06-01 15:06:48 -07:00
Nikolay Kim
fc762288fe
use From instead of as_object; fix type object
2017-06-01 13:34:46 -07:00
Nikolay Kim
9176dc4df1
consistent naming for pointers
2017-06-01 10:35:02 -07:00
Nikolay Kim
6834a18a5b
add ptr support to class
2017-05-31 20:50:40 -07:00
Nikolay Kim
2f3ea202b3
add mirror ptr types for native py classes
2017-05-31 15:52:13 -07:00
Nikolay Kim
92bf7b9c05
rename pptr to PyObjectPtr
2017-05-31 01:08:39 -07:00
Nikolay Kim
5d25c7deea
simplify Py and PyPtr objects
2017-05-30 18:57:36 -07:00
Nikolay Kim
3040ac12b9
refactor ToPyObject
2017-05-30 17:23:23 -07:00
Nikolay Kim
b8913a3705
refactor IntoPyObject trait; rename pptr into pyptr, introduce pptr pointers
2017-05-30 16:29:13 -07:00
Nikolay Kim
61b8bd0695
fix ptr borrowing PyTuple::get_item
2017-05-29 18:36:44 -07:00
Nikolay Kim
51ac8c9c78
better gil token scope
2017-05-29 13:30:38 -07:00
Nikolay Kim
ea8ccf190a
special treatment for native python objects
2017-05-29 02:47:27 -07:00
Nikolay Kim
55d0d58734
added pptr pointer
2017-05-28 21:19:29 -07:00
Nikolay Kim
969cba2c16
remove Token
2017-05-28 08:57:34 -07:00
Nikolay Kim
6c87c9b77b
introduce python token system
2017-05-27 22:45:48 -07:00
Nikolay Kim
6205be98b8
introduce PythonToken; cleanup number protocol
2017-05-27 10:49:38 -07:00
Nikolay Kim
d165dbe4d4
fixed gil lifetime; pass py object into protocol methods
2017-05-26 14:43:28 -07:00
Nikolay Kim
0979653b98
various cleanups
2017-05-25 08:06:10 -07:00
Nikolay Kim
f3176dacfc
use pyptr for everything
2017-05-25 08:06:06 -07:00
Nikolay Kim
d6fb90bdc2
stopping point
2017-05-25 07:58:25 -07:00
Nikolay Kim
56d93249ab
pyptr
2017-05-25 07:58:25 -07:00