Skip to content

Commit

Permalink
add py313 and change bumpversion to bump-my-version
Browse files Browse the repository at this point in the history
bump pyo3 to ~0.23 and fix resulting errors
  • Loading branch information
pacrob committed Jan 17, 2025
1 parent 9125ad8 commit a128000
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 24 deletions.
10 changes: 0 additions & 10 deletions .bumpversion.cfg

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
python-version: [3.8, 3.9, '3.10', '3.11', '3.12', '3.13']
steps:
- name: checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
python-version: [3.8, 3.9, '3.10', '3.11', '3.12', '3.13']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: checkout
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ version = "0.3.0"
authors = ["David Sanders <[email protected]>"]
edition = "2018"
license = "MIT"
repository = "https://github.com/davesque/blake2b-py"
repository = "https://github.com/ethereum/blake2b-py"
description = "Blake2b hashing in Rust with Python bindings."

[dependencies]
pyo3 = { version = "~0.16", features = ["extension-module"] }
pyo3 = { version = "~0.23", features = ["extension-module"] }

[dev-dependencies]
hex = "~0.4"
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ clean:
rm -rf *.egg-info build dist target pip-wheel-metadata

CURRENT_SIGN_SETTING := $(shell git config commit.gpgSign)
.PHONY: bumpversion
bumpversion:
.PHONY: bump-my-version
bump-my-version:
git config commit.gpgSign true
bumpversion $(bump)
bump-my-version $(bump)
git config commit.gpgSign "$(CURRENT_SIGN_SETTING)"
git push upstream && git push upstream --tags

Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
[build-system]
requires = ["maturin>=1.0,<2"]
build-backend = "maturin"

[tool.bumpversion]
current_version = "0.3.0"
commit = true
tag = true

[[tool.bumpversion.files]]
filename = "Cargo.toml"
search = "name = \"blake2b-py\"\nversion = \"{current_version}\""
replace = "name = \"blake2b-py\"\nversion = \"{new_version}\""
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pytest
pytest-benchmark
hypothesis
maturin
bumpversion
bump-my-version
twine
11 changes: 5 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,10 @@ fn decode_and_compress(py: Python, input: Vec<u8>) -> PyResult<PyObject> {
}

/// Functions for calculating blake2b hashes.
#[pymodule]
fn blake2b(_py: Python, m: &PyModule) -> PyResult<()> {
m.add_wrapped(wrap_pyfunction!(decode_parameters))?;
m.add_wrapped(wrap_pyfunction!(compress))?;
m.add_wrapped(wrap_pyfunction!(decode_and_compress))?;

#[pymodule(name = "blake2b")]
fn blake2b_py(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_function(wrap_pyfunction!(decode_parameters, m)?)?;
m.add_function(wrap_pyfunction!(compress, m)?)?;
m.add_function(wrap_pyfunction!(decode_and_compress, m)?)?;
Ok(())
}

0 comments on commit a128000

Please sign in to comment.