konstin
1a489d2829
Make the init methods use a value instead of a function
2019-02-13 13:59:47 +01:00
konstin
c13f0708a4
Replace IntoPyTuple with IntoPy<Py<PyTuple>>
2019-02-12 22:58:23 +01:00
konstin
1d17463532
Merge pull request #335 from kngwyu/rethink-pyclass
...
Remove ToPyPointer and so on from pyclass
2019-02-12 22:56:23 +01:00
kngwyu
4c60af6934
More detailed explaination about PyRef
2019-02-12 19:13:55 +09:00
kngwyu
73c7f8a5c2
Write about Py<T> in the guide
2019-02-09 22:37:21 +09:00
kngwyu
8259cc5d89
Added a note about `PyRef` and `PyRefMut` in guide
2019-02-08 23:51:37 +09:00
Alexander Niederbühl
638354cc34
Fix some examples in class.md
2019-02-03 14:29:17 +01:00
Alexander Niederbühl
1a47aab36b
Fix example in conversion.md
2019-02-03 14:13:47 +01:00
konstin
9e53418aad
Less feature(specialization)
2019-02-01 18:09:51 +01:00
konstin
56f2257e90
rust 2018 fixes
2019-02-01 16:23:34 +01:00
konstin
ae8a37cd0a
Allow 0..n pymethod blocks without specialization
2019-02-01 16:23:34 +01:00
konstin
936f0153e8
Migrate to rust 2018
2019-02-01 14:23:29 +01:00
konstin
423b5d1099
Merge pull request #327 from StarryInternet/fix-cross-compilation
...
Implement Basic Cross Compile Support
2019-02-01 13:50:39 +01:00
Matt Pelland
d3bb75e4c0
move cross compiling doc to the guide
2019-01-30 18:08:04 -05:00
konstin
bb4848f2c2
Merge pull request #329 from Alexander-N/get-started
...
Update Get Started section in user guide
2019-01-30 16:18:24 +01:00
Luke Hsiao
6fd41a16ae
docs(rust-cpython): fix minor typos
2019-01-28 15:44:17 -08:00
Alexander Niederbühl
b132a0bfc5
Update Get Started section in user guide
...
Use content of README.md for an updated version of
guide/src/get_started.md
2019-01-27 17:28:08 +01:00
Alexander Niederbühl
9e2347b810
Don't require feature when PYTHON_SYS_EXECUTABLE is set
...
If neither the feature python2 or python3 is used, the version of
PYTHON_SYS_EXECUTABLE is used.
Issue #276
2019-01-07 22:46:01 +01:00
Joel Höner
22a89d07aa
Document function signature reporting
2018-12-07 15:35:02 +01:00
Joel Höner
17535534ea
Fix some minor documentation errors
...
Pyo3 → PyP3
py::function → pyfunction
paramter → parameter
2018-12-07 15:22:12 +01:00
konstin
790a103753
Merge pull request #291 from PyO3/exception_macros
...
Refactor the exception macros
2018-12-01 13:04:06 +01:00
Tiago Antao
a5de9dcf00
Update building-and-distribution.md
2018-11-30 09:40:28 -05:00
Tiago Rodrigues Antao
08e61694b3
upgrade version reference
2018-11-30 08:50:15 -05:00
konstin
9102f2e364
Refactor the exception macros
...
* Renamed `py_exception` to `create_exception`
* The split up of the macros makes it possible to create exception structs with bodies to mimic python exceptions' members
* Used `Once` to fix a (theoretical) race condition with the is_null check
2018-11-27 23:07:15 +01:00
konstin
9035d54035
Add Documentation on build and linker args
2018-11-19 23:14:21 +01:00
konstin
9c8c5a6063
Rename #[pymodinit] to #[pymodule]
2018-11-15 19:43:29 +01:00
konstin
863ffb161f
Add wrap_module macro
2018-11-15 19:43:29 +01:00
konstin
57afb51604
Remove PyToken completely; Fixes #94
2018-11-12 14:42:21 +01:00
konstin
fb2349b6ec
Remove PyToken usages from tests
2018-11-12 14:41:29 +01:00
konstin
234e2c6998
Release 0.5.0-alpha.3 to fix #256
2018-11-02 16:34:40 +01:00
kngwyu
0859392d1c
Fix url from guide to doc
2018-10-04 16:36:30 +09:00
kngwyu
3620aae503
Build rust doc on travis
2018-10-04 16:19:36 +09:00
konstin
5100676497
Splitted PyTypeCreate of PyTypeObject to remove specialization
2018-10-03 22:12:22 +02:00
konstin
302c099a76
Big refactoring to shrink the prelude
2018-09-21 23:34:28 +02:00
konstin
9405ffa3b9
Add section about linking in the guide
2018-09-09 18:49:03 +02:00
konstin
f3c98ca7ba
Move setuptools-rust documentation to setuptools-rust
2018-09-06 18:03:15 +02:00
konstin
f58549f1d8
Get rid of a bunch of PyTokens
2018-09-02 23:33:45 +02:00
konstin
7c0379b13a
Remove many specialization uses
...
From over a hundret "default fn" uses down to 17
2018-08-25 20:48:17 +02:00
konstin
771d59b913
Fix another bunch of clippy lints
2018-08-21 23:51:13 +02:00
konstin
9cadbd11de
v0.4.1
2018-08-20 14:34:34 +02:00
konstin
991a8b94d2
More nightly fixes
2018-08-19 20:42:17 +02:00
konstin
b12b65cfae
Cleanup
2018-08-19 20:06:47 +02:00
konstin
d0ed68414a
Many small improvements
2018-08-04 19:56:59 +02:00
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
dbd74401eb
Rename the `base` option in the `pyclass` macro to `extends`
...
"extends" is intuitive for people with java or ES6 experience, and it also aligns pyo3 with
wasm-bindgen (see https://github.com/rustwasm/rfcs/pull/2 )
2018-07-15 12:08:20 +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
6645708e4f
Get rid of #[py*] methods
2018-07-03 20:42:02 +02:00
konstin
f2be73c4f3
Fix tests
2018-06-14 16:20:55 +02:00
konstin
785d338700
Add a few notes on debugging
2018-06-14 16:17:49 +02:00
konstin
9cb5321317
Merge pull request #183 from peng1999/master
...
Fix broken links
2018-06-14 16:05:23 +02:00
Peng Guanwen
ce4c217527
Fix broken links
...
This fixes #182
2018-06-14 08:10:39 +00:00
konstin
76510bdd0e
Refactoring
...
This is actually a failed bugfix attempt, but still useful
2018-06-13 18:02:45 +02:00
konstin
314a4a2b3e
Some more documentation work
2018-05-19 17:27:26 +02:00
konstin
319afe1f76
Small documentation improvements
2018-05-17 23:59:38 +02:00
Martin Larralde
0b75334b70
Update `book.toml` to new `mdbook` format [ci skip]
2018-05-17 11:57:09 +02:00
konstin
858a124374
Merge master
2018-05-05 15:50:04 +02:00
konstin
57048bc5fc
Merge branch 'master' into capybara
2018-05-02 19:32:56 +02:00
konstin
15204bab56
Better way to add functions to modules
2018-05-02 19:26:54 +02:00
Martin Larralde
b80b85539b
Remove occurrences of `py::methods` and `py::class`
2018-05-01 23:17:42 +02:00
Martin Larralde
4dccd556b7
Fix `conversions.md` stubs to work with Py2 as well
2018-05-01 22:59:49 +02:00
Martin Larralde
0963a6052c
Add stubs to `conversions.md` to allow more tests to run
2018-05-01 22:59:49 +02:00
Martin Larralde
f12af1653d
Fix guide documentation to pass doctests
2018-05-01 22:59:49 +02:00
Martin Larralde
aed4af9a1e
Add documentation tests for `guide/exception.md`
2018-05-01 22:59:49 +02:00
Martin Larralde
79491db60a
Add documentation tests for `guide/overview.md`
2018-05-01 22:59:49 +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
Vlad Shcherbina
2aedbffcd0
Fix typos
2018-03-15 14:41:16 +03:00
Roy Wellington Ⅳ
80502bd307
Change type of kwargs in the example to Option<PyDict>
...
That's what the immediately preceding paragraph says the type is, and that
would make more sense.
2018-03-15 14:27:45 +03:00
Roy Wellington Ⅳ
24eee46128
Fix typos and other minor touchups to guide
...
* Fix some typos
* Capitalize Rust, acronyms
* Remove some trailing whitespace
2018-03-15 14:27:45 +03:00
Vlad Shcherbina
f8d914cac8
Fix broken links
...
https://pyo3.github.io/PyO3 -> https://pyo3.github.io/pyo3
in the documentation.
2018-02-14 17:21:17 +03:00
Brian Anderson
473b1f8b30
Use version 0.2 in guide overview
2018-02-13 00:14:51 +03:00
Guanqun Lu
81f31153aa
doc fixes
2017-12-27 23:10:19 +08:00
Nikolay Kim
050397b723
mark method that work with raw pointer unsafe
2017-12-26 13:41:27 -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
70c7b4a2a2
Use pyo3 0.2 in docs
2017-08-15 09:30:55 +08:00
Nikolay Kim
ed8599cfd3
refactor __new__ method implementation
2017-08-08 00:27:33 -07:00
messense
59d9f9e453
Finish wheel build section in distribution guide
2017-08-07 11:43:49 +08:00
messense
1ad8ad102a
Finish parallelism user guide
2017-08-06 13:50:28 +08:00
messense
268d7fd3d2
Generate getters/setters ( #76 )
2017-08-05 10:53:23 +08:00
Nikolay Kim
a61c5e56a0
add convenience method to PyErr and exception types
2017-08-04 11:47:35 -07:00
Nikolay Kim
85baa8bfce
fix doc links
2017-08-03 16:58:13 -07:00
Nikolay Kim
06a0b0514b
add IntoPyDictPointer impl for tuple
2017-08-03 15:42:32 -07:00
Nikolay Kim
c44e23f4b9
add prelude mod
2017-07-31 10:42:55 -07:00
messense
0e2afb7b8b
Add __dict__ support ( #68 )
2017-07-28 22:21:59 +08:00
Nikolay Kim
afcfed492b
only c classes only as base class
2017-07-27 19:47:01 -07:00
messense
ebcd4f5a33
subclass support ( #64 )
2017-07-27 23:05:15 +08:00
Nikolay Kim
181e38b551
add guid entry for base class
2017-07-26 22:40:47 -07:00
Nikolay Kim
d567817035
add base support for inheritance
2017-07-26 22:29:55 -07:00
Nikolay Kim
fc3ab84bfa
better constrain for PyNativeException::new
2017-07-26 14:56:08 -07:00
Nikolay Kim
a4fd878cb7
pyerr cleanups
2017-07-26 14:28:04 -07:00
Nikolay Kim
a20230e73f
Create rust type for exceptions defined in python #45
2017-07-26 12:56:07 -07:00
Nikolay Kim
e45eb6e878
rename ToPyErr to PyErrArguments
2017-07-26 10:47:17 -07:00
Nikolay Kim
b250ad22ca
update guide related to exception
2017-07-26 09:16:26 -07:00
Nikolay Kim
3ab5e4526c
add weakref support #56
2017-07-24 13:03:18 -07:00
Nikolay Kim
ce15dda5b6
Allow to add gc support without implementing PyGCProtocol #57
2017-07-24 12:19:05 -07:00
Nikolay Kim
e31557dd33
some docs
2017-07-23 10:51:30 -07:00
Nikolay Kim
98bdf63a4d
use const_fn for type size and offset calculation
2017-07-21 09:48:48 -07:00
Nikolay Kim
c6067b90c1
more docs
2017-07-18 14:15:44 -07:00
Nikolay Kim
fc1df289bd
drop PyClone trait; doc cleanups
2017-07-18 10:13:50 -07:00
Nikolay Kim
c5f5620f77
rename token() to py()
2017-07-13 19:04:00 -07:00
Nikolay Kim
8eb5dc0667
use associated consts
2017-07-13 16:45:50 -07:00
Nikolay Kim
52ade64bf7
update links
2017-07-13 13:14:47 -07:00
Nikolay Kim
6b093af3d9
update readme
2017-06-29 11:26:25 +06:00
Nikolay Kim
f494f0c3df
update class.md
2017-06-28 00:34:32 +06:00
messense
379f178dfb
Typo fix in class.md
2017-06-27 21:25:41 +08:00
messense
b36e75e307
Some distribution guide doc
2017-06-27 21:09:16 +08:00
Nikolay Kim
800fa231ba
fix class,md
2017-06-27 05:32:02 +06:00
Nikolay Kim
8bc1195f12
Merge branch 'master' of github.com:PyO3/PyO3
2017-06-27 05:06:09 +06:00
Nikolay Kim
51544b8642
add some docs
2017-06-27 05:05:54 +06:00
messense
a00e23a594
Update conversions chapter
2017-06-25 19:31:32 +08:00
messense
d4a5a46338
Write Python Exception chapter for user guide
2017-06-19 13:30:15 +08:00
messense
55ece55b3e
Add ownership and lifetime, error handling doc to overview
2017-06-19 11:40:13 +08: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
messense
32e25c8bf2
Write Python Module chapter for user guide
2017-06-18 13:07:05 +08:00
messense
7466097780
User guide documentaion ( #37 )
...
User guide documentaion
2017-06-18 10:02:02 +08:00