Skip to content

Commit 4c5f16a

Browse files
authored
Bump pyo3 version (#1062)
1 parent 921ea94 commit 4c5f16a

5 files changed

Lines changed: 26 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
windows:
4848
runs-on: windows-latest
4949
strategy:
50+
fail-fast: false
5051
matrix:
5152
WINDOWS:
5253
- {ARCH: 'x86', WINDOWS: 'win32', RUST_TRIPLE: 'i686-pc-windows-msvc'}
@@ -84,6 +85,7 @@ jobs:
8485
linux:
8586
runs-on: ubuntu-22.04
8687
strategy:
88+
fail-fast: false
8789
matrix:
8890
PYTHON:
8991
- {VERSION: "3.13", NOXSESSION: "pep8,packaging"}
@@ -100,7 +102,7 @@ jobs:
100102
- {VERSION: "pypy-3.11", NOXSESSION: "tests"}
101103

102104
# MSRV
103-
- {VERSION: "3.13", NOXSESSION: "tests", RUST_VERSION: "1.64.0"}
105+
- {VERSION: "3.13", NOXSESSION: "tests", RUST_VERSION: "1.74.0"}
104106
- {VERSION: "3.13", NOXSESSION: "tests", RUST_VERSION: "beta"}
105107
- {VERSION: "3.13", NOXSESSION: "tests", RUST_VERSION: "nightly"}
106108
name: "${{ matrix.PYTHON.VERSION }} on linux, Rust ${{ matrix.PYTHON.RUST_VERSION || 'stable' }}"
@@ -141,6 +143,7 @@ jobs:
141143
- /staticnodehost/20:/__e/node20:ro,rshared
142144
- /staticnodehost/24:/__e/node24:ro,rshared
143145
strategy:
146+
fail-fast: false
144147
matrix:
145148
IMAGE:
146149
- {IMAGE: "alpine", NOXSESSION: "tests", RUNNER: "ubuntu-latest"}
@@ -172,6 +175,7 @@ jobs:
172175
runs-on: ${{ matrix.IMAGE.RUNNER }}
173176
container: ghcr.io/pyca/cryptography-runner-${{ matrix.IMAGE.IMAGE }}
174177
strategy:
178+
fail-fast: false
175179
matrix:
176180
IMAGE:
177181
- {IMAGE: "ubuntu-rolling:aarch64", NOXSESSION: "tests", RUNNER: "ubuntu-24.04-arm"}

README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ While bcrypt remains an acceptable choice for password storage, depending on you
5151
Changelog
5252
=========
5353

54+
Unreleased
55+
----------
56+
57+
* Bumped MSRV to 1.74.
58+
5459
4.3.0
5560
-----
5661

src/_bcrypt/Cargo.lock

Lines changed: 12 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/_bcrypt/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ version = "0.1.0"
44
authors = ["The bcrypt developers <cryptography-dev@python.org>"]
55
edition = "2018"
66
# This specifies the MSRV
7-
rust-version = "1.64.0"
7+
rust-version = "1.74.0"
88
publish = false
99

1010
[dependencies]
11-
pyo3 = { version = "0.25.1", features = ["abi3"] }
11+
pyo3 = { version = "0.26", features = ["abi3"] }
1212
bcrypt = "0.17"
1313
bcrypt-pbkdf = "0.10.0"
1414
base64 = "0.22.1"

src/_bcrypt/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ fn hashpw<'p>(
126126
.map_err(|_| pyo3::exceptions::PyValueError::new_err("Invalid salt"))?;
127127

128128
let hashed = py
129-
.allow_threads(|| bcrypt::hash_with_salt(password, cost, raw_salt))
129+
.detach(|| bcrypt::hash_with_salt(password, cost, raw_salt))
130130
.map_err(|_| pyo3::exceptions::PyValueError::new_err("Invalid salt"))?;
131131
Ok(pyo3::types::PyBytes::new(
132132
py,
@@ -183,7 +183,7 @@ fn kdf<'p>(
183183
}
184184

185185
pyo3::types::PyBytes::new_with(py, desired_key_bytes, |output| {
186-
py.allow_threads(|| {
186+
py.detach(|| {
187187
bcrypt_pbkdf::bcrypt_pbkdf(password, salt, rounds, output).unwrap();
188188
});
189189
Ok(())

0 commit comments

Comments
 (0)