David Hewitt
db91642bae
add PyDict::get_item_with_error
for PyPy
2023-06-25 19:26:08 +01:00
Grant Slatton
b1e7ed8a58
Fix fixed offset timezone conversion bug.
...
See https://github.com/PyO3/pyo3/issues/3267
2023-06-25 11:06:46 -07:00
Adam Reichold
edf47b575f
Merge pull request #3264 from davidhewitt/no-index
...
add http headers to help search engines index the docs
2023-06-22 10:12:36 +00:00
Adam Reichold
0a4806f7eb
Merge pull request #3265 from davidhewitt/badges
...
get all badges through shields.io
2023-06-22 04:37:24 +00:00
David Hewitt
0e304b1b7f
add http headers to help search engines index the docs
2023-06-21 23:10:09 +01:00
David Hewitt
6bafb6bb1d
get all badges through shields.io
2023-06-21 22:43:54 +01:00
David Hewitt
a6e10514b2
Merge pull request #3263 from PyO3/with-pool
...
Add Python::with_pool as a safer alternative to Python::new_pool.
2023-06-21 20:37:24 +00:00
Adam Reichold
4afa994449
Mark Python::with_pool as safe on stable.
2023-06-21 09:12:10 +02:00
Adam Reichold
d7e147509b
Add Python::with_pool as a safer alternative to Python::new_pool.
2023-06-21 08:05:19 +02:00
David Hewitt
b2a1a961dd
Merge pull request #3260 from mejrs/traverse
...
Give a better error message for Python argument in __traverse__
2023-06-20 21:44:50 +00:00
Adam Reichold
71ed4e17c7
Merge pull request #3256 from PyO3/dependabot/cargo/unindent-0.2.1
...
Update unindent requirement from 0.1.4 to 0.2.1
2023-06-20 20:05:17 +00:00
Adam Reichold
fdc8b64506
Merge pull request #3258 from PyO3/dependabot/cargo/hashbrown-gte-0.9-and-lt-0.15
...
Update hashbrown requirement from >= 0.9, < 0.14 to >= 0.9, < 0.15
2023-06-20 18:13:21 +00:00
Adam Reichold
430716ff4d
Add changelog entry for bumping hashbrown dependency.
2023-06-20 19:41:45 +02:00
Adam Reichold
689033cd80
Extend changelog of indoc bump to include related unindent change as well.
2023-06-20 19:41:02 +02:00
mejrs
51a6863440
Give a better error message for Python in traverse
2023-06-19 23:25:51 +02:00
dependabot[bot]
27549304ae
Update hashbrown requirement from >= 0.9, < 0.14 to >= 0.9, < 0.15
...
Updates the requirements on [hashbrown](https://github.com/rust-lang/hashbrown ) to permit the latest version.
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.9.0...v0.14.0 )
---
updated-dependencies:
- dependency-name: hashbrown
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 20:58:37 +00:00
dependabot[bot]
b222542229
Update unindent requirement from 0.1.4 to 0.2.1
...
Updates the requirements on [unindent](https://github.com/dtolnay/indoc ) to permit the latest version.
- [Release notes](https://github.com/dtolnay/indoc/releases )
- [Commits](https://github.com/dtolnay/indoc/compare/0.1.4...0.2.1 )
---
updated-dependencies:
- dependency-name: unindent
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 20:57:35 +00:00
Adam Reichold
ad785e7778
Merge pull request #3254 from mejrs/include
...
Remove doctests macro workaround
2023-06-19 18:45:43 +00:00
Adam Reichold
339ea99d38
Merge pull request #3255 from mejrs/unreachable
...
Replace unreachable! with empty enum match
2023-06-19 18:45:39 +00:00
mejrs
b939849094
Use value
as argument name
2023-06-19 20:17:50 +02:00
mejrs
456efde245
Replace unreachable! with empty enum match
2023-06-19 19:48:04 +02:00
mejrs
686f5eb0ad
Simplify doctests macro
2023-06-19 18:12:01 +02:00
Adam Reichold
e664749d61
Merge pull request #3252 from PyO3/type-object-mode-callable
...
Rework pyobject_native_type_info! to support callables
2023-06-19 08:57:08 +00:00
Adam Reichold
5eed73f1c0
Rework pyobject_native_type_info! to expect callables
...
Most native types have static type objects which just need to be turned into a
pointer using addr_of_mut!, but sometimes like for exceptions we do call a
function which lazily initializes a type object.
This makes the pyobject_native_type_info! macro expect callable and passes it
the GIL token so that we do not need to call Python::assume_gil_acquired. The
case of static type objects is handled by the
pyobject_native_static_type_object! helper macro.
2023-06-19 10:30:03 +02:00
David Hewitt
bdf51ab241
Merge pull request #3248 from ijl/py312-exc
...
Add PyErr_GetRaisedException(), PyErr_SetRaisedException() to FFI
2023-06-18 21:45:14 +00:00
David Hewitt
9d50aad58f
Merge pull request #3250 from PyO3/pool-opts
...
Two minor pool optimizations
2023-06-18 17:15:24 +00:00
Adam Reichold
42bbd52e15
Keep the dynamic borrow checking enabled for debug builds.
2023-06-18 15:38:37 +02:00
Adam Reichold
96ad57d783
We already carefully handle re-entrancy for OWNED_OBJECTS, so let's avoid the runtime checking overhead.
2023-06-18 15:25:46 +02:00
Adam Reichold
85d5b6ee77
Drop reference pool's dirty flag is the additional cost does not outweigh the improvement compared to locking an uncontented mutex.
2023-06-18 15:25:46 +02:00
David Hewitt
ed208731ed
Merge pull request #3251 from PyO3/addr_of
...
Fix two left-over usages of cfg(addr_of).
2023-06-17 21:17:13 +00:00
Adam Reichold
cbead1f437
Fix two left-over usages of cfg(addr_of).
2023-06-17 19:35:50 +02:00
Adam Reichold
7e61f18751
Merge pull request #3249 from lucatrv/patch-1
...
Improve `PyModule::from_code` examples
2023-06-17 10:48:50 +00:00
Luca Trevisani
ab7a65cbb5
Improve PyModule::from_code
examples
2023-06-16 23:45:49 +02:00
ijl
9e9a6e9ebd
Add PyErr_GetRaisedException(), PyErr_SetRaisedException() to FFI
...
These are new and part of the stable API as of v3.12.0a6.
PyErr_Fetch(), PyErr_Restore(), and PyErr_NormalizeException()
were simultaneously deprecated in favor of these.
python/cpython@feec49c407
2023-06-16 14:49:22 +00:00
Adam Reichold
5b85c924dd
Merge pull request #3243 from PyO3/classes-and-free-functions
...
Extend guide section on classes regarding free functions
2023-06-16 11:10:01 +00:00
Adam Reichold
684002daf5
Format recently modified code example from the guide.
2023-06-16 12:46:26 +02:00
David Hewitt
e55e1721a5
Merge pull request #3222 from krpatter-intc/getitem_example
...
simple getitem example
2023-06-16 06:58:49 +00:00
Adam Reichold
2996f92ade
Extend guide section on classes regarding free functions
...
It might not be obvious from the reading the sections on free functions and on
classes that they combine in a frictionless manner, i.e. class instances can be
parameters to free functions in the same manner that the self parameters of
instance methods are handled.
This also explicitly calls out the interaction between `Clone` and
`FromPyObject` for classes.
2023-06-16 08:44:34 +02:00
Adam Reichold
64e9f2073b
Merge pull request #3245 from davidhewitt/example-editions
...
examples: bump edition to 2021
2023-06-16 05:34:44 +00:00
Patterson, Kevin R
4fab62545a
simple getitem example
2023-06-15 16:39:25 -05:00
David Hewitt
c384dcfc78
examples: bump edition to 2021
2023-06-15 22:25:48 +01:00
David Hewitt
527f3c286b
Merge pull request #3239 from alex/syn-2
...
Upgrade to syn 2
2023-06-14 16:49:25 +00:00
Alex Gaynor
afbb1d435c
Upgrade to syn 2
2023-06-14 07:03:33 -04:00
Adam Reichold
a0c85bb649
Merge pull request #3240 from davidhewitt/maturin-versions
...
bump maturin version in example files
2023-06-14 08:24:31 +00:00
David Hewitt
5fd5dcba44
bump maturin version in example files
2023-06-14 08:45:32 +01:00
Adam Reichold
4bfa5be616
Merge pull request #3238 from davidhewitt/version-bumps
...
add changelog for #3237
2023-06-14 06:08:22 +00:00
Adam Reichold
ba0c7e15b3
Merge pull request #3156 from adriangb/frozenset-ops
...
Add `PyFrozenSetBuilder`
2023-06-14 06:06:32 +00:00
David Hewitt
0b4187a672
Merge pull request #3232 from davidhewitt/remove-0-18-deprecations
...
remove all functionality deprecated in PyO3 0.18
2023-06-13 21:49:45 +00:00
David Hewitt
80c66ecc95
add changelog for #3237
2023-06-13 22:41:24 +01:00
David Hewitt
4f3fcdbf0f
remove all functionality deprecated in PyO3 0.18
2023-06-13 22:27:43 +01:00