pyzotero 1.6.10__py3-none-any.whl → 1.6.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- _version.py +2 -2
- pyzotero/zotero.py +4 -4
- {pyzotero-1.6.10.dist-info → pyzotero-1.6.11.dist-info}/METADATA +1 -1
- pyzotero-1.6.11.dist-info/RECORD +11 -0
- {pyzotero-1.6.10.dist-info → pyzotero-1.6.11.dist-info}/WHEEL +1 -1
- pyzotero-1.6.10.dist-info/RECORD +0 -11
- {pyzotero-1.6.10.dist-info → pyzotero-1.6.11.dist-info}/licenses/AUTHORS +0 -0
- {pyzotero-1.6.10.dist-info → pyzotero-1.6.11.dist-info}/licenses/LICENSE.md +0 -0
- {pyzotero-1.6.10.dist-info → pyzotero-1.6.11.dist-info}/top_level.txt +0 -0
_version.py
CHANGED
pyzotero/zotero.py
CHANGED
|
@@ -800,7 +800,7 @@ class Zotero:
|
|
|
800
800
|
if self.snapshot:
|
|
801
801
|
self.snapshot = False
|
|
802
802
|
pth += ".zip"
|
|
803
|
-
with Path.open(
|
|
803
|
+
with Path(pth).open("wb") as f:
|
|
804
804
|
f.write(file)
|
|
805
805
|
|
|
806
806
|
@retrieve
|
|
@@ -1854,7 +1854,7 @@ class Zupload:
|
|
|
1854
1854
|
if Path(str(self.basedir.joinpath(templt["filename"]))).is_file():
|
|
1855
1855
|
try:
|
|
1856
1856
|
# if it is a file, try to open it, and catch the error
|
|
1857
|
-
with Path
|
|
1857
|
+
with Path(str(self.basedir.joinpath(templt["filename"]))).open():
|
|
1858
1858
|
pass
|
|
1859
1859
|
except OSError:
|
|
1860
1860
|
msg = f"The file at {self.basedir.joinpath(templt['filename'])!s} couldn't be opened or found."
|
|
@@ -1914,7 +1914,7 @@ class Zupload:
|
|
|
1914
1914
|
"""Step 1: get upload authorisation for a file"""
|
|
1915
1915
|
mtypes = mimetypes.guess_type(attachment)
|
|
1916
1916
|
digest = hashlib.md5() # noqa: S324
|
|
1917
|
-
with Path.open(
|
|
1917
|
+
with Path(attachment).open("rb") as att:
|
|
1918
1918
|
for chunk in iter(lambda: att.read(8192), b""):
|
|
1919
1919
|
digest.update(chunk)
|
|
1920
1920
|
auth_headers = {"Content-Type": "application/x-www-form-urlencoded"}
|
|
@@ -1961,7 +1961,7 @@ class Zupload:
|
|
|
1961
1961
|
upload_list = [("key", upload_dict.pop("key"))]
|
|
1962
1962
|
for key, value in upload_dict.items():
|
|
1963
1963
|
upload_list.append((key, value))
|
|
1964
|
-
upload_list.append(("file", Path.open(
|
|
1964
|
+
upload_list.append(("file", Path(attachment).open("rb").read()))
|
|
1965
1965
|
upload_pairs = tuple(upload_list)
|
|
1966
1966
|
try:
|
|
1967
1967
|
self.zinstance._check_backoff()
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
_version.py,sha256=pZ4Qp5MSQf18hj8ih0v-aRGwWAkzA1vKwTKvKG-_5sc,513
|
|
2
|
+
pyzotero/__init__.py,sha256=5QI4Jou9L-YJAf_oN9TgRXVKgt_Unc39oADo2Ch8bLI,243
|
|
3
|
+
pyzotero/filetransport.py,sha256=umLik1LLmrpgaNmyjvtBoqqcaMgIq79PYsTvN5vG-gY,5530
|
|
4
|
+
pyzotero/zotero.py,sha256=kBbLA9yXvSEpoztD-kw4M7JYGp2pzP-7GHWwn8eTJlk,76080
|
|
5
|
+
pyzotero/zotero_errors.py,sha256=6obx9-pBO0z1bxt33vuzDluELvA5kSLCsfc-uGc3KNw,2660
|
|
6
|
+
pyzotero-1.6.11.dist-info/licenses/AUTHORS,sha256=ZMicxg7lRScOYbxzMPznlzMbmrFIUIHwg-NvljEMbRQ,110
|
|
7
|
+
pyzotero-1.6.11.dist-info/licenses/LICENSE.md,sha256=bhy1CPMj1zWffD9YifFmSeBzPylsrhb1qP8OCEx5Etw,1550
|
|
8
|
+
pyzotero-1.6.11.dist-info/METADATA,sha256=G9f32ijgLm4OCTREYkaHMA_lXspX39O7N-3W5n0gc78,7471
|
|
9
|
+
pyzotero-1.6.11.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
10
|
+
pyzotero-1.6.11.dist-info/top_level.txt,sha256=BOPNkPk5VtNDCy_li7Xftx6k0zG8STGxh-KgckcxLEw,18
|
|
11
|
+
pyzotero-1.6.11.dist-info/RECORD,,
|
pyzotero-1.6.10.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
_version.py,sha256=OJVhA57HANUDqkAHd3ZCn5-ZlvWQIP0l_IKmHcQrfms,513
|
|
2
|
-
pyzotero/__init__.py,sha256=5QI4Jou9L-YJAf_oN9TgRXVKgt_Unc39oADo2Ch8bLI,243
|
|
3
|
-
pyzotero/filetransport.py,sha256=umLik1LLmrpgaNmyjvtBoqqcaMgIq79PYsTvN5vG-gY,5530
|
|
4
|
-
pyzotero/zotero.py,sha256=AKqVOgElcW7j3lae1yTF_EmJ6rK2tzdvMW4TOFdM_dE,76078
|
|
5
|
-
pyzotero/zotero_errors.py,sha256=6obx9-pBO0z1bxt33vuzDluELvA5kSLCsfc-uGc3KNw,2660
|
|
6
|
-
pyzotero-1.6.10.dist-info/licenses/AUTHORS,sha256=ZMicxg7lRScOYbxzMPznlzMbmrFIUIHwg-NvljEMbRQ,110
|
|
7
|
-
pyzotero-1.6.10.dist-info/licenses/LICENSE.md,sha256=bhy1CPMj1zWffD9YifFmSeBzPylsrhb1qP8OCEx5Etw,1550
|
|
8
|
-
pyzotero-1.6.10.dist-info/METADATA,sha256=wvUszhp8agewknBv2R0oczSsryunCfxhYhOaRrmD6pc,7471
|
|
9
|
-
pyzotero-1.6.10.dist-info/WHEEL,sha256=tTnHoFhvKQHCh4jz3yCn0WPTYIy7wXx3CJtJ7SJGV7c,91
|
|
10
|
-
pyzotero-1.6.10.dist-info/top_level.txt,sha256=BOPNkPk5VtNDCy_li7Xftx6k0zG8STGxh-KgckcxLEw,18
|
|
11
|
-
pyzotero-1.6.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|