From 8ca5d515b15b177983f11d5a1a0cdd01ab298e88 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Mon, 27 Nov 2023 09:25:03 -0500 Subject: [PATCH] Prep for 4.1.0 release (#667) --- .github/workflows/ci.yml | 5 ++++- README.rst | 6 +++--- pyproject.toml | 2 +- setup.py | 10 ++++++++-- src/_bcrypt/src/lib.rs | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f417aa..589a0bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,7 +93,8 @@ jobs: - {VERSION: "pypy-3.10", TOXENV: "pypy3"} # MSRV - - {VERSION: "3.12", TOXENV: "py312", RUST_VERSION: "1.60.0"} + - {VERSION: "3.12", TOXENV: "py312", RUST_VERSION: "1.63.0"} + - {VERSION: "3.12", TOXENV: "py312", RUST_VERSION: "1.64.0"} - {VERSION: "3.12", TOXENV: "py312", RUST_VERSION: "beta"} - {VERSION: "3.12", TOXENV: "py312", RUST_VERSION: "nightly"} name: "${{ matrix.PYTHON.TOXENV }} on linux, Rust ${{ matrix.PYTHON.RUST_VERSION || 'stable' }}" @@ -120,6 +121,8 @@ jobs: toolchain: ${{ matrix.PYTHON.RUST_VERSION || 'stable' }} - run: pip install tox + - if: matrix.PYTHON.RUST_VERSION == '1.63.0' + run: echo 'BCRYPT_ALLOW_RUST_163=1' >> $GITHUB_ENV - run: tox env: TOXENV: ${{ matrix.PYTHON.TOXENV }} diff --git a/README.rst b/README.rst index beec0b8..550a2c1 100644 --- a/README.rst +++ b/README.rst @@ -51,11 +51,11 @@ While bcrypt remains an acceptable choice for password storage, depending on you Changelog ========= -5.0.0 (UNRELEASED) ------------------- +4.1.0 +----- * Dropped support for Python 3.6. -* Bumped MSRV to 1.60. +* Bumped MSRV to 1.64. (Note: Rust 1.63 can be used by setting the ``BCRYPT_ALLOW_RUST_163`` environment variable) 4.0.1 ----- diff --git a/pyproject.toml b/pyproject.toml index 7dccb18..0d4dae6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta" [project] name = "bcrypt" # When updating this, also update lib.rs -version = "4.0.1" +version = "4.1.0" authors = [ {name = "The Python Cryptographic Authority developers", email = "cryptography-dev@python.org"} ] diff --git a/setup.py b/setup.py index 267253e..15a224b 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ +import os import platform import re import shutil @@ -43,7 +44,11 @@ try: if platform.python_implementation() == "PyPy" else ["pyo3/abi3-py37"] ), - rust_version=">=1.56.0", + rust_version=( + ">=1.64.0" + if os.environ.get("BCRYPT_ALLOW_RUST_163", "0") != "0" + else ">=1.63.0" + ), ), ], ) @@ -66,7 +71,8 @@ except: 1) Upgrade to the latest pip and try again. This will fix errors for most users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip 2) Ensure you have a recent Rust toolchain installed. bcrypt requires - rustc >= 1.56.0. + rustc >= 1.64.0. (1.63 may be used by setting the BCRYPT_ALLOW_RUST_163 + environment variable) """ ) print(f" Python: {'.'.join(str(v) for v in sys.version_info[:3])}") diff --git a/src/_bcrypt/src/lib.rs b/src/_bcrypt/src/lib.rs index f46a4c0..6e47475 100644 --- a/src/_bcrypt/src/lib.rs +++ b/src/_bcrypt/src/lib.rs @@ -183,7 +183,7 @@ fn _bcrypt(_py: pyo3::Python<'_>, m: &pyo3::types::PyModule) -> pyo3::PyResult<( m.add("__uri__", "https://github.com/pyca/bcrypt/")?; // When updating this, also update pyproject.toml - m.add("__version__", "4.0.1")?; + m.add("__version__", "4.1.0")?; let author = "The Python Cryptographic Authority developers"; m.add("__author__", author)?;