From 0cc7fc384381ea09eea5f031d31b1417f9f40fdf Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Mon, 6 May 2024 12:37:54 -0400 Subject: [PATCH] Prepare for 42.0.7 release (#10949) * Prepare for 42.0.7 release * Fix build with Rust nightly (#10936) * Extra cfg --- .github/workflows/wheel-builder.yml | 2 +- CHANGELOG.rst | 10 ++++++++++ pyproject.toml | 2 +- src/cryptography/__about__.py | 2 +- src/rust/build.rs | 7 +++++++ src/rust/cryptography-cffi/build.rs | 2 ++ src/rust/cryptography-key-parsing/build.rs | 3 +++ src/rust/cryptography-openssl/build.rs | 5 +++++ vectors/cryptography_vectors/__about__.py | 2 +- vectors/pyproject.toml | 2 +- 10 files changed, 32 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wheel-builder.yml b/.github/workflows/wheel-builder.yml index 0d2c5774721f..748293efb22c 100644 --- a/.github/workflows/wheel-builder.yml +++ b/.github/workflows/wheel-builder.yml @@ -326,7 +326,7 @@ jobs: architecture: ${{ matrix.WINDOWS.ARCH }} - uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 with: - toolchain: stable + toolchain: 1.77.2 target: ${{ matrix.WINDOWS.RUST_TRIPLE }} - uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d # v3.0.0 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ed2e24c35ee2..63e2918ffdee 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,16 @@ Changelog ========= +.. _v42-0-7: + +42.0.7 - 2024-05-06 +~~~~~~~~~~~~~~~~~~~ + +* Restored Windows 7 compatibility for our pre-built wheels. Note that we do + not test on Windows 7 and wheels for our next release will not support it. + Microsoft no longer provides support for Windows 7 and users are encouraged + to upgrade. + .. _v42-0-6: 42.0.6 - 2024-05-04 diff --git a/pyproject.toml b/pyproject.toml index a227517e89e4..4f0fa364134d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta" [project] name = "cryptography" -version = "42.0.6" +version = "42.0.7" authors = [ {name = "The Python Cryptographic Authority and individual contributors", email = "cryptography-dev@python.org"} ] diff --git a/src/cryptography/__about__.py b/src/cryptography/__about__.py index 41874f587083..2462fc9e121d 100644 --- a/src/cryptography/__about__.py +++ b/src/cryptography/__about__.py @@ -10,7 +10,7 @@ "__copyright__", ] -__version__ = "42.0.6" +__version__ = "42.0.7" __author__ = "The Python Cryptographic Authority and individual contributors" diff --git a/src/rust/build.rs b/src/rust/build.rs index f247822e0dcd..a310c3e9f2ff 100644 --- a/src/rust/build.rs +++ b/src/rust/build.rs @@ -6,6 +6,13 @@ use std::env; #[allow(clippy::unusual_byte_groupings)] fn main() { + println!("cargo:rustc-check-cfg=cfg(CRYPTOGRAPHY_OPENSSL_300_OR_GREATER)"); + println!("cargo:rustc-check-cfg=cfg(CRYPTOGRAPHY_OPENSSL_320_OR_GREATER)"); + println!("cargo:rustc-check-cfg=cfg(CRYPTOGRAPHY_IS_LIBRESSL)"); + println!("cargo:rustc-check-cfg=cfg(CRYPTOGRAPHY_LIBRESSL_380_OR_GREATER)"); + println!("cargo:rustc-check-cfg=cfg(CRYPTOGRAPHY_IS_BORINGSSL)"); + println!("cargo:rustc-check-cfg=cfg(CRYPTOGRAPHY_OSSLCONF, values(\"OPENSSL_NO_IDEA\", \"OPENSSL_NO_CAST\", \"OPENSSL_NO_BF\", \"OPENSSL_NO_CAMELLIA\", \"OPENSSL_NO_SEED\", \"OPENSSL_NO_SM4\"))"); + if let Ok(version) = env::var("DEP_OPENSSL_VERSION_NUMBER") { let version = u64::from_str_radix(&version, 16).unwrap(); diff --git a/src/rust/cryptography-cffi/build.rs b/src/rust/cryptography-cffi/build.rs index 5f73714f3415..0b721997e137 100644 --- a/src/rust/cryptography-cffi/build.rs +++ b/src/rust/cryptography-cffi/build.rs @@ -7,6 +7,8 @@ use std::path::Path; use std::process::Command; fn main() { + println!("cargo:rustc-check-cfg=cfg(python_implementation, values(\"CPython\", \"PyPy\"))"); + let target = env::var("TARGET").unwrap(); let openssl_static = env::var("OPENSSL_STATIC") .map(|x| x == "1") diff --git a/src/rust/cryptography-key-parsing/build.rs b/src/rust/cryptography-key-parsing/build.rs index cd318b35ff35..15f34f38b4dd 100644 --- a/src/rust/cryptography-key-parsing/build.rs +++ b/src/rust/cryptography-key-parsing/build.rs @@ -5,6 +5,9 @@ use std::env; fn main() { + println!("cargo:rustc-check-cfg=cfg(CRYPTOGRAPHY_IS_LIBRESSL)"); + println!("cargo:rustc-check-cfg=cfg(CRYPTOGRAPHY_IS_BORINGSSL)"); + if env::var("DEP_OPENSSL_LIBRESSL_VERSION_NUMBER").is_ok() { println!("cargo:rustc-cfg=CRYPTOGRAPHY_IS_LIBRESSL"); } diff --git a/src/rust/cryptography-openssl/build.rs b/src/rust/cryptography-openssl/build.rs index a0b4566a753c..b7264630f530 100644 --- a/src/rust/cryptography-openssl/build.rs +++ b/src/rust/cryptography-openssl/build.rs @@ -6,6 +6,11 @@ use std::env; #[allow(clippy::unusual_byte_groupings)] fn main() { + println!("cargo:rustc-check-cfg=cfg(CRYPTOGRAPHY_OPENSSL_300_OR_GREATER)"); + println!("cargo:rustc-check-cfg=cfg(CRYPTOGRAPHY_OPENSSL_320_OR_GREATER)"); + println!("cargo:rustc-check-cfg=cfg(CRYPTOGRAPHY_IS_LIBRESSL)"); + println!("cargo:rustc-check-cfg=cfg(CRYPTOGRAPHY_IS_BORINGSSL)"); + if let Ok(version) = env::var("DEP_OPENSSL_VERSION_NUMBER") { let version = u64::from_str_radix(&version, 16).unwrap(); diff --git a/vectors/cryptography_vectors/__about__.py b/vectors/cryptography_vectors/__about__.py index ce12e36f724a..009d27168908 100644 --- a/vectors/cryptography_vectors/__about__.py +++ b/vectors/cryptography_vectors/__about__.py @@ -6,4 +6,4 @@ "__version__", ] -__version__ = "42.0.6" +__version__ = "42.0.7" diff --git a/vectors/pyproject.toml b/vectors/pyproject.toml index 9f10e207d1dc..8d7fe46cbd9f 100644 --- a/vectors/pyproject.toml +++ b/vectors/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi" [project] name = "cryptography_vectors" -version = "42.0.6" +version = "42.0.7" authors = [ {name = "The Python Cryptographic Authority and individual contributors", email = "cryptography-dev@python.org"} ]