Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pyca/bcrypt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.2.1
Choose a base ref
...
head repository: pyca/bcrypt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.3.0
Choose a head ref
Loading
14 changes: 14 additions & 0 deletions .github/config/macos-pkg-choices-freethreaded.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>org.python.Python.PythonTFramework-3.13</string>
</dict>
</array>
</plist>
97 changes: 48 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -14,25 +14,21 @@ jobs:
fail-fast: false
matrix:
PYTHON:
- {VERSION: "3.7", TOXENV: "py37"}
- {VERSION: "3.13", TOXENV: "py313"}
- {VERSION: "3.8", NOXSESSION: "tests"}
- {VERSION: "3.13", NOXSESSION: "tests"}
- {VERSION: "3.13t", NOXSESSION: "tests"}
MACOS:
- macos-13
- macos-latest
exclude:
# We only test latest Python on arm64. py37 won't work since there's
# no universal2 binary
- PYTHON: {VERSION: "3.7", TOXENV: "py37"}
MACOS: macos-latest
name: "Python ${{ matrix.PYTHON.VERSION }} on ${{ matrix.MACOS }}"
steps:
- uses: actions/checkout@v4.2.2
- name: Setup python
id: setup-python
uses: actions/setup-python@v5.3.0
uses: quansight-labs/setup-python@v5.4.0
with:
python-version: ${{ matrix.PYTHON.VERSION }}
- uses: actions/cache@v4.1.2
- uses: actions/cache@v4.2.1
timeout-minutes: 5
with:
path: |
@@ -41,11 +37,11 @@ jobs:
~/.cargo/registry/src/
~/.cargo/git/db/
src/_bcrypt/target/
key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: pip install tox
- run: tox
key: ${{ runner.os }}-${{ matrix.PYTHON.VERSION }}-${{ steps.setup-python.outputs.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: pip install nox
- run: nox -v
env:
TOXENV: ${{ matrix.PYTHON.TOXENV }}
NOXSESSION: ${{ matrix.PYTHON.NOXSESSION }}
CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }}

windows:
@@ -56,18 +52,19 @@ jobs:
- {ARCH: 'x86', WINDOWS: 'win32', RUST_TRIPLE: 'i686-pc-windows-msvc'}
- {ARCH: 'x64', WINDOWS: 'win64', RUST_TRIPLE: 'x86_64-pc-windows-msvc'}
PYTHON:
- {VERSION: "3.7", TOXENV: "py37"}
- {VERSION: "3.13", TOXENV: "py313"}
- {VERSION: "3.8", NOXSESSION: "tests"}
- {VERSION: "3.13", NOXSESSION: "tests"}
- {VERSION: "3.13t", NOXSESSION: "tests"}
name: "Python ${{ matrix.PYTHON.VERSION }} on ${{ matrix.WINDOWS.WINDOWS }}"
steps:
- uses: actions/checkout@v4.2.2
- name: Setup python
id: setup-python
uses: actions/setup-python@v5.3.0
uses: quansight-labs/setup-python@v5.4.0
with:
python-version: ${{ matrix.PYTHON.VERSION }}
architecture: ${{ matrix.WINDOWS.ARCH }}
- uses: actions/cache@v4.1.2
- uses: actions/cache@v4.2.1
timeout-minutes: 5
with:
path: |
@@ -77,43 +74,44 @@ jobs:
~/.cargo/registry/src/
~/.cargo/git/db/
src/_bcrypt/target/
key: ${{ runner.os }}-${{ matrix.WINDOWS.ARCH }}-${{ steps.setup-python.outputs.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-${{ matrix.WINDOWS.ARCH }}-${{ matrix.PYTHON.VERSION }}-${{ steps.setup-python.outputs.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- run: pip install tox
- run: tox
- run: pip install nox
- run: nox -v
env:
TOXENV: ${{ matrix.PYTHON.TOXENV }}
NOXSESSION: ${{ matrix.PYTHON.NOXSESSION }}
CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }}
linux:
runs-on: ubuntu-22.04
strategy:
matrix:
PYTHON:
- {VERSION: "3.13", TOXENV: "pep8,packaging"}
- {VERSION: "3.13", TOXENV: "mypy"}
- {VERSION: "3.7", TOXENV: "py37"}
- {VERSION: "3.8", TOXENV: "py38"}
- {VERSION: "3.9", TOXENV: "py39"}
- {VERSION: "3.10", TOXENV: "py310"}
- {VERSION: "3.11", TOXENV: "py311"}
- {VERSION: "3.12", TOXENV: "py312"}
- {VERSION: "3.13", TOXENV: "py313"}
- {VERSION: "pypy-3.9", TOXENV: "pypy3"}
- {VERSION: "pypy-3.10", TOXENV: "pypy3"}
- {VERSION: "3.13", NOXSESSION: "pep8,packaging"}
- {VERSION: "3.13", NOXSESSION: "mypy"}
- {VERSION: "3.8", NOXSESSION: "tests"}
- {VERSION: "3.9", NOXSESSION: "tests"}
- {VERSION: "3.10", NOXSESSION: "tests"}
- {VERSION: "3.11", NOXSESSION: "tests"}
- {VERSION: "3.12", NOXSESSION: "tests"}
- {VERSION: "3.13", NOXSESSION: "tests"}
- {VERSION: "3.13t", NOXSESSION: "tests"}
- {VERSION: "pypy-3.9", NOXSESSION: "tests"}
- {VERSION: "pypy-3.10", NOXSESSION: "tests"}
- {VERSION: "pypy-3.11", NOXSESSION: "tests"}

# MSRV
- {VERSION: "3.13", TOXENV: "py313", RUST_VERSION: "1.64.0"}
- {VERSION: "3.13", TOXENV: "py313", RUST_VERSION: "beta"}
- {VERSION: "3.13", TOXENV: "py313", RUST_VERSION: "nightly"}
name: "${{ matrix.PYTHON.TOXENV }} on linux, Rust ${{ matrix.PYTHON.RUST_VERSION || 'stable' }}"
- {VERSION: "3.13", NOXSESSION: "tests", RUST_VERSION: "1.64.0"}
- {VERSION: "3.13", NOXSESSION: "tests", RUST_VERSION: "beta"}
- {VERSION: "3.13", NOXSESSION: "tests", RUST_VERSION: "nightly"}
name: "${{ matrix.PYTHON.VERSION }} on linux, Rust ${{ matrix.PYTHON.RUST_VERSION || 'stable' }}"
steps:
- uses: actions/checkout@v4.2.2
- name: Setup python
id: setup-python
uses: actions/setup-python@v5.3.0
uses: quansight-labs/setup-python@v5.4.0
with:
python-version: ${{ matrix.PYTHON.VERSION }}
- uses: actions/cache@v4.1.2
- uses: actions/cache@v4.2.1
timeout-minutes: 5
with:
path: |
@@ -124,14 +122,14 @@ jobs:
~/.cargo/git/db/
src/_bcrypt/target/
key: ${{ runner.os }}-${{ matrix.PYTHON.VERSION }}-${{ steps.setup-python.outputs.python-version }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
with:
toolchain: ${{ matrix.PYTHON.RUST_VERSION || 'stable' }}

- run: pip install tox
- run: tox
- run: pip install nox
- run: nox -v
env:
TOXENV: ${{ matrix.PYTHON.TOXENV }}
NOXSESSION: ${{ matrix.PYTHON.NOXSESSION }}
CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }}

linux-distros:
@@ -140,10 +138,11 @@ jobs:
strategy:
matrix:
IMAGE:
- {IMAGE: "alpine", TOXENV: "py312", RUNNER: "ubuntu-latest"}
- {IMAGE: "alpine:aarch64", TOXENV: "py312", RUNNER: [self-hosted, Linux, ARM64]}
- {IMAGE: "ubuntu-rolling:aarch64", TOXENV: "py312", RUNNER: [self-hosted, Linux, ARM64]}
name: "${{ matrix.IMAGE.TOXENV }} on ${{ matrix.IMAGE.IMAGE }}"
- {IMAGE: "alpine", NOXSESSION: "tests", RUNNER: "ubuntu-latest"}
- {IMAGE: "alpine:aarch64", NOXSESSION: "tests", RUNNER: "ubuntu-24.04-arm"}
- {IMAGE: "ubuntu-rolling:aarch64", NOXSESSION: "tests", RUNNER: "ubuntu-24.04-arm"}
- {IMAGE: "ubuntu-rolling:armv7l", NOXSESSION: "tests", RUNNER: "ubuntu-24.04-arm"}
name: "${{ matrix.IMAGE.NOXSESSION }} on ${{ matrix.IMAGE.IMAGE }}"
steps:
- name: Ridiculous alpine workaround for actions support on arm64
run: |
@@ -156,10 +155,10 @@ jobs:
- uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- run: /venv/bin/pip install tox
- run: '/venv/bin/tox'
- run: /venv/bin/pip install nox
- run: /venv/bin/nox -v
env:
TOXENV: ${{ matrix.IMAGE.TOXENV }}
NOXSESSION: ${{ matrix.IMAGE.NOXSESSION }}
RUSTUP_HOME: /root/.rustup
CARGO_TARGET_DIR: ${{ format('{0}/src/_bcrypt/target/', github.workspace) }}

4 changes: 2 additions & 2 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ jobs:
echo "PYPI_URL=https://test.pypi.org/legacy/" >> $GITHUB_ENV
if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'testpypi'
- uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6
- uses: dawidd6/action-download-artifact@20319c5641d495c8a52e688b7dc5fada6c3a9fbc # v8
with:
path: tmpdist/
run_id: ${{ github.event.inputs.run_id || github.event.workflow_run.id }}
@@ -49,7 +49,7 @@ jobs:
find tmpdist/ -type f -name 'bcrypt*' -exec mv {} dist/ \;
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
with:
repository-url: ${{ env.PYPI_URL }}
skip-existing: true
Loading