Commit Graph

4563 Commits

Author SHA1 Message Date
mejrs b7745dffc8 Fix everything 2022-04-12 14:19:02 +02:00
messense 57412f1a29
Install cargo-xwin from PyPI to speedup CI 2022-04-12 17:04:40 +08:00
David Hewitt cb48557601
Merge pull request #2296 from davidhewitt/print-config-note
build: add hint when PYO3_PRINT_CONFIG is set
2022-04-12 08:27:49 +01:00
David Hewitt fe4edd170a
Merge pull request #2295 from davidhewitt/base-datetimes
ffi: add BaseDateTime and BaseTime definitions
2022-04-12 08:18:36 +01:00
David Hewitt b35fed00d7 build: add hint when PYO3_PRINT_CONFIG is set 2022-04-12 07:54:23 +01:00
David Hewitt 391a375bae ffi: add BaseDateTime and BaseTime definitions 2022-04-12 07:46:38 +01:00
David Hewitt 3b45170824
Merge pull request #2282 from ravenexp/python3-dll-a
pyo3-build-config: Add `python3-dll-a` crate support
2022-04-11 18:54:54 +01:00
Adam Reichold dc5a6702a3
Merge pull request #2291 from PyO3/contributors
Add Nox session to retrieve sorted list of contributors.
2022-04-11 10:08:02 +02:00
Adam Reichold 851e43bc1a Add Nox session to retrieve sorted list of contributors. 2022-04-11 08:57:00 +02:00
Sergey Kvachonok 4347624bd3 Mention `generate-abi3-import-lib` in the features guide
Update the feature list section of the user guide
to include `generate-abi3-import-lib` description.
2022-04-11 09:56:52 +03:00
messense 75ea171927
Use `cargo-xwin` to test windows msvc cross compilation 2022-04-11 00:19:20 +08:00
messense 4ba11f7615
Add a windows msvc cross compilation test 2022-04-10 23:17:21 +08:00
Adam Reichold 551db72b55
Merge pull request #2279 from PyO3/extract-error-is-slow
Add benchmark highlighting the costs of failed calls to FromPyObject::extract.
2022-04-10 17:10:50 +02:00
messense 8368c62858
maturin still requires a Python interpreter on Windows for now
Switch from Python 3.10 to Python 3.8 because I don't want to test with Rust 1.48.0
2022-04-10 22:29:52 +08:00
messense eb6b6457e2
Enable `generate-abi3-import-lib` feature for maturin-starter when abi3
feature is enabled
2022-04-10 22:11:04 +08:00
messense c5ca6d040b
Add Windows abi3 wheel cross comiplation test 2022-04-10 22:05:30 +08:00
Sergey Kvachonok c84cecc1f7 Add a ChangeLog entry for `generate-abi3-import-lib` 2022-04-10 16:47:18 +03:00
Sergey Kvachonok a7c0de3628 Document `generate-abi3-import-lib` crate feature
Update the user guide to describe its applicability to the native
and cross-compilation build scenarios.
2022-04-10 16:45:32 +03:00
Sergey Kvachonok 479fe6781f pyo3-build-config: Add `python3-dll-a` crate support
Automatically generate `python3.dll` import libraries for Windows
compile targets in the build script.

Adds a new PyO3 crate feature `generate-abi3-import-lib` enabling
automatic import library generation.

Closes #2231
2022-04-10 16:45:32 +03:00
David Hewitt e6901e344e
Merge pull request #2289 from davidhewitt/fix-get-tzinfo
ffi: fix segfault in _GET_TZINFO methods
2022-04-10 13:18:40 +01:00
Adam Reichold 10c285b283 Add PyDowncastErrorArguments to delay formatting downcast errors. 2022-04-10 13:13:03 +02:00
Adam Reichold 74e93a2c29 Add benchmark highlighting the costs of failed calls to FromPyObject::extract. 2022-04-10 13:04:27 +02:00
David Hewitt 1d9d60a766 ffi: fix segfault in _GET_TZINFO methods 2022-04-10 10:27:50 +01:00
David Hewitt 2a54641d91
Merge pull request #2288 from ravenexp/fix-py37-abi-version
pyo3-build-config: Use "m" ABI tag for libpython 3.7 by default
2022-04-09 11:52:51 +01:00
Sergey Kvachonok 8f9976ad33 pyo3-build-config: Use "m" ABI tag for libpython-3.7 by default
According to https://bugs.python.org/issue36707, this tag is useless
since version 3.4, but also the default until version 3.8.

For example, Debian 10 ships `libpython3.7m.so`.
2022-04-09 13:28:44 +03:00
David Hewitt 1971dd7a8a
Merge pull request #2286 from RicoHageman/main
Gather test coverage with stable rust
2022-04-08 19:28:13 +01:00
Rico Hageman fe2f83913b Remove nightly toolchain check 2022-04-08 19:23:39 +02:00
David Hewitt 749fe6c4bb
Merge pull request #2285 from PyO3/spin-loop-hint
Replace unhinted spin loops by sleeping events.
2022-04-08 16:15:16 +01:00
Rico Hageman c281275a29 Gather test coverage with stable rust 2022-04-08 14:24:10 +02:00
Adam Reichold 6a4ebbf2d7 Replace unhinted spin loops by sleeping events. 2022-04-08 11:16:40 +02:00
David Hewitt 209221890c
Merge pull request #2284 from mejrs/rust160
Rust 1.60
2022-04-08 07:45:15 +01:00
mejrs 4fc0cdd636 Fix ui test 2022-04-07 23:56:15 +02:00
mejrs 2eb51ceba9 Make clippy happy 2022-04-07 23:14:45 +02:00
David Hewitt d13a4982b5
Merge pull request #2276 from ravenexp/inline-no-python
pyo3-build-config: Inline the `PYO3_NO_PYTHON` switch
2022-04-06 08:31:29 +01:00
Sergey Kvachonok 29476b0d0d pyo3-build-config: Inline the `PYO3_NO_PYTHON` switch
This patch folds the `PYO3_NO_PYTHON` + `abi3` special case into
the existing native and cross compilation code paths.

The cross compilation route is now guaranteed to behave the same
whether `PYO3_NO_PYTHON` is set or not (except for sysconfigdata
discovery for the Unix targets).

The native compilation route now stores the hardcoded abi3 interpreter
configuration in place of the discovered configuration blob.
2022-04-05 17:19:49 +03:00
David Hewitt 0f868e7fa5
Merge pull request #2267 from PyO3/release-0.16.3
release: 0.16.3
2022-04-05 09:20:05 +01:00
David Hewitt 1ae0971a09 release: 0.16.3 2022-04-05 04:05:57 +01:00
David Hewitt 9774a7c1c1
Merge pull request #2273 from PyO3/dog-food-intern
Make use of intern! macro for attribute names used internally
2022-04-05 00:41:35 +01:00
David Hewitt d3ac71a42b
Merge pull request #2269 from PyO3/intern-macro
RFC: Add intern! macro which can be used to amortize the cost of creating Python objects by storing them inside a GILOnceCell.
2022-04-05 00:34:37 +01:00
Adam Reichold f02a060a3d Add a hint on using intern! to Py{,Any}::{set,get}attr. 2022-04-04 23:11:38 +02:00
Adam Reichold 2c95b3abb4 Intern the attribute names used by the derive macro for FromPyObject. 2022-04-04 22:26:14 +02:00
Adam Reichold 5434bbc3f6 Intern the __all__ and __name__ identifiers used by PyModule. 2022-04-04 22:26:14 +02:00
Adam Reichold 821b28daff Intern the __qualname__ identifier used by PyType::name. 2022-04-04 22:05:03 +02:00
Adam Reichold 89577a27d9 Isolate interned strings from their dynamic environment to avoid calling multiple times them with different text values yielding inconsistent results. 2022-04-04 22:04:46 +02:00
David Hewitt 981eb2d90e
Merge pull request #2265 from davidhewitt/pyclass-mapping
pyclass: mapping flag
2022-04-04 19:54:37 +01:00
Adam Reichold 7b99af9b34 Execute the example for intern macro to ensure it is correct. 2022-04-04 20:25:47 +02:00
Adam Reichold 30d414fd49 Add intern macro to hygiene tests and ensure it can handle stringified identifiers. 2022-04-04 18:53:31 +02:00
David Hewitt 9f3ccff8c9 guide: improve documentation for `#[pyclass(mapping)]` 2022-04-04 15:51:01 +01:00
David Hewitt 4e5c874dba
Merge pull request #2272 from ravenexp/cross-python-implementation
pyo3-build-config: Add `PYO3_CROSS_PYTHON_IMPLEMENTATION` env var
2022-04-04 15:27:31 +01:00
Sergey Kvachonok 80675361f4 pyo3-build-config: Add `PYO3_CROSS_PYTHON_IMPLEMENTATION` env var
Adds a new cross-compile target interpreter configuration
environment variable.

This feature allows PyO3 to target PyPy on both Windows and Unix
cross compile targets.
2022-04-04 15:23:11 +03:00