David Hewitt
977735db20
pymethods: make inventory optional
2021-03-04 19:52:58 +00:00
David Hewitt
7b99e391fa
pyclass-impl: merge implementation traits
2021-02-18 08:19:07 +00:00
kangalioo
fe9b4625d1
Implement conversions for Path/PathBuf
2021-02-13 20:22:16 +00:00
David Hewitt
190eb72803
release: 0.13.2
2021-02-12 21:34:29 +00:00
Georg Brandl
fa8d7518ca
Restore compatibility with Rust 1.41.
...
This version is currently supported by Debian stable and Alpine Linux.
Fixes #1420
2021-02-11 10:14:25 +01:00
David Hewitt
0a7aee14fe
guide: organise more chapters into sublevels
2021-01-26 22:09:02 +00:00
David Hewitt
dc7bcdaf9b
gil: move finalization from prepare_freethreaded_python to
...
with_embedded_python_interpreter
2021-01-12 07:44:37 +00:00
David Hewitt
7c61c9b7f9
gil: tidy ups to finalization
2021-01-12 07:42:47 +00:00
Daniil Konovalenko
abb5829e9c
implement Serialize, Deserialize for Py<T>
2021-01-11 22:19:10 +00:00
David Hewitt
d2e87d95f3
release: 0.13.1
2021-01-10 12:20:10 +00:00
Dexter Chua
005b0aa798
Prefer to use std::os::raw type definitions
...
Certain types e.g. c_char are provided by both std::os::raw and libc.
Previously, both are used interchangably. This commit changes all
instances to use std::os::raw, which is slightly more portable, since
libc is not implemented for all targets (e.g. wasm32-unknown-unknown).
2021-01-07 15:34:47 +08:00
Auke Willem Oosterhoff
c1c4a5ffa5
readme/faq: document `rlib` crate type better
2021-01-06 06:54:44 +00:00
David Hewitt
59707f0b81
auto-initialize: new feature to control initializing Python
2021-01-02 16:08:10 +00:00
David Hewitt
51d1996218
ci: deny warnings using RUSTFLAGS
2020-12-26 08:27:08 +00:00
David Hewitt
26ca1f5bca
Release 0.13
2020-12-22 15:42:04 +00:00
David Hewitt
33b3da3337
Merge pull request #1328 from davidhewitt/pyproto-no-inventory
...
pyproto: remove inventory from implementation
2020-12-22 15:29:20 +00:00
Alex Gaynor
5bca8371da
Document that macOS linker flags apply on aarch64 as well
2020-12-20 10:30:48 -05:00
David Hewitt
4e650d939d
pyproto: remove inventory from implementation
2020-12-20 10:01:30 +00:00
David Hewitt
a689ab42c6
macros: rename crates for consistency
2020-12-20 06:39:28 +00:00
David Hewitt
2616d3de76
python: add version() to get running version
2020-12-19 19:13:59 +00:00
Yuji Kanagawa
e64dc12de1
Merge pull request #1315 from PyO3/abi3-128bit-integer
...
Faster conversion from u128/i128 to PyLong with abi3
2020-12-19 15:56:08 +09:00
David Hewitt
e245f5239a
ci: deny all warnings
2020-12-18 23:11:10 +00:00
kngwyu
c274b6008b
Fix py_run macro so that we can use it internally
2020-12-18 13:26:21 +09:00
David Hewitt
afa5ed3ba2
Release notes for backported 0.12.4
2020-11-28 20:21:52 +00:00
David Hewitt
9617edfca9
msrv: bump to 1.45
2020-11-12 11:33:08 +00:00
David Hewitt
96984b2860
coverage: simplify mechanism for panic=unwind tests
2020-11-12 09:37:41 +00:00
Alex Gaynor
ba6f0ecdfa
Merge branch 'master' into abi3-merge-master
2020-10-18 10:47:06 -04:00
Alex Gaynor
9e34835b76
Merge branch 'master' into abi3-merge-master
2020-10-12 18:03:14 -04:00
David Hewitt
38af32e33e
Release 0.12.3
2020-10-12 16:18:25 +01:00
David Hewitt
1cecad884a
Release 0.12.2
2020-10-12 12:56:46 +01:00
Alex Gaynor
140790b15f
Merge branch 'master' into abi3-merge-master
2020-10-10 10:11:49 -04:00
Alex Gaynor
c22dd6c54c
Remove symbols not available in abi3
2020-09-23 22:30:07 -04:00
Sebastian Pütz
0a346dfa7c
Add documentation for raw_pycfuntion
2020-09-17 09:47:53 +02:00
David Hewitt
c05815520c
Release 0.12.1
2020-09-16 21:45:36 +01:00
David Hewitt
32be8d9a3c
Release 0.12
2020-09-12 14:13:45 +01: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
b9e95dc7c9
Implement std::error::Error for PyErr
2020-09-10 19:04:24 +01: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
Sebastian Pütz
be877d133f
Add constructor for PyCFunction.
2020-09-08 14:26:08 +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
3e32b75284
Do not include PyBuffer APIs when building for abi3
...
Refs #1125
Reduces the number of compilation failures with `--features abi3` from 87 to 56.
2020-08-30 15:29:14 -04:00
David Hewitt
77ed6d6d69
Remove AsPyRef for just Py::as_ref
2020-08-09 22:47:54 +01:00
David Hewitt
f29e6bae7a
Replace PyObject with type alias for Py<T>
2020-08-09 12:28:21 +01:00
David Hewitt
7901890974
Remove `FromPy`
2020-08-09 12:28:21 +01:00
Manuel Vázquez Acosta
f2ba3e6da7
#1064 : Comparisons with __eq__ should not raise TypeError ( #1072 )
...
* Add (failing) tests for issue #1064
* Return NotImplemented when richcmp doesn't match the expected type.
* Fix tests that expect TypeError when richcmp returns NotImplemented.
- The python code 'class Other: pass; c2 {} Other()' was raising a NameError:
c2 not found
- eq and ne never raise a TypeError, so I split the those cases.
* Return NotImplemented for number-like binary operations.
* Add dummy impl PyNumberProtocol for the test struct.
* Rework tests of NotImplemented.
* Make py_ternary_num_func return NotImplemented when type mismatches.
* Return NotImplement for type mismatches in binary inplace operators.
* Reduce boilerplate with `extract_or_return_not_implemented!`
* Extract common definition 'Other' into a function.
* Test explicitly for NotImplemented in the __ipow__ test.
* Add entry in CHANGELOG for PR #1072 .
* Add the section 'Emulating numeric types' to the guide.
* Ensure we're returning NotImplemented in tests.
* Simplify the tests: only test we return NotImplemented.
Our previous test were rather indirect: were relying that Python
behaves correctly when we return NotImplemented.
Now we only test that calling a pyclass dunder method returns NotImplemented
when the argument doesn't match the type signature. This is the expected
behavior.
* Remove reverse operators in tests of NotImplemented
The won't be used because of #844 .
* Apply suggestions from code review
Co-authored-by: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
* Add a note about #844 below the list of reflected operations.
Co-authored-by: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
2020-08-05 22:53:16 +09:00
Gris Ge
b65ae9140e
Remove executable bit of rust source file
...
When compiling as rpm in Fedora, the brp-mangle-shebangs[1] will
complain about src/lib.rs is executable without valid shebang.
Remove the executable bit could fix this.
[1]: https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/brp-mangle-shebangs
Signed-off-by: Gris Ge <cnfourt@gmail.com>
2020-07-16 13:26:25 +08:00
kngwyu
6cbe9ff30d
Bump version to 0.11.1
2020-06-30 14:53:55 +09:00
kngwyu
fd94a0d55c
Bump version to 0.11.0
2020-06-27 23:59:44 +09:00
kngwyu
2caf5b1c10
Expose some APIs for rust-numpy
2020-06-23 01:11:43 +09:00
Yuji Kanagawa
7075827a03
Merge pull request #969 from PyO3/poc-stable-rust
...
Stable Rust
2020-06-21 16:54:59 +09:00
David Hewitt
a1dbfa8c8c
Add pyo3::once_cell::GILOnceCell
2020-06-18 18:53:32 +01:00
kngwyu
654ab4c819
Enable tests for --features nighly on travis
2020-06-18 18:16:01 +09:00
konstin
3180e5cc06
POC stable rust (2 tests failing)
2020-06-18 17:21:09 +09:00
Yuji Kanagawa
a044f3c322
Merge branch 'master' into slot-provider
2020-06-18 15:49:56 +09:00
Nateckert
4f8c2e767b
Doc trait exposition ( #964 )
...
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2020-06-15 09:58:37 +01:00
kngwyu
7967874177
Remove specialization from basic/buffer/descr/iter protocols
2020-06-13 15:24:56 +09:00
Alexander Niederbühl
75d44ca296
Remove getting started chapter from user guide
...
Since it's exactly the same content as in the README.
2020-06-07 00:26:17 +02:00
Yuji Kanagawa
8e6398029d
Merge pull request #930 from davidhewitt/remove-managed-py-ref
...
Remove ManagedPyRef
2020-05-16 13:31:46 +09:00
David Hewitt
91d0dbceab
Remove ManagedPyRef
2020-05-15 21:38:40 +01:00
kngwyu
837261c860
Bump version to 0.10.1
2020-05-14 20:57:51 +09:00
Yuji Kanagawa
7e4d1c41e3
Bump version to 0.10.0 ( #919 )
...
* Bump version to 0.10.0
* Apply suggestions from code review
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
* Improve CHANGELOG completeness and messaging
* ObjectProtocol was in prelude
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2020-05-13 13:24:36 +09:00
Mara Bos
dab8c2e4e7
Move macros into separate feature.
...
It's enabled by default to avoid breakage, but this allows compiling
pyo3 with a lot less dependencies in case the macros are not needed.
2020-05-09 11:27:30 +02:00
David Hewitt
a5ebef4b2e
Remove ObjectProtocol; Add methods to PyAny and use Deref
2020-05-08 10:05:19 +01:00
David Hewitt
9380bfde6f
Add catch_unwind! macro to prevent panics crossing ffi boundaries
2020-05-05 08:17:06 +01:00
David Hewitt
9a2d908342
Simplify callback code using callback_body! macro
2020-05-05 00:27:50 +01:00
kngwyu
2cd466dc46
Bound 'py lifetime by GILPool when it's possible
2020-04-12 23:55:23 +09:00
Yuji Kanagawa
5add8d1dee
Merge branch 'master' into merge-0.9.2
2020-04-09 17:17:52 +09:00
kngwyu
c83d88ba8d
Bump version to 0.9.2
2020-04-09 13:00:13 +09:00
David Hewitt
d8effb24e8
Refactor CallbackConverter code
...
Now shorter and allows use of the ? operator inside callback code
2020-04-08 21:55:11 +01:00
kngwyu
4759358acb
Bump version to 0.9.1
2020-03-23 18:55:24 +09:00
kngwyu
89e5a654ad
Bump version to 0.9.0
2020-03-19 13:48:00 +09:00
kngwyu
02ee7a5afc
Expose PyAny to lib.rs and prelude
2020-03-18 13:38:18 +09:00
Georg Brandl
77b1ae3137
lib: overhaul docstrings
2020-03-17 15:16:30 +01:00
Georg Brandl
a7a2ccb5ff
Apply suggestions from code review
2020-03-17 10:54:51 +01:00
Georg Brandl
4da5dbcd01
Apply suggestions from code review
...
Co-Authored-By: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
2020-03-17 10:54:05 +01:00
Georg Brandl
e649e58674
docstrings: fixes, also point to the new guide chapter
2020-03-17 10:04:29 +01:00
kngwyu
ded83027fa
Write migration guide for 0.9
2020-03-09 14:11:14 +09:00
kngwyu
2fd2185052
Merge branch 'master' into pycell
2020-02-17 00:07:15 +09:00
kngwyu
8f8b42591a
Fix PySelf and AsPyRef
2020-02-16 23:54:55 +09:00
kngwyu
da4ed398bb
Fix PyCell to share BorrowFlag with parents
2020-02-15 18:13:39 +09:00
kngwyu
c43fb9fcdf
Prototype Implementation of RefCell-like PyCell
2020-02-10 16:13:15 +09:00
kngwyu
5d4e7374e9
Introduce PyDownCastImpl and Change PyTryFrom and FromPyPointer
2020-02-09 16:35:52 +09:00
David Hewitt
20c6c2d463
Fix clippy warnings
2020-02-08 19:25:52 +00:00
kngwyu
a2408cacbb
Rename PyClassShell with PyCell
2020-02-08 15:05:13 +09:00
David Hewitt
fdf407e045
FromPyObject for #[pyclass] with T: Clone
2020-01-24 08:57:28 +00:00
kngwyu
56f68a55cd
Bump version to 0.9.0-alpha.1
2020-01-16 20:05:44 +09:00
kngwyu
c57177a169
Refine tests and documents around pyclass.rs
2020-01-08 22:44:50 +09:00
kngwyu
451de182cb
Merge branch 'master' into pyclass-new-layout
2020-01-08 17:16:33 +09:00
kngwyu
f26e07cfd6
Replace IntoInitializer<T> with Into<PyClassInitializer<T>>
2020-01-07 13:08:41 +09:00
kngwyu
d22b03edde
Bump version to 0.8.5
2020-01-05 16:39:18 +09:00
kngwyu
18e565fab5
New PyClassInitializer
2020-01-05 16:01:05 +09:00
kngwyu
8f8785d7c2
Merge branch 'master' into pyclass-new-layout
2019-12-29 23:51:51 +09:00
Alexander Niederbühl
3fae391a3c
Ignore missing `# Safety` section in ffi module
2019-12-28 03:54:41 +01:00
kngwyu
58590393c5
Fix accidently changed file permission
2019-12-24 12:27:22 +09:00
kngwyu
6b84401126
Make it enable to safely inherit native types
2019-12-21 23:28:55 +09:00
kngwyu
8175d6f36a
Merge branch 'master' into pyclass-new-layout
2019-12-19 16:12:45 +09:00
kngwyu
b86de9376d
Introduce PyClassInitializer
2019-12-15 21:04:36 +09:00
kngwyu
d8a4ecb476
Bump version to 0.8.4
2019-12-14 15:20:55 +09:00
kngwyu
bdb66afe0a
Make PyClassShell have dict&weakref
2019-12-08 17:18:25 +09:00
kngwyu
4b5fa7e977
Introduce PyClass trait and PyClassShell
2019-12-07 17:56:49 +09:00
kngwyu
935adaa5d5
Bump version to 0.8.3
2019-11-23 17:09:10 +09:00
kngwyu
7977fe68e2
Use Unsendable alias instead of Phantomdata<Rc<()>>
2019-10-27 23:12:59 +09:00
kngwyu
14d2196ba0
Bump version to 0.8.2
2019-10-26 22:47:19 +09:00
kngwyu
d019fe814c
Bump version to 0.8.1
2019-10-08 01:52:06 +09:00
kngwyu
a344999526
[DOC] Add Python from Rust section in the guide
2019-09-23 21:44:42 +09:00
Yuji Kanagawa
aaa28a3bd0
Merge pull request #594 from PyO3/pyo3-pack-to-maturin
...
Replace pyo3-pack with maturin
2019-09-07 11:49:09 +09:00
Alexander Niederbühl
68c3208d35
Move files from ffi3 into ffi
...
Since Python 2 is no longer supported, one folder should be enough.
2019-09-07 00:50:47 +02:00
konstin
a3cde076f4
Replace pyo3-pack with maturin
2019-09-06 01:12:37 +02:00
konstin
a3e41cc819
Release 0.8.0
2019-09-05 13:18:50 +02:00
konstin
30e82a3018
Replace IntoPyObject with IntoPy<PyObject>
2019-08-24 19:23:28 +02:00
kngwyu
41f31e85fd
Replace mashup with paste
2019-08-04 23:50:10 +09:00
kngwyu
503ec1a061
Use unindent crate instead of _indoc_runtime
2019-06-15 01:10:18 +09:00
kngwyu
f642dbccb2
Refactor py_run!
2019-06-14 18:58:00 +09:00
kngwyu
0f9a3b1194
Expose py_run macro
2019-06-13 18:18:06 +09:00
konstin
0279b3d69f
Release 0.7.0
2019-05-26 17:27:14 +09:00
konstin
c6a5c054e1
Merge pull request #469 from PyO3/remove_doc_comment
...
Remove doc-comment
2019-04-28 18:26:51 +02:00
konstin
cd15719765
Remove doc-comment
2019-04-28 10:36:32 +02:00
Maarten de Vries
35168883b2
Add safe marshal module wrapping unsafe ffi::PyMarhshal_*.
2019-04-26 10:10:50 +02:00
Alexander Niederbühl
1d92c24db8
Add pypy.md to doctests
...
At the moment there are no code snippets, but all files in the guide
should be included.
2019-04-24 22:44:47 +02:00
Yuji Kanagawa
60cd0d09c4
Merge pull request #419 from kngwyu/pyclass-regression
...
Allow slf: PyRef<Self>/PyRefMut<Self> in pymethods
2019-04-24 14:10:28 +09:00
Alexander Niederbühl
faa3feda3f
Merge branch 'master' into doctest
2019-04-23 21:58:09 +02:00
konstin
7149a1fecb
Bump to 0.7.0-alpha.1 ( #457 )
2019-04-23 18:55:35 +02:00
kngwyu
b2e01066f0
Introduce FromPyPointer for slf: PyRef/PyRefMut
2019-04-23 23:16:09 +09:00
Alexander Niederbühl
5858823e83
Test readme and user guide with doc-comment
...
Also rename some files for consistency.
2019-04-19 22:38:11 +02:00
konstin
6d80ee0679
Properly scope libc to fix #442
...
Apparently we can't add a test for that because the test crates have libc
in scope
2019-04-17 19:08:55 +02:00
ijl
2bb0d05a30
Drop support for python2
2019-03-29 12:37:26 +00:00
Miles Granger
711155d7ad
Update tests & docs with IntoPyDict::into_py_dict(py)
2019-03-20 20:04:00 +01:00
konstin
09883574e5
Remove cstr macro
2019-03-18 11:01:55 +01:00
kngwyu
86d239e445
Rename ToPyPointer with AsPyPointer
2019-02-24 16:20:04 +09:00
konstin
ad590bd158
Some api improvements
2019-02-23 18:01:22 +01:00
konstin
0cd72ac213
Bump to 0.6.0-alpha.4
2019-02-20 11:30:09 +01:00
konstin
d02f7c3aa5
Big proc macro refactoring
...
* Removed a lot of clutter, unified some code
* Started using syn::parse::Parse for pyfunction attributes
* No more newlines between imports
* Renamed `#[prop(get, set)]` to `#[pyo3(get, set)]`
* `#[pyfunction]` now supports the same arguments as `#[pyfn()]`
* Some macros now emit proper spanned errors instead of panics.
2019-02-18 20:07:56 +01:00
konstin
c13f0708a4
Replace IntoPyTuple with IntoPy<Py<PyTuple>>
2019-02-12 22:58:23 +01:00
kngwyu
22687c3712
Modify PyIterProtocol to take PyRefMut
2019-02-05 17:27:34 +09:00
konstin
56f2257e90
rust 2018 fixes
2019-02-01 16:23:34 +01:00
konstin
829f35af5b
Migrate to rust 2018
2019-02-01 16:23:34 +01:00
konstin
0495ee52d3
ffi2 to rust 2018
2019-02-01 15:25:58 +01:00
konstin
936f0153e8
Migrate to rust 2018
2019-02-01 14:23:29 +01: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
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
aed0466915
s/PyObjectWithToken/PyObjectWithGIL/g
2018-11-12 15:10:53 +01:00
konstin
57afb51604
Remove PyToken completely; Fixes #94
2018-11-12 14:42:21 +01:00
konstin
569db5fb02
Add test with generator to PyIterator
2018-11-02 22:59:30 +01:00
konstin
8b27f1e412
Get ready for rust 2018
2018-10-31 11:43:21 +01:00
konstin
38651a1827
Add tox config for pyo3 itself
2018-10-09 18:49:54 +02:00
konstin
302c099a76
Big refactoring to shrink the prelude
2018-09-21 23:34:28 +02:00
kngwyu
7ea875fc49
Implement Add/Sub/Mul/Div for &PyComplex
2018-09-21 12:48:42 +09:00
konstin
2904291b9e
Better code generation
2018-09-17 19:48:22 +02:00
konstin
10ef6cd111
Fix cfg on PyEval_InitThread to fix #219
2018-09-11 22:38:31 +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
Paul Ganssle
a271ba9ed9
Use unified implementation for ffi::datetime
...
In the future we can make ffi::object, ffi::pycapsule, etc as
crate-public, but importing the specific symbols is a light touch way to
do this.
2018-08-21 18:33:32 -04:00
Paul Ganssle
ee658de1fb
Run rustfmt after datetime changes
...
Most of the datetime related changes were made before pyo3 switched to
using rustfmt, so I ran rustfmt only on the final commit to make it
easier to rewrite history as necessary (for fixups and whatnot).
2018-08-21 14:29:36 -04:00
Paul Ganssle
496b879525
Add objects/datetime.rs
2018-08-21 14:29:33 -04: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
fe8a719ee1
Rustfmt all the things ✔️
2018-07-30 23:05:10 +02:00
konstin
ff70f45071
(Hopefully) get travis to build the guide for tags
2018-07-18 23:28:14 +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
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