konstin
9dc76610b9
Merge pull request #150 from konstin/test_class
...
Split up test_class into multiple files
2018-05-02 21:06:03 +02:00
konstin
3e8a36b297
Split up test_class into multiple files
2018-05-02 20:56:11 +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
7f49673fae
Merge pull request #149 from althonos/master
...
Fix `exception` tests failing with Python 2
2018-05-02 16:02:39 +02:00
Martin Larralde
cc352dade3
Fix `exception` tests failing with Python 2
2018-05-02 13:54:59 +02:00
Martin Larralde
b64977fa8b
Merge pull request #142 from althonos/doctests
...
Add tests for the guide book using `docmatic`
2018-05-02 10:43:03 +02:00
Martin Larralde
b80b85539b
Remove occurrences of `py::methods` and `py::class`
2018-05-01 23:17:42 +02:00
Martin Larralde
3554248615
Bump `docmatic` test dependency to `0.1.2`
2018-05-01 23:01:29 +02:00
Martin Larralde
80b3ce7801
Use new `docmatic` API
2018-05-01 22:59:49 +02:00
Martin Larralde
57de066a6b
Use `docmatic` with additional arguments
2018-05-01 22:59:49 +02:00
Martin Larralde
87e3f5d600
Make `guide_path` immutable in `test_doc`
2018-05-01 22:59:49 +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
Martin Larralde
2a618698cf
Add `docmatic` to test dependencies
2018-05-01 22:59:49 +02:00
konstin
0880ac166c
Merge master
2018-05-01 20:41:35 +02:00
konstin
2fcac85003
Add version in Cargo.toml
...
Following https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-path-dependencies , we need a version for path dependencies
2018-05-01 20:25:20 +02:00
konstin
cb6c287f1f
Expect the pyo3 crate to be in scope for the codegen
...
This allows using generated code from crates that do not directly depend on pyo3.
E.g.:
```rust
extern crate my_pyo3_wrapper;
use my_pyo3_wrapper::pyo3;
#[py::modinit(rust2py)]
fn init_mod(py: Python, m: &PyModule) -> PyResult<()> {
// ...
Ok(())
}
2018-05-01 20:24:34 +02:00
konstin
29fdc05b60
Move the codegen into its own crate
...
This makes the code generatioin reusable from third party crates.
2018-05-01 20:24:32 +02:00
konstin
5a8f5034d6
Fix make test
...
This is a follow-up to #147
2018-05-01 20:15:43 +02:00
konstin
e3b74498c8
Merge pull request #146 from konstin/modules_and_functions
...
Add test for module
2018-05-01 19:26:47 +02:00
konstin
4735c2c516
Merge pull request #147 from konstin/proc_macro_path_invoc
...
Fix compilation on nightly
2018-05-01 18:59:43 +02:00
konstin
d0c42dfcc1
Fix compilation on nightly
2018-05-01 15:44:38 +02:00
konstin
2ee1102ef2
Add test for module
2018-04-30 23:32:25 +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
7f68835877
Add unit test for module
2018-04-30 22:38:48 +02:00
konstin
1c276105e5
Generate better code
...
This reduces the size of the generated code and elinates at least two of the Err => Err antipatterns
2018-04-12 23:20:35 +02:00
konstin
1c0eac2690
Minor changes
2018-04-09 00:00:20 +02:00
konstin
ccbc73a385
Fix compilation on older nightlies
2018-04-08 00:43:49 +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
konstin
ced4eb532c
Expect the pyo3 crate to be in scope for the codegen
...
This allows using generated code from crates that do not directly depend on pyo3.
E.g.:
```rust
extern crate my_pyo3_wrapper;
use my_pyo3_wrapper::pyo3;
#[py::modinit(rust2py)]
fn init_mod(py: Python, m: &PyModule) -> PyResult<()> {
// ...
Ok(())
}
2018-04-05 13:39:07 +02:00
konstin
e570c6b9b9
Move the codegen into its own crate
...
This makes the code generatioin reusable from third party crates.
2018-04-05 13:39:07 +02:00
Nikolay Kim
14ab12b89f
move doc generation to asfter script section
2018-04-03 10:32:10 -07:00
Nikolay Kim
cab682d855
use rust bin dir instead
2018-04-03 10:15:57 -07:00
Nikolay Kim
6b665e9a82
create cargo dir
2018-04-03 10:15:04 -07:00
Nikolay Kim
a5d0b30227
use precompiled mdbook
2018-03-30 14:51:13 -07:00
Nikolay Kim
0982cba184
use precompiled mdbook
2018-03-30 14:29:36 -07:00
Nikolay Kim
6719e152ba
Merge pull request #137 from PyO3/try_from_fixes
...
use PyTryFrom explicitly (fixes for 1.26.0-nightly)
2018-03-29 07:40:58 -07:00
Alexey Popravka
e66c5ebb83
use PyTryFrom explicitly
2018-03-29 17:36:05 +03: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
5dc5c534df
Enable backtrace on AppVeyor too
...
Alto to hopefully diagnose intermittent failures.
2018-03-15 13:51:12 +03:00
Vlad Shcherbina
5198fccaeb
Enable backtrace
...
To simplify troubleshooting on the build server.
2018-03-14 01:05:47 +03:00
Nikolay Kim
ffee21cb1f
Merge pull request #130 from ethanhs/pep523
...
Add PEP 523 frame eval API methods and definitions
2018-03-01 19:55:20 -08:00
Ethan Smith
5cc6dc74d4
conditionally include Python3.6 items
2018-03-01 14:46:27 -08:00
Ethan Smith
6c25a753b8
Add PEP 523 frame eval API things
2018-03-01 13:36:16 -08:00