From ae49889128d49dc5e034fd7f290760abaaacecba Mon Sep 17 00:00:00 2001 From: Scott Lyons Date: Thu, 5 Sep 2024 17:04:58 -0700 Subject: [PATCH 1/4] ci(ci_yaml): fixing crates.io publishing step --- .github/workflows/CI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index eb04d6d..01ca7c1 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -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 }} From 1a3b581ef0109e339d273a44b0474fcfa5a15f30 Mon Sep 17 00:00:00 2001 From: Scott Lyons Date: Thu, 5 Sep 2024 21:44:14 -0700 Subject: [PATCH 2/4] feat(pyproject_toml): enabling python 3.7 support so this will work on my raspberry pi --- szurubooru-client/pyproject.toml | 2 +- tests/python-sync/requirements.txt | 2 -- tests/python-sync/test.py | 20 ++++++++++++++++---- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/szurubooru-client/pyproject.toml b/szurubooru-client/pyproject.toml index 8c91a5d..ddaa501 100644 --- a/szurubooru-client/pyproject.toml +++ b/szurubooru-client/pyproject.toml @@ -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", diff --git a/tests/python-sync/requirements.txt b/tests/python-sync/requirements.txt index aa5030d..8a059b4 100644 --- a/tests/python-sync/requirements.txt +++ b/tests/python-sync/requirements.txt @@ -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 diff --git a/tests/python-sync/test.py b/tests/python-sync/test.py index b0c6cef..3f7f39b 100644 --- a/tests/python-sync/test.py +++ b/tests/python-sync/test.py @@ -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: @@ -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() From 384bc155d01983c5eb7b6232752c7f6d00b0bb65 Mon Sep 17 00:00:00 2001 From: Scott Lyons Date: Thu, 5 Sep 2024 21:44:54 -0700 Subject: [PATCH 3/4] =?UTF-8?q?bump:=20version=200.5.0=20=E2=86=92=200.6.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- szurubooru-client/CHANGELOG.md | 6 ++++++ szurubooru-client/Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/szurubooru-client/CHANGELOG.md b/szurubooru-client/CHANGELOG.md index 45e9863..472eaa4 100644 --- a/szurubooru-client/CHANGELOG.md +++ b/szurubooru-client/CHANGELOG.md @@ -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 diff --git a/szurubooru-client/Cargo.toml b/szurubooru-client/Cargo.toml index ab1e3da..051d500 100644 --- a/szurubooru-client/Cargo.toml +++ b/szurubooru-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "szurubooru-client" -version = "0.5.0" +version = "0.6.0" edition = "2021" authors = ["Scott Lyons "] description = "A wrapper around the Szurubooru API, including type-safe Query and Sort tokens" From 4ad2c9bf593d9b19719c98a367f06920e5d28eb5 Mon Sep 17 00:00:00 2001 From: Scott Lyons Date: Thu, 5 Sep 2024 21:45:28 -0700 Subject: [PATCH 4/4] docs(changelog): updating changelog for 0.6 --- CHANGELOG.md | 6 ++++++ Cargo.lock | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45e9863..472eaa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Cargo.lock b/Cargo.lock index 74a8f6a..9cbd504 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1590,7 +1590,7 @@ dependencies = [ [[package]] name = "szurubooru-client" -version = "0.5.0" +version = "0.6.0" dependencies = [ "base64", "bytes",