Commit Graph

5468 Commits

Author SHA1 Message Date
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
Adrian Garcia Badaracco a28641af68
Add `PyFrozenSetBuilder` 2023-06-13 15:59:35 -05:00
Adam Reichold ede32cb886
Merge pull request #3237 from PyO3/dependabot/cargo/indoc-2.0.1
Update indoc requirement from 1.0.3 to 2.0.1
2023-06-13 17:50:02 +00:00
Adam Reichold 842ab99504
Merge pull request #3234 from PyO3/dependabot/cargo/bindgen-0.65.1
Update bindgen requirement from 0.63.0 to 0.65.1
2023-06-13 17:49:57 +00:00
dependabot[bot] da0f40332a
Update indoc requirement from 1.0.3 to 2.0.1
Updates the requirements on [indoc](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/1.0.3...2.0.1)

---
updated-dependencies:
- dependency-name: indoc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 07:40:16 +00:00
dependabot[bot] 6818e737ef
Update bindgen requirement from 0.63.0 to 0.65.1
Updates the requirements on [bindgen](https://github.com/rust-lang/rust-bindgen) to permit the latest version.
- [Changelog](https://github.com/rust-lang/rust-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/rust-bindgen/compare/v0.63.0...v0.65.1)

---
updated-dependencies:
- dependency-name: bindgen
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 07:39:44 +00:00
David Hewitt 2909d5f2d7
Merge pull request #3228 from davidhewitt/fix-dependabot
rename examples package to fix dependabot
2023-06-13 06:29:07 +00:00
Adam Reichold 6a4f520c38
Merge pull request #3227 from davidhewitt/py37-allow-fail
ci: allow failure on 3.7 and pypy nightly
2023-06-13 05:01:22 +00:00
David Hewitt c01738d3fc rename examples package to fix dependabot 2023-06-12 21:18:12 +01:00
David Hewitt c434263241 ci: allow failure on 3.7 and pypy nightly 2023-06-12 20:30:03 +01:00
Adam Reichold a053489c8b
Merge pull request #2709 from davidhewitt/py3.12
ci: add Python 3.12-dev jobs
2023-06-12 08:59:35 +00:00
Adam Reichold b110466c57
Merge pull request #3221 from davidhewitt/msrv-tidy-ups
docs: remove unneeded cfg, fixup internal banner
2023-06-12 06:33:48 +00:00
David Hewitt 199261f436
Merge pull request #3197 from mhils/ipaddr
Add `IpAddr` <-> `ipaddress.IPv(4/6)Address` conversion
2023-06-12 04:00:43 +00:00
David Hewitt ef7c02ccdb
Merge pull request #3225 from davidhewitt/pool-can-be-dirty
ci: pool can be dirty from other threads
2023-06-12 03:17:21 +00:00
David Hewitt 671ed933e2 ci: allow failures in 3.12 builds for now 2023-06-11 21:57:17 +01:00
David Hewitt 621898b07d ci: add Python 3.12-dev jobs 2023-06-11 21:57:17 +01:00
David Hewitt 7fd59455b1 ci: pool can be dirty from other threads 2023-06-11 21:52:23 +01:00
David Hewitt 56a43bc078
Merge pull request #3224 from davidhewitt/msrv-log
ci: pin log for msrv
2023-06-11 20:05:25 +00:00
David Hewitt 5348ff2426 ci: pin log for msrv 2023-06-11 20:26:19 +01:00
Adam Reichold bb6d1711cb
Merge pull request #3220 from davidhewitt/remove-bors
ci: remove bors configuration
2023-06-09 07:03:31 +00:00
David Hewitt 05af0b2f42 fixup styles for internal doc banner 2023-06-08 22:04:48 +01:00
David Hewitt 46942b9a14 docs: remove workarounds for `#[doc = concat!(...)]` following msrv bump 2023-06-08 21:04:49 +01:00
David Hewitt 618d99966f ci: remove bors configuration 2023-06-08 20:56:40 +01:00
Adam Reichold d3bd82c6f2
Merge pull request #3219 from davidhewitt/pypy-310-ffi
ci: fail ffi-check on pypy failures
2023-06-08 12:26:11 +00:00
Maximilian Hils 980f05a88e Add `IpAddr` <-> `ipaddress.IPv(4/6)Address` conversion 2023-06-08 13:17:45 +02:00
David Hewitt 72d1805109 fix pypy 3.10 ffi definitions 2023-06-08 07:51:10 +01:00
David Hewitt 24ea1de27b ci: fail ffi-check on pypy failures 2023-06-08 07:18:08 +01:00