Commit Graph

5980 Commits

Author SHA1 Message Date
David Hewitt 82ac801be4 introduce traits to make ffi ptr handling cleaner 2023-12-14 13:00:45 +00:00
David Hewitt ac4ee2841b implement `PySequenceMethods` 2023-12-14 13:00:45 +00:00
Adam Reichold fc82c9f870
Merge pull request #3636 from PyO3/more-async-self-hints
Expand guide on async methods borrowing self.
2023-12-14 10:58:48 +00:00
David Hewitt a010da2c58
Merge pull request #3647 from PyO3/fix-msrv
Fix the Crossbeam ecosystem to point releases before it required Rust 1.61.
2023-12-14 10:58:30 +00:00
Adam Reichold 97e0998ac2 Fix the Crossbeam ecosystem to point releases before it required Rust 1.61. 2023-12-14 11:35:20 +01:00
messense 42601f3af9
Merge pull request #3642 from PyO3/dependabot/github_actions/actions/setup-python-5
build(deps): bump actions/setup-python from 4 to 5
2023-12-12 02:55:22 +00:00
dependabot[bot] 20e9680a81
build(deps): bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 20:04:18 +00:00
Adam Reichold b0d4ef3525 Expand guide on async methods borrowing self. 2023-12-10 16:37:39 +01:00
David Hewitt 24d9113974
Merge pull request #3632 from messense/extract-frozen-set
Add support for extracting Rust set types from `frozenset`
2023-12-07 16:17:51 +00:00
messense 601d9573c8
Merge pull request #3631 from wyfo/doc_typo
docs: fix typos
2023-12-07 12:29:00 +00:00
messense c21a84d999
Add support for extracting Rust set types from `frozenset` 2023-12-07 20:25:31 +08:00
Joseph Perez e73c795967
docs: fix typos 2023-12-07 10:10:15 +01:00
David Hewitt 07726aefc4
Merge pull request #3609 from wyfo/async_receiver
feat: allow async methods to accept `&self`/`&mut self`
2023-12-07 07:38:25 +00:00
Joseph Perez f34c70c2da
feat: allow async methods to accept `&self`/`&mut self` 2023-12-07 07:42:10 +01:00
Adam Reichold 4baf0235c3
Merge pull request #3616 from neachdainn/3615-gilprotected-pyvisit
Enable `GILProtected` access via `PyVisit`
2023-12-05 20:43:38 +00:00
Nathan Kent 3249feb85c
Enable `GILProtected` access via `PyVisit`
Closes #3615

This simply adds a new method which uses the existence of a `PyVisit`
object as proof that the GIL is held instead of a `Python` object. This
allows `GILProtected` to be used in instances where contained Python
objects need to participate in garbage collection. Usage in this
situation should be valid since no Python calls are made and this does
not provide any additional mechanism for accessing a `Python` object.
2023-12-05 11:10:00 -08:00
David Hewitt 856c573231
Merge pull request #3600 from davidhewitt/pytypecheck
replace `PyTryFrom` by splitting `PyTypeInfo`
2023-12-05 09:52:35 +00:00
David Hewitt de6d8b7d30
Merge pull request #3629 from davidhewitt/pytests-debug
ci: fixup pytests to compile in debug
2023-12-05 05:30:57 +00:00
David Hewitt ed87637ebb replace `PyTryFrom` by splitting `PyTypeInfo` 2023-12-05 08:01:30 +03:00
David Hewitt 5326bce57f ci: fixup pytests to compile in debug 2023-12-05 08:01:02 +03:00
David Hewitt 93370d9f6c
Merge pull request #3627 from davidhewitt/codspeed-fixup
try to debug codspeed issue
2023-12-04 22:51:55 +00:00
David Hewitt 2a5dedcbb5 ci: refactor pytests dev dependencies 2023-12-05 00:54:32 +03:00
David Hewitt 16ae0e2efe
Merge pull request #3608 from wyfo/remove_futures
refactor: drop futures_util dependency
2023-12-04 19:17:43 +00:00
Joseph Perez 2ca9f59d6f
refactor: drop futures_util dependency 2023-12-04 18:56:34 +01:00
David Hewitt e8f852bce7
Merge pull request #3599 from wyfo/coroutine_cancel
feat: add `coroutine::CancelHandle`
2023-12-04 12:44:36 +00:00
Joseph Perez 8a674c2bd3
feat: add `coroutine::CancelHandle` 2023-12-04 07:46:51 +01:00
David Hewitt 38beac4fb2
Merge pull request #3622 from messense/pyimport-frozen-ffi
Add additional definitions for `_PyImport_Frozen*`
2023-12-04 05:09:56 +00:00
messense 28dda997f9
Add additional definitions for `_PyImport_Frozen*` 2023-12-03 21:47:00 +08:00
David Hewitt 1556845e78
Merge pull request #3619 from PyO3/portable-atomic
Use portable-atomic for targets which lack 64-bit atomics used to check interpreter ID.
2023-12-03 07:16:33 +00:00
Adam Reichold e6457c5e99 Use portable-atomic for targets which lack 64-bit atomics used to check interpreter ID.
I chose to make the dependency mandatory instead of optional as portable-atomic
itself just forwards to the native atomics when they are available so making
that choice part of our build system is not really necessary. Personally, I was
unable to perceive any noticeable compile-time hit from adding it.
2023-12-02 07:57:00 +01:00
David Hewitt 81ad2e8bab
Merge pull request #3598 from davidhewitt/clippy-beta
ci: run beta clippy as an allowed-to-fail job
2023-11-29 06:47:21 +00:00
David Hewitt 016b11069e
Merge pull request #3604 from alex/monomorphize-create_type_object
Refactor create_type_object so that most of the code is monomorphic
2023-11-29 06:47:03 +00:00
Alex Gaynor dd6e0339d3 Refactor create_type_object so that most of the code is monomorphic
In pyca/cryptography this function is the #1 source of lines of generated LLVM IR, because it is duplicated 42x (and growing!). By rewriting it so most of the logic is monomorphic, we reduce the generated LLVM IR for this function by 4x.
2023-11-28 20:09:34 -05:00
David Hewitt cf67c2ce46 fix test-serde beta clippy warning 2023-11-28 07:29:45 +00:00
David Hewitt 41842f9e4b fix pyo3-ffi beta clippy warnings 2023-11-28 07:29:45 +00:00
David Hewitt 8e5ef9058b ci: run beta clippy as an allowed-to-fail job 2023-11-28 07:29:45 +00:00
David Hewitt e62e6cad5d
Merge pull request #3603 from davidhewitt/0.19-deprecations
remove all functionality deprecated in 0.19
2023-11-28 06:47:30 +00:00
David Hewitt 53311a90eb
Merge pull request #3602 from davidhewitt/dead-kws
remove some unused keyword declarations
2023-11-28 06:45:43 +00:00
Alex Gaynor 5080deedbf
Merge pull request #3564 from PyO3/alex-patch-1
fixes #3561 -- silence new clippy warning
2023-11-27 22:41:50 +00:00
Alex Gaynor fae209419c fixes #3561 -- silence new clippy warning 2023-11-27 17:06:59 -05:00
David Hewitt 5c6d49084f remove all functionality deprecated in 0.19 2023-11-27 22:02:19 +00:00
David Hewitt e76797a1d6 remove some unused keyword declarations 2023-11-27 21:32:01 +00:00
David Hewitt 0f34fcd4b7
Merge pull request #3508 from mejrs/sub2
Create subinterpreter example
2023-11-26 10:42:31 +00:00
mejrs 597a184b4f Create subinterpreter example 2023-11-26 09:49:56 +00:00
David Hewitt d8002c4b2b
Merge pull request #3588 from wyfo/coroutine_name
feat: add coroutine `__name__`/`__qualname__`
2023-11-26 09:23:29 +00:00
Joseph Perez 781b9e3983
feat: add coroutine `__name__`/`__qualname__` and not-awaited warning 2023-11-25 21:51:20 +01:00
Adam Reichold 1203921d5c
Merge pull request #3456 from aldanor/feature/either
Add conversion support for `either::Either`
2023-11-25 09:37:49 +00:00
Adam Reichold 81bc838acd
Merge pull request #3577 from davidhewitt/none-typeinfo
Implement `PyTypeInfo` for `PyEllipsis`, `PyNone`, and `PyNotImplemented`
2023-11-25 09:36:43 +00:00
David Hewitt 9f66846238
Merge pull request #3595 from davidhewitt/ok-wrap
refactor `OkWrap` to not call `.into_py(py)`
2023-11-25 05:43:54 +00:00
messense cbd06309ff
Merge pull request #3596 from davidhewitt/smallvec-docs
docs: fixup docs for smallvec feature
2023-11-25 01:36:51 +00:00