Commit graph

2334 commits

Author SHA1 Message Date
Michal 'vorner' Vaner e6dd2d980f
docs: Link to pyo3-log in README and the guide
Show how one can log from Rust through the Python's logging facilities.

Related to #1016.
2020-07-19 22:01:22 +02:00
David Hewitt 41b35b84ca
Merge pull request #1024 from davidhewitt/py-exception
Rework exceptions to be native types
2020-07-18 22:16:33 +01:00
David Hewitt 264e8854c6
Merge pull request #1048 from davidhewitt/fix-from-type-ptr-doc
Fix doc for PyType::from_type_ptr
2020-07-18 12:01:05 +01:00
Yuji Kanagawa 8bbdbc4937
Merge pull request #1047 from davidhewitt/cast-to-ptr-is-safe
Functions which cast reference to pointer are not unsafe.
2020-07-18 19:52:06 +09:00
David Hewitt 2a36863ebc
Merge pull request #1046 from davidhewitt/py-type
Replace internal uses of (*o).ob_type with Py_TYPE(o)
2020-07-18 10:28:42 +01:00
Yuji Kanagawa d9d095cd27
Merge pull request #1049 from davidhewitt/fix-clippy-useless-conversion
Fix clippy warning of useless conversion
2020-07-18 16:50:38 +09:00
David Hewitt 4ed9748b45 Rename exceptions to PyException etc; reintroduce deprecated ones 2020-07-18 06:02:57 +01:00
David Hewitt a7e0c6bfa7 Make exceptions proper native types. 2020-07-18 01:57:39 +01:00
Simonas Kazlauskas 496c626835 Proto #1: Exception instances as Py<BaseException>
This prototype implements use of Py<BaseException> as the instance to
use for exception instances. These instances integrate reasonably well
with the Rust’s standard error mechanisms by implementing the `Display`
and `Error` traits. These error types can also be stored into e.g.
`failure::Fail`s or other error types as a cause of some greater error.
2020-07-18 01:57:39 +01:00
David Hewitt 9f3e13ef4d Fix doc for PyType::from_type_ptr 2020-07-17 19:53:20 +01:00
David Hewitt 3341d10e7f Functions which cast reference to pointer are not unsafe. 2020-07-17 19:52:32 +01:00
David Hewitt 45533d6f96 Replace internal uses of (*o).ob_type with Py_TYPE(o) 2020-07-17 19:51:56 +01:00
David Hewitt c6aa7a8a47 Fix clippy warning of useless conversion 2020-07-17 19:06:56 +01:00
David Hewitt 525f523e55
Merge pull request #1043 from cathay4t/master
Remove executable bit of rust source file
2020-07-16 07:17:37 +01: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
David Hewitt 6c62fedf22
Merge pull request #1037 from davidhewitt/with-gil
Add `Python::with_gil`
2020-07-15 07:53:58 +01:00
David Hewitt c15c1e6217
Merge pull request #1038 from PyO3/davidhewitt-patch-5
Fix typo in comment
2020-07-13 22:52:16 +01:00
David Hewitt 4020e4d0c8 Add Python::with_gil 2020-07-13 22:37:40 +01:00
David Hewitt 65d2eec402
Fix typo in comment 2020-07-13 22:00:31 +01:00
David Hewitt cfa5b2e013
Merge pull request #1029 from davidhewitt/asbytearray-mut
Fix definition of _PyLong_AsByteArray
2020-07-09 23:12:50 +01:00
David Hewitt b1a37afa8c Fix definition of _PyLong_AsByteArray 2020-07-09 16:38:01 +01:00
Yuji Kanagawa 70ad10c62e
Merge pull request #1030 from davidhewitt/changelog-corrections
Correct CHANGELOG entries
2020-07-09 18:58:36 +09:00
David Hewitt 5d07bbb50f Correct CHANGELOG entries 2020-07-09 09:32:58 +01:00
David Hewitt bd97b258ed
Merge pull request #1027 from noam93k/bugfix/convert-bigint-index
Use the result of __index__ when converting to Rust BigInts.
2020-07-09 09:13:51 +01:00
David Hewitt e5959f268e Add CHANGELOG entry 2020-07-09 08:43:56 +01:00
Noam Shalom Kleinburd 8502759bd3 Test conversion of objects implementing __index__ to Rust BigInts. 2020-07-09 08:42:34 +01:00
Noam Shalom Kleinburd 33c328b201 Use the result of __index__ when converting Python objects to Rust BigInts. 2020-07-09 08:42:34 +01:00
Yuji Kanagawa c00080e27f
Merge pull request #1020 from PyO3/to-str
Remove PyString::as_bytes since it cannot return raw bytes
2020-07-08 15:05:58 +09:00
kngwyu 581e6e0924 Remove register_gil 2020-07-08 13:36:00 +09:00
Yuji Kanagawa 1f05165b87
Merge pull request #1026 from vthriller/master
CHANGELOG.md: trivial URL typo fix
2020-07-07 13:00:35 +09:00
vthriller 0f2eeea4ed
CHANGELOG.md: trivial URL typo fix 2020-07-06 21:55:00 +03:00
kngwyu 7849b74dbf Remove PyString::as_bytes since it cannot return raw bytes 2020-07-06 21:38:31 +09:00
Yuji Kanagawa ab4296fa10
Merge pull request #1021 from davidhewitt/pylifecycle
Update FFI definitions for pylifecycle.h
2020-07-05 01:03:33 +09:00
David Hewitt a5c1c9ade9 Update FFI definitions for pylifecycle.h 2020-07-04 15:03:42 +01:00
Yuji Kanagawa cccb942b65
Merge pull request #1015 from davidhewitt/class-introduction
Add introduction to class.md
2020-07-02 12:01:23 +09:00
David Hewitt 85f1d009ec Add introduction to class.md 2020-07-01 07:44:37 +01:00
Yuji Kanagawa 800077821d
Merge pull request #1014 from PyO3/packaging-docs
Update maturin/setuptools-rust section
2020-06-30 22:34:09 +09:00
konstin 9251748280 Update maturin/setuptools-rust section 2020-06-30 14:20:50 +02:00
Yuji Kanagawa 0676a21295
Merge pull request #1013 from kngwyu/fix-unsendable-test
Skip panic_unsendable test if -Cpanic=abort is given
2020-06-30 20:17:08 +09:00
kngwyu 3ae1caa55a Skip panic_unsendable test if -Cpanic=abort is given 2020-06-30 17:58:31 +09:00
Yuji Kanagawa c6abf24cca
Merge pull request #1012 from PyO3/release-0.11
Bump version to 0.11.1
2020-06-30 17:31:24 +09:00
kngwyu 6cbe9ff30d Bump version to 0.11.1 2020-06-30 14:53:55 +09:00
kngwyu 3496b09d05 Update guide.sh 2020-06-30 14:50:32 +09:00
Yuji Kanagawa b2e7acd181
Merge pull request #1009 from kngwyu/pyclass-unsendable
Introduce #[pyclass(unsendable)]
2020-06-30 14:44:53 +09:00
Yuji Kanagawa 512335186a
Merge branch 'master' into pyclass-unsendable 2020-06-30 14:17:40 +09:00
kngwyu d76fe7835a Introduce #[pyclass(unsendable)] 2020-06-30 12:30:17 +09:00
Yuji Kanagawa 51bff2bccc
Merge pull request #1010 from PyO3/dependabot/cargo/parking_lot-0.11.0
Update parking_lot requirement from 0.10.2 to 0.11.0
2020-06-30 12:12:54 +09:00
David Hewitt a250de824d Update CHANGELOG 2020-06-29 22:26:21 +01:00
David Hewitt 0870baab67
Merge pull request #1011 from yawara/fix-broken-link
Fix broken link
2020-06-29 22:23:08 +01:00
Yawara ISHIDA 83ce7e6754 Fix broken link 2020-06-30 05:05:04 +09:00