feat(pyproject_toml): enabling python 3.7 support so this will work on my raspberry pi
This commit is contained in:
parent
ae49889128
commit
1a3b581ef0
3 changed files with 17 additions and 7 deletions
|
|
@ -4,7 +4,7 @@ build-backend = "maturin"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "szurubooru_client"
|
name = "szurubooru_client"
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.7"
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Programming Language :: Rust",
|
"Programming Language :: Rust",
|
||||||
"Programming Language :: Python :: Implementation :: CPython",
|
"Programming Language :: Python :: Implementation :: CPython",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
Jinja2==3.1.4
|
Jinja2==3.1.4
|
||||||
MarkupSafe==2.1.5
|
MarkupSafe==2.1.5
|
||||||
maturin==1.7.0
|
maturin==1.7.0
|
||||||
pdoc==14.6.0
|
|
||||||
Pygments==2.18.0
|
|
||||||
loguru==0.7.2
|
loguru==0.7.2
|
||||||
|
|
|
||||||
|
|
@ -336,8 +336,14 @@ def test_downloads(client):
|
||||||
f3_hasher = hashlib.new("sha1")
|
f3_hasher = hashlib.new("sha1")
|
||||||
|
|
||||||
with open("../folly3.jpg", "rb") as f:
|
with open("../folly3.jpg", "rb") as f:
|
||||||
while (byte := f.read(1)):
|
#while (byte := f.read(1)):
|
||||||
|
# f3_hasher.update(byte)
|
||||||
|
while True:
|
||||||
|
byte = f.read(1)
|
||||||
|
if len(byte):
|
||||||
f3_hasher.update(byte)
|
f3_hasher.update(byte)
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
f3_post = client.list_posts([anonymous_token("folly3")]).results[0]
|
f3_post = client.list_posts([anonymous_token("folly3")]).results[0]
|
||||||
with tempfile.TemporaryDirectory() as tmpdirname:
|
with tempfile.TemporaryDirectory() as tmpdirname:
|
||||||
|
|
@ -347,8 +353,14 @@ def test_downloads(client):
|
||||||
client.download_image_to_path(f3_post.id, fname)
|
client.download_image_to_path(f3_post.id, fname)
|
||||||
dl_hasher = hashlib.new("sha1")
|
dl_hasher = hashlib.new("sha1")
|
||||||
with open(fname, "rb") as f:
|
with open(fname, "rb") as f:
|
||||||
while (byte := f.read(1)):
|
#while (byte := f.read(1)):
|
||||||
|
# dl_hasher.update(byte)
|
||||||
|
while True:
|
||||||
|
byte = f.read(1)
|
||||||
|
if len(byte):
|
||||||
dl_hasher.update(byte)
|
dl_hasher.update(byte)
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
assert f3_hasher.hexdigest() == dl_hasher.hexdigest()
|
assert f3_hasher.hexdigest() == dl_hasher.hexdigest()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue