Commit Graph

160 Commits

Author SHA1 Message Date
Bruno Kolenbrander fff053bde7
Emit a better error for abi3 inheritance (#4185)
* Emit a better error for abi3 inheritance

* Update tests/test_compile_error.rs

---------

Co-authored-by: David Hewitt <mail@davidhewitt.dev>
2024-05-17 10:55:41 +00:00
David Hewitt 7790dab480
emit rustc-check-cfg only on rust 1.80+ (#4168) 2024-05-15 11:11:49 +00:00
Icxolu 10152a7078
feature gate `PyCell` (#4177)
* feature gate `PyCell`

* feature gate `HasPyGilRef` completely

* bump version
2024-05-12 18:30:08 +00:00
Adam Reichold c5f9001985
Remove deferred reference count increments and make the global reference pool optional (#4095)
* Add feature controlling the global reference pool to enable avoiding its overhead.

* Document reference-pool feature in the performance guide.

* Invert semantics of feature to disable reference pool so the new behaviour becomes opt-in

* Remove delayed reference count increments as we cannot prevent reference count errors as long as these are available

* Adjust tests to be compatible with disable-reference-pool feature

* Adjust tests to be compatible with py-clone feature

* Adjust the GIL benchmark to the updated reference pool semantics.

* Further extend and clarify the documentation of the py-clone and disable-reference-pool features

* Replace disable-reference-pool feature by pyo3_disable_reference_pool conditional compilation flag

Such a flag is harder to use and thereby also harder to abuse. This seems
appropriate as this is purely a performance-oriented change which show only be
enabled by leaf crates and brings with it additional highly implicit sources of
process aborts.

* Add pyo3_leak_on_drop_without_reference_pool to turn aborts into leaks when the global reference pool is disabled and the GIL is not held
2024-05-11 14:48:45 +00:00
Icxolu 72be1cddba
emit `cargo:rustc-check-cfg=CHECK_CFG` for `pyo3`s config names (#4163) 2024-05-08 05:46:00 +00:00
Icxolu 9a808c35c6
fix `clippy-beta` ci workflow (#4147) 2024-05-01 19:05:51 +00:00
Alex Gaynor 9e1960ea34
Update MSRV to 1.63 (#4129)
* Bump MSRV to 1.63

* Drop parking_lot in favor of std::sync

* Make portable-atomic dep conditional

* Remove no longer required cfg
2024-04-28 16:11:28 +00:00
David Hewitt 2c205d4586
release notes for 0.21.2 (#4091) 2024-04-18 08:59:02 +00:00
Bruno Kolenbrander 9761abf3a5
Specify higher target-lexicon version (#4087) 2024-04-17 01:07:11 +00:00
messense 30348b4d3f
Link libpython for AIX target (#4073) 2024-04-13 07:43:06 +00:00
David Hewitt c1f11fb4bd
release: 0.21.1 (#4032) 2024-04-01 18:51:58 +00:00
David Hewitt 1be2fad9bf
release: 0.21.0 (#3983) 2024-03-25 23:36:08 +00:00
Tim Felgentreff 9a38e709bb
Basic GraalPy Support (#3247)
* graalpy: recognize graalpy implementation when building

* graalpy: global Ellipse, None, NotImplemented, True, and False are only available as pointers

* graalpy: PyObject struct is opaque, use functions for everything

* graalpy: missing many of the same functions as pypy

* graalpy: do not have 128bit conversion functions

* graalpy: add functions for datetime accessor macros

* graalpy: add implementations for list macro functions

* graalpy: skip tuple macros

* graalpy: always use extern Py_CompileString function

* graalpy: disable assertion that does not apply to graalpy

* graalpy: floatobject structure is opaque on graalpy

* graalpy: ignore gc dependent test

* graalpy: add CI config

* graalpy: run rust fmt

* graalpy: add changelog entry

* graalpy: discover interpreter on PATH

* graalpy: interpreter id is not applicable to graalpy (just like pypy)

* graalpy: skip tests that cannot work on GraalPy

* graalpy: fix constructing normalized Err instances

Co-authored-by: David Hewitt <mail@davidhewitt.dev>

* graalpy: correct capi library name, but skip rust tests due to missing symbols

* graalpy: no support for C extensions on windows in latest release

* graalpy: declare support versions

* graalpy: frame, code, method, and function objects access from C API is mostly missing

* graalpy: take care only to expose C structure that GraalPy allocates

* graalpy: Bail out if graalpy version is less than what we support

---------

Co-authored-by: David Hewitt <mail@davidhewitt.dev>
2024-03-25 18:54:52 +00:00
David Hewitt 67b1b35013
release: 0.21.0-beta.0 (#3944) 2024-03-10 22:16:18 +00:00
David Hewitt 75af678f43
docs: use kebab-case instead of snake_case for guide URLs (#3942)
* guide: use kebab-case instead of snake_case

* fixup doctest names

Co-authored-by: Icxolu <10486322+Icxolu@users.noreply.github.com>

* review: Icxolu

* fix relative url

* also remap latest pyo3

* fixup python_from_rust

---------

Co-authored-by: Icxolu <10486322+Icxolu@users.noreply.github.com>
2024-03-09 20:10:58 +00:00
David Hewitt 4efc4b82a3
ci: fix redundant import warnings on nightly (#3873) 2024-02-19 22:07:05 +00:00
David Hewitt f5eafe23f2
add maximum Python version check (#3821)
* add maximum Python version check

* restore dependency of `pyo3-macros-backend` on `pyo3-build-config`

* fix clippy-all noxfile job
2024-02-13 21:52:53 +00:00
Alex Gaynor d92792f8ad Fixes #3645 -- added `abi3-py312` feature 2023-12-21 10:40:14 -05:00
David Hewitt 4a43b2f454 bump version to 0.21.0-dev 2023-11-19 06:41:10 +00:00
David Hewitt 852e4fea04 add link to user guide to cross compile error message 2023-10-30 22:21:56 +00:00
David Hewitt e284f3669f add coverage for `emit_pyo3_cfgs` 2023-10-25 22:59:43 +01:00
David Hewitt c77deee18e release: 0.20.0 2023-10-11 14:39:19 +02:00
David Hewitt ccc22a905d allow invalid_from_utf8 lint in tests 2023-09-23 12:54:53 +01:00
David Hewitt f0f15edc4e remove some redundant explicit doc links 2023-09-08 15:36:24 +01:00
David Hewitt eba2c59778 tidy up some file locations after dual licensing 2023-08-16 08:22:51 +01:00
DataTriny 3c3e9401a3 Dual-license 2023-08-15 23:39:45 +02:00
David Hewitt 43b37109de Revert "Fix the pydebug with trace refs and count_allocs for python > 3.7"
This reverts commit c780aa931d.
2023-08-15 08:41:22 +01:00
David Hewitt 284c42d840 release: 0.19.2 2023-08-01 07:29:04 +01:00
David Hewitt 7d357ad992 release: 0.19.1 2023-07-03 16:18:24 +01: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
Adam Reichold 0d30bb7d3d Bump Rust edition to 2021 and make current Clippy happy. 2023-06-07 21:15:38 +02:00
Adam Reichold 6f987263c1 Remove cfg addr_of made unnecessary by MSRV bump. 2023-06-05 11:12:06 +02:00
Adam Reichold eb04f54683 Remove cfg min_const_generics made unnecessary by MSRV bump. 2023-06-05 09:42:40 +02:00
Adam Reichold f7bd6ce224 Remove cfg option_insert made unnecessary by MSRV bump. 2023-06-05 09:37:13 +02:00
Adam Reichold b49e401319 Remove unmatched cfg and unused rustup component. 2023-06-05 09:36:13 +02:00
David Hewitt 1bbd556718 run cargo check instead of clippy for MSRV in CI 2023-06-04 23:15:59 +01:00
David Hewitt 2500e22e13 release: 0.19.0 2023-05-31 13:53:37 +01:00
Kang Seonghoon dee45d3644 Use a const initializer for `GIL_COUNT` if possible. 2023-05-22 11:31:20 +09:00
David Hewitt bfcc1f8c27 update release notes for 0.18.3 2023-04-13 22:47:55 +01:00
David Hewitt e7e58ba51e update release notes for 0.18.2 2023-03-24 20:40:06 +00:00
David Hewitt 92cca896de release notes for 0.18.1 2023-02-07 21:38:07 +00:00
David Hewitt d67a8dc0a1 link against pythonXY_d.dll for debug Python on Windows 2023-02-07 07:23:17 +00:00
messense f8e2a26439
Warn about unknown config keys in `PYO3_CONFIG_FILE` 2023-01-29 10:49:27 +08:00
David Hewitt 224a4160b4 release: 0.18.0 2023-01-17 19:04:30 +00:00
messense 7e89456c77
Remove `libpython.so` from cross compile error message 2023-01-05 17:07:21 +08:00
David Hewitt f2608a923c remove functionality deprecated in 0.16 2022-12-28 12:23:53 +00:00
David Hewitt 97487ffbb5 add abi3-py311 feature 2022-11-23 08:08:12 +00:00
messense dee791de90
`pyo3-build-config`: rebuild when `PYO3_ENVIRONMENT_SIGNATURE` value changed 2022-11-09 20:28:18 +08:00
David Hewitt 548e90fcec release: 0.17.3 2022-11-01 20:47:46 +00:00