Commit Graph

5546 Commits

Author SHA1 Message Date
David Hewitt 39edeebf67
Merge pull request #3308 from mejrs/typo
Fix faq.md typo.
2023-07-11 12:45:07 +00:00
mejrs 092b73aa48 Two is not three 2023-07-11 13:56:34 +02:00
Alex Gaynor f39eb9e229
Resolve nightly clippy warning in test_field_cfg 2023-07-11 05:55:57 -04:00
Adam Reichold bedb682d0e Add another performance subsection on implicit access to GIL token. 2023-07-09 15:02:12 +02:00
Adam Reichold ff78b92e77 Start adding a performance section to the guide. 2023-07-09 14:32:59 +02:00
Adam Reichold db960e5fb4
Merge pull request #3303 from PyO3/pyiter-size-hint
RFC: Add implementation of Iterator::size_hint for PyIterator
2023-07-09 11:45:49 +00:00
Adam Reichold bd7aed4b12 Add implementation of Iterator::size_hint for PyIterator
When the Python iterator backing `PyIterator` has a `__length_hint__` special
method, we can use this as a lower bound for Rust's `Iterator::size_hint` to
e.g. support pre-allocation of collections.

This is implemented using `PyObject_LengthHint` which is not available in the
stable ABI and hence so is `Iterator::size_hint`. This should be fine since this
is an optimization in any case and the stable ABI is expected to have slightly
worse performance overall.
2023-07-09 10:16:20 +02:00
messense 26018560f2
Merge pull request #3300 from davidhewitt/enter-recursive-call
fix FFI definition `Py_EnterRecursiveCall`
2023-07-06 01:43:18 +00:00
David Hewitt f7f3ff8820 fix FFI definition `Py_EnterRecursiveCall` 2023-07-05 22:52:41 +01:00
David Hewitt 8fcf44482a
Merge pull request #3297 from davidhewitt/pypy-ssize-t
fix `SystemError` raised from `PyUnicodeDecodeError_Create` on PyPy 3.10
2023-07-05 17:14:47 +00:00
David Hewitt edb62e05e3
Merge pull request #3273 from davidhewitt/conventions
add some style guide to Contributing.md
2023-07-05 17:14:24 +00:00
David Hewitt 82712aed32 fix `SystemError` raised from `PyUnicodeDecodeError_Create` on PyPy 3.10 2023-07-05 11:10:02 +01:00
David Hewitt 81c0328d91 use concrete inner for `PyErr:matches` 2023-07-04 21:03:24 +01:00
David Hewitt 76f3a395ef move `unsafe` block inside `error_on_minusone` calls 2023-07-04 21:03:24 +01:00
David Hewitt 43477a8e30 use error_on_minusone in more cases 2023-07-04 21:03:24 +01:00
David Hewitt 7613f65c89 apply conventions for ffi calls 2023-07-04 21:03:24 +01:00
David Hewitt bf2f441567 prefer inner / _private naming 2023-07-04 21:03:24 +01:00
David Hewitt 233fdd555e add some style guide to Contributing.md 2023-07-04 21:03:24 +01:00
Adam Reichold 54ab9090be
Merge pull request #3269 from grantslatton/timezone-conversion-bugfix
Fix fixed offset timezone conversion bug.
2023-07-04 18:22:13 +00:00
David Hewitt b441e0b4ab
Merge pull request #3295 from davidhewitt/pypy-pystate
add PyState_*Module definitions for PyPy
2023-07-04 08:29:31 +00:00
David Hewitt 6666c335e6 add PyState_*Module definitions for PyPy 2023-07-04 08:57:50 +01:00
Adam Reichold ce0de3ffed
Merge pull request #3293 from davidhewitt/missing-conversions
add some missing type conversions to the guide
2023-07-04 06:51:31 +00:00
messense 849b699946
Merge pull request #3292 from davidhewitt/valgrind-build-full
ci: run valgrind and careful with 'CI-build-full' label
2023-07-04 02:53:11 +00:00
David Hewitt 23d1a6d307 add some missing type conversions to the guide 2023-07-03 21:36:17 +01:00
David Hewitt f5d4083131 ci: run valgrind and careful with 'CI-build-full' label 2023-07-03 21:20:49 +01:00
David Hewitt 53b98db682
Merge pull request #3290 from davidhewitt/0.19.1-changelog
update main for 0.19.1
2023-07-03 15:48:19 +00:00
David Hewitt 7d357ad992 release: 0.19.1 2023-07-03 16:18:24 +01:00
David Hewitt 0e9c041e97
Merge pull request #3289 from davidhewitt/pypy-3.10
support PyPy 3.10
2023-07-03 12:53:16 +00:00
David Hewitt 9f2176c126 support PyPy 3.10 2023-07-03 11:26:45 +01:00
David Hewitt da7c031cf4
Merge pull request #3287 from alex/existing-instance
Allow `#[new]` to return existing instances
2023-07-03 10:20:29 +00:00
Alex Gaynor 0b78bb851e
Allow `#[new]` to return existing instances
fixes #2384
2023-07-02 19:57:53 -04:00
David Hewitt 1a0c9bec61
Merge pull request #3286 from PyO3/set-add-does-not-steal
Apparently, PySet_Add does not steal a reference, hence we should not forget to clean up ours.
2023-07-02 20:06:51 +00:00
Adam Reichold e006b34b5e Apparently, PySet_Add does not steal a reference, hence we should not forget to clean up ours. 2023-07-02 20:43:43 +02:00
David Hewitt 135535e668
Merge pull request #3280 from davidhewitt/option-to-tz
clarify ownership of opt_to_pyobj helper function
2023-06-28 21:23:33 +00:00
David Hewitt b7a3a8bffe
Merge pull request #3282 from CallMeMSL/patch-1
Fix typos and add punctuation recommended by grammarly in Class.md
2023-06-28 18:16:18 +00:00
Adam Reichold afc1d4cc42
Merge pull request #3281 from davidhewitt/set-discard
handle exceptions properly in `PySet::discard`
2023-06-28 17:09:01 +00:00
CallMeMSL 23bdd4337f
Fix typos and add punctuation recommended by grammarly in Class.md 2023-06-28 13:46:13 +02:00
David Hewitt 1d56cfef47
Merge pull request #3278 from davidhewitt/ffi-check-ci
decouple pyo3-ffi-check from MSRV
2023-06-28 08:10:54 +00:00
David Hewitt b7d391d994 clarify ownership of opt_to_pyobj helper function 2023-06-28 08:54:56 +01:00
David Hewitt c0b9502c0e handle exceptions properly in `PySet::discard` 2023-06-28 08:54:06 +01:00
David Hewitt b329439bdc
Merge pull request #3271 from davidhewitt/hasattr
stop suppressing unrelated exceptions in `PyAny::hasattr`
2023-06-28 07:44:30 +00:00
David Hewitt a0aa9ce92e use _run_cargo helper in noxfile 2023-06-28 08:25:28 +01:00
David Hewitt 4867ef8dd3 stop suppressing unrelated exceptions in `PyAny::hasattr` 2023-06-27 23:20:22 +01:00
David Hewitt 48c16a6878 move pyo3-ffi-check into its own workspace 2023-06-27 22:54:10 +01:00
Adam Reichold 071f31408f
Merge pull request #3277 from PyO3/indexmap-range
Extended range of supported versions of `indexmap` optional dependency to include version 2.
2023-06-27 06:06:43 +00:00
David Hewitt 76b794a154
Merge pull request #3272 from lucatrv/patch-2
Add conversions between Rust Path/PathBuf and Python str / pathlib.Path
2023-06-26 21:31:52 +00:00
Adam Reichold b5a1ca058d Extended range of supported versions of `indexmap` optional dependency to include version 2. 2023-06-26 23:23:12 +02:00
Adam Reichold 7425206251
Merge pull request #3274 from PyO3/fix-pr-template
Our PR template still referenced the removed xtask infrastructure.
2023-06-25 20:28:29 +00:00
Adam Reichold 575cb2ab4a
Merge pull request #3270 from davidhewitt/pypy-getitemerror
add `PyDict::get_item_with_error` for PyPy
2023-06-25 19:52:45 +00:00
Adam Reichold c246e95875 Our PR template still referenced the removed xtask infrastructure. 2023-06-25 21:37:27 +02:00