Skip to content

Commit

Permalink
Merge pull request #3 from slyons/dev/py37
Browse files Browse the repository at this point in the history
Adding support for Python 3.7
  • Loading branch information
slyons authored Sep 6, 2024
2 parents 13c1fae + 4ad2c9b commit 5786aad
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Cargo publish
run: cargo publish --token ${CRATES_TOKEN}
run: cargo publish -p szurubooru-client --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v0.6.0 (2024-09-05)

### Feat

- **pyproject_toml**: enabling python 3.7 support so this will work on my raspberry pi

## v0.5.0 (2024-09-05)

### Feat
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions szurubooru-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v0.6.0 (2024-09-05)

### Feat

- **pyproject_toml**: enabling python 3.7 support so this will work on my raspberry pi

## v0.5.0 (2024-09-05)

### Feat
Expand Down
2 changes: 1 addition & 1 deletion szurubooru-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "szurubooru-client"
version = "0.5.0"
version = "0.6.0"
edition = "2021"
authors = ["Scott Lyons <[email protected]>"]
description = "A wrapper around the Szurubooru API, including type-safe Query and Sort tokens"
Expand Down
2 changes: 1 addition & 1 deletion szurubooru-client/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "szurubooru_client"
requires-python = ">=3.8"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
Expand Down
2 changes: 0 additions & 2 deletions tests/python-sync/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Jinja2==3.1.4
MarkupSafe==2.1.5
maturin==1.7.0
pdoc==14.6.0
Pygments==2.18.0
loguru==0.7.2
20 changes: 16 additions & 4 deletions tests/python-sync/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,14 @@ def test_downloads(client):
f3_hasher = hashlib.new("sha1")

with open("../folly3.jpg", "rb") as f:
while (byte := f.read(1)):
f3_hasher.update(byte)
#while (byte := f.read(1)):
# f3_hasher.update(byte)
while True:
byte = f.read(1)
if len(byte):
f3_hasher.update(byte)
else:
break

f3_post = client.list_posts([anonymous_token("folly3")]).results[0]
with tempfile.TemporaryDirectory() as tmpdirname:
Expand All @@ -347,8 +353,14 @@ def test_downloads(client):
client.download_image_to_path(f3_post.id, fname)
dl_hasher = hashlib.new("sha1")
with open(fname, "rb") as f:
while (byte := f.read(1)):
dl_hasher.update(byte)
#while (byte := f.read(1)):
# dl_hasher.update(byte)
while True:
byte = f.read(1)
if len(byte):
dl_hasher.update(byte)
else:
break

assert f3_hasher.hexdigest() == dl_hasher.hexdigest()

Expand Down

0 comments on commit 5786aad

Please sign in to comment.