Commit graph

2073 commits

Author SHA1 Message Date
kngwyu 8c6cbb605a Better docs for new unchecked_downcast and borrowed objects 2020-05-02 14:58:12 +09:00
kngwyu 823b8e7f8a New Native Types and lighter GILPool 2020-05-02 14:54:13 +09:00
Yuji Kanagawa e40f022014
Merge pull request #888 from PyO3/remove-no-landing-pads
Remove -Zno-landing-pads
2020-05-02 14:51:42 +09:00
kngwyu e6f8fa76af Remove no-landing-pads 2020-05-02 13:57:49 +09:00
Austin Bingham 746c352ca8
Clarified documentation for implementing iteration. (#882)
* Clarified documentation for implementing iteration.

* Updated example so that it compiles.

* Updated PyIterProtocol docs per discussion.

* Added link to Python docs on iterators.

* Improved language regarding iterables and PyIterProtocol.

* Fixed assertion calls.
2020-04-28 17:46:20 +09:00
Yuji Kanagawa e9e0da57a8
Merge pull request #880 from davidhewitt/py_get_set
Allow use of `#[pyo3(get, set)]` with `Py<T>`
2020-04-23 16:05:05 +09:00
David Hewitt 3008528fa6 Allow use of #[pyo3(get, set)] with Py<T> 2020-04-22 22:21:27 +01:00
Mara Bos dcab478d66
Fix lifetime safety bug of AsPyRef::as_ref(). (#876)
* Fix lifetime safety bug of AsPyRef::as_ref().

Fixes #875.

* Add test for AsPyRef's lifetimes.
2020-04-20 18:44:31 +01:00
Yuji Kanagawa a58a1cf4c6
Merge pull request #856 from althonos/patch-iter
Allow passing non-mutable references to self in PyIterProtocol
2020-04-19 23:08:31 +09:00
Martin Larralde 6ac1b0503c Fix pattern matching style in pyo3-derive-backend code 2020-04-19 13:05:46 +02:00
Martin Larralde 378a6a484c Move TryFromPyCell trait to derive_utils module 2020-04-19 12:57:31 +02:00
Martin Larralde b3c937c73a Reformat code with rustfmt 2020-04-18 03:59:42 +02:00
Martin Larralde f36f19cea4 Update guide to show using PyRef within __iter__ method 2020-04-18 03:57:17 +02:00
Martin Larralde ed63902eeb Modify existing PyIteratorProtocol tests to use PyRef where possible 2020-04-18 03:57:17 +02:00
Martin Larralde 187d889565 Make PyIterProtocol methods accept both PyRef and PyRefMut 2020-04-18 03:57:17 +02:00
Martin Larralde 42e84ea6ff Add compatibility trait TryFromPyCell to pyo3::pycell 2020-04-18 03:38:27 +02:00
Yuji Kanagawa c8971552cf
Merge pull request #871 from PyO3/remove-konstin-from-coc
Remove myself from the CoC
2020-04-13 23:42:44 +09:00
konstin 3253cc86a6
Remove myself from the CoC
I'm not active on this project anymore, so I shouldn't be the CoC contact.

@kngwyu @davidhewitt Feel free to add yourself instead.
2020-04-13 13:38:41 +02:00
Yuji Kanagawa d5b696f7ac
Merge pull request #869 from kngwyu/unsafe-gilpool
Bound 'py lifetime by GILPool in the internal usecases
2020-04-13 12:19:27 +09:00
Yuji Kanagawa ae81865232 Apply suggestions from David
Co-Authored-By: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2020-04-13 11:05:48 +09:00
kngwyu 2cd466dc46 Bound 'py lifetime by GILPool when it's possible 2020-04-12 23:55:23 +09:00
David Hewitt 97fd658593
Add IntoPy<PyObject> for HashSet and BTreeSet (#865) 2020-04-12 14:44:01 +09:00
Yuji Kanagawa 5e285fda78
Fix synchronization of datetime tests (#867)
* Fix synchronization of datetime tests

* Use Mutex instead of RawMutex
2020-04-11 19:10:16 +09:00
Yuji Kanagawa c2b173a14f
Merge pull request #868 from kngwyu/parking-lot-nonightly
Remove nightly flag from parking_lot
2020-04-11 15:08:57 +09:00
kngwyu 4af61e83c3 Remove nightly flag from parking_lot 2020-04-11 14:35:40 +09:00
Yuji Kanagawa 7b1e8a6daf
Merge pull request #851 from davidhewitt/pointer-optimization
Improve performance on pointer drop
2020-04-10 12:30:35 +09:00
Yuji Kanagawa 2da04e5b9b
Merge pull request #862 from kngwyu/use-lock-in-datetime-tests
Lock other threads before importing datetime
2020-04-10 12:00:05 +09:00
kngwyu 9dc3f9dc1a Lock other threads before import datetime to avoid test failure 2020-04-09 22:11:03 +09:00
Yuji Kanagawa af553685f8
Merge pull request #861 from kngwyu/merge-0.9.2
Bump version to 0.9.2 (second try)
2020-04-09 21:57:24 +09:00
Yuji Kanagawa 5add8d1dee
Merge branch 'master' into merge-0.9.2 2020-04-09 17:17:52 +09:00
kngwyu a73ff502ba More changelog 2020-04-09 17:13:05 +09:00
David Hewitt fe57f64435 Improve performance on pointer drop
Co-Authored-By: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
2020-04-09 08:51:43 +01:00
Yuji Kanagawa 53b63cddc2
Merge pull request #855 from althonos/patch-gc
Fix potential panics caused by Garbage Collector
2020-04-09 16:39:58 +09:00
Yuji Kanagawa 724a3fcc71
Merge pull request #858 from davidhewitt/refactor-callbacks
Refactor CallbackConverter code
2020-04-09 13:07:12 +09:00
Yuji Kanagawa 956d499f5d Merge pull request #848 from ijl/reduce-build-deps
Reduce build dependencies from regex
2020-04-09 13:01:53 +09:00
kngwyu c83d88ba8d Bump version to 0.9.2 2020-04-09 13:00:13 +09:00
Martin Larralde 1e8e6fd827 Fix clippy warning about unused arguments in tests/test_gc.rs 2020-04-09 02:06:19 +02:00
Martin Larralde 5f2ec47bea Add proper test for GC double borrow issue in tp_traverse wrapper 2020-04-09 00:52:49 +02: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
Martin Larralde 049202c011 Add changelog entry [ci skip] 2020-04-08 16:35:22 +02:00
Martin Larralde b73bb06ff4 Fix panics caused by GC borrowing when class is already mutably borrowed 2020-04-08 16:25:32 +02:00
Yuji Kanagawa a9357ef8a1
Merge pull request #852 from davidhewitt/20200407-fix-clippy-warnings
Fix clippy complaint of empty return type
2020-04-08 21:00:12 +09:00
Yuji Kanagawa 1b6d8be6b0
Merge pull request #850 from PyO3/davidhewitt-tidy-changelog
Tidy up CHANGELOG newlines
2020-04-08 20:59:41 +09:00
David Hewitt 8f41d56b9e Fix clippy complaint of empty return type 2020-04-08 08:04:29 +01:00
David Hewitt b5b8264eb4 Tidy up changelog newlines 2020-04-08 08:02:54 +01:00
Yuji Kanagawa cffe7edf41
Merge pull request #849 from ijl/dict-presized
_PyDict_NewPresized()
2020-04-07 11:59:25 +09:00
Yuji Kanagawa 5a68f749f0
Merge pull request #848 from ijl/reduce-build-deps
Reduce build dependencies from regex
2020-04-07 11:59:03 +09:00
ijl 97f4987958 _PyDict_NewPresized() 2020-04-06 14:55:12 +00:00
ijl 702411aefe Reduce build dependencies from regex
This avoids users compiling four crates for the "perf" and
"unicode" features. regex is only used in build.rs to parse
some #define lines so it doesn't need to compile support for
thread-local caches etc or parsing by unicode code point.
2020-04-06 14:33:06 +00:00
Yuji Kanagawa 184bafc313
Merge pull request #847 from kngwyu/readme-tweak
Separate examples and tooling section in README and the guide
2020-04-03 11:33:17 +09:00