pyzotero 1.6.9__tar.gz → 1.6.11__tar.gz

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.
Files changed (61) hide show
  1. {pyzotero-1.6.9 → pyzotero-1.6.11}/PKG-INFO +3 -2
  2. {pyzotero-1.6.9 → pyzotero-1.6.11}/src/_version.py +9 -4
  3. {pyzotero-1.6.9 → pyzotero-1.6.11}/src/pyzotero/zotero.py +9 -9
  4. {pyzotero-1.6.9 → pyzotero-1.6.11}/src/pyzotero.egg-info/PKG-INFO +3 -2
  5. {pyzotero-1.6.9 → pyzotero-1.6.11}/.coveragerc +0 -0
  6. {pyzotero-1.6.9 → pyzotero-1.6.11}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  7. {pyzotero-1.6.9 → pyzotero-1.6.11}/.github/ISSUE_TEMPLATE/usage_question.md +0 -0
  8. {pyzotero-1.6.9 → pyzotero-1.6.11}/.github/dependabot.yml +0 -0
  9. {pyzotero-1.6.9 → pyzotero-1.6.11}/.github/pull_request_template.md +0 -0
  10. {pyzotero-1.6.9 → pyzotero-1.6.11}/.github/workflows/tests.yml +0 -0
  11. {pyzotero-1.6.9 → pyzotero-1.6.11}/.gitignore +0 -0
  12. {pyzotero-1.6.9 → pyzotero-1.6.11}/.readthedocs.yaml +0 -0
  13. {pyzotero-1.6.9 → pyzotero-1.6.11}/AUTHORS +0 -0
  14. {pyzotero-1.6.9 → pyzotero-1.6.11}/CITATION.cff +0 -0
  15. {pyzotero-1.6.9 → pyzotero-1.6.11}/CONTRIBUTING.md +0 -0
  16. {pyzotero-1.6.9 → pyzotero-1.6.11}/CONTRIBUTORS.md +0 -0
  17. {pyzotero-1.6.9 → pyzotero-1.6.11}/LICENSE.md +0 -0
  18. {pyzotero-1.6.9 → pyzotero-1.6.11}/README.md +0 -0
  19. {pyzotero-1.6.9 → pyzotero-1.6.11}/__init__.py +0 -0
  20. {pyzotero-1.6.9 → pyzotero-1.6.11}/doc/Makefile +0 -0
  21. {pyzotero-1.6.9 → pyzotero-1.6.11}/doc/_templates/layout.html +0 -0
  22. {pyzotero-1.6.9 → pyzotero-1.6.11}/doc/cat.png +0 -0
  23. {pyzotero-1.6.9 → pyzotero-1.6.11}/doc/conf.py +0 -0
  24. {pyzotero-1.6.9 → pyzotero-1.6.11}/doc/index.rst +0 -0
  25. {pyzotero-1.6.9 → pyzotero-1.6.11}/dump_contributors.py +0 -0
  26. {pyzotero-1.6.9 → pyzotero-1.6.11}/example/.gitignore +0 -0
  27. {pyzotero-1.6.9 → pyzotero-1.6.11}/example/local_base_use.py +0 -0
  28. {pyzotero-1.6.9 → pyzotero-1.6.11}/example/local_copy_pdf.py +0 -0
  29. {pyzotero-1.6.9 → pyzotero-1.6.11}/example/local_get_item_detail.py +0 -0
  30. {pyzotero-1.6.9 → pyzotero-1.6.11}/example/local_search_title.py +0 -0
  31. {pyzotero-1.6.9 → pyzotero-1.6.11}/pyproject.toml +0 -0
  32. {pyzotero-1.6.9 → pyzotero-1.6.11}/setup.cfg +0 -0
  33. {pyzotero-1.6.9 → pyzotero-1.6.11}/setup.py +0 -0
  34. {pyzotero-1.6.9 → pyzotero-1.6.11}/src/pyzotero/__init__.py +0 -0
  35. {pyzotero-1.6.9 → pyzotero-1.6.11}/src/pyzotero/filetransport.py +0 -0
  36. {pyzotero-1.6.9 → pyzotero-1.6.11}/src/pyzotero/zotero_errors.py +0 -0
  37. {pyzotero-1.6.9 → pyzotero-1.6.11}/src/pyzotero.egg-info/SOURCES.txt +0 -0
  38. {pyzotero-1.6.9 → pyzotero-1.6.11}/src/pyzotero.egg-info/dependency_links.txt +0 -0
  39. {pyzotero-1.6.9 → pyzotero-1.6.11}/src/pyzotero.egg-info/requires.txt +0 -0
  40. {pyzotero-1.6.9 → pyzotero-1.6.11}/src/pyzotero.egg-info/top_level.txt +0 -0
  41. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/__init__.py +0 -0
  42. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/attachments_doc.json +0 -0
  43. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/citation_doc.xml +0 -0
  44. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/collection_doc.json +0 -0
  45. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/collection_tags.json +0 -0
  46. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/collection_versions.json +0 -0
  47. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/collections_doc.json +0 -0
  48. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/creation_doc.json +0 -0
  49. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/groups_doc.json +0 -0
  50. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/item_doc.json +0 -0
  51. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/item_fields.json +0 -0
  52. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/item_file.pdf +0 -0
  53. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/item_template.json +0 -0
  54. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/item_types.json +0 -0
  55. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/item_versions.json +0 -0
  56. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/items_doc.json +0 -0
  57. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/keys_doc.txt +0 -0
  58. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/api_responses/tags_doc.json +0 -0
  59. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/test_async.py +0 -0
  60. {pyzotero-1.6.9 → pyzotero-1.6.11}/tests/test_zotero.py +0 -0
  61. {pyzotero-1.6.9 → pyzotero-1.6.11}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: pyzotero
3
- Version: 1.6.9
3
+ Version: 1.6.11
4
4
  Summary: Python wrapper for the Zotero API
5
5
  Author-email: Stephan Hügel <urschrei@gmail.com>
6
6
  License: # Blue Oak Model License
@@ -71,6 +71,7 @@ Requires-Dist: python-dateutil; extra == "test"
71
71
  Requires-Dist: ipython; extra == "test"
72
72
  Requires-Dist: pytest-asyncio; extra == "test"
73
73
  Requires-Dist: pytest-cov>=6.0.0; extra == "test"
74
+ Dynamic: license-file
74
75
 
75
76
  [![Supported Python versions](https://img.shields.io/pypi/pyversions/Pyzotero.svg?style=flat)](https://pypi.python.org/pypi/Pyzotero/) [![Docs](https://readthedocs.org/projects/pyzotero/badge/?version=latest)](http://pyzotero.readthedocs.org/en/latest/?badge=latest) [![PyPI Version](https://img.shields.io/pypi/v/Pyzotero.svg)](https://pypi.python.org/pypi/Pyzotero) [![Anaconda-Server Badge](https://anaconda.org/conda-forge/pyzotero/badges/version.svg)](https://anaconda.org/conda-forge/pyzotero) [![Downloads](https://pepy.tech/badge/pyzotero)](https://pepy.tech/project/pyzotero)
76
77
 
@@ -1,8 +1,13 @@
1
- # file generated by setuptools_scm
1
+ # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
+
4
+ __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
+
3
6
  TYPE_CHECKING = False
4
7
  if TYPE_CHECKING:
5
- from typing import Tuple, Union
8
+ from typing import Tuple
9
+ from typing import Union
10
+
6
11
  VERSION_TUPLE = Tuple[Union[int, str], ...]
7
12
  else:
8
13
  VERSION_TUPLE = object
@@ -12,5 +17,5 @@ __version__: str
12
17
  __version_tuple__: VERSION_TUPLE
13
18
  version_tuple: VERSION_TUPLE
14
19
 
15
- __version__ = version = '1.6.9'
16
- __version_tuple__ = version_tuple = (1, 6, 9)
20
+ __version__ = version = '1.6.11'
21
+ __version_tuple__ = version_tuple = (1, 6, 11)
@@ -800,7 +800,7 @@ class Zotero:
800
800
  if self.snapshot:
801
801
  self.snapshot = False
802
802
  pth += ".zip"
803
- with Path.open(pth, "wb") as f:
803
+ with Path(pth).open("wb") as f:
804
804
  f.write(file)
805
805
 
806
806
  @retrieve
@@ -1398,7 +1398,7 @@ class Zotero:
1398
1398
  orig = self._attachment_template("imported_file")
1399
1399
  to_add = [orig.copy() for fls in files]
1400
1400
  for idx, tmplt in enumerate(to_add):
1401
- tmplt["title"] = Path.name(files[idx])
1401
+ tmplt["title"] = Path(files[idx]).name
1402
1402
  tmplt["filename"] = files[idx]
1403
1403
  if parentid:
1404
1404
  return self._attachment(to_add, parentid)
@@ -1851,10 +1851,10 @@ class Zupload:
1851
1851
  if not payload: # Check payload has nonzero length
1852
1852
  raise ze.ParamNotPassedError
1853
1853
  for templt in payload:
1854
- if Path.is_file(str(self.basedir.joinpath(templt["filename"]))):
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.open(str(self.basedir.joinpath(templt["filename"]))):
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(attachment, "rb") as att:
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"}
@@ -1925,9 +1925,9 @@ class Zupload:
1925
1925
  auth_headers["If-Match"] = md5
1926
1926
  data = {
1927
1927
  "md5": digest.hexdigest(),
1928
- "filename": Path.name(attachment),
1929
- "filesize": Path.stat().st_size(attachment),
1930
- "mtime": str(int(Path.stat().st_mtime(attachment) * 1000)),
1928
+ "filename": Path(attachment).name,
1929
+ "filesize": Path(attachment).stat().st_size,
1930
+ "mtime": str(int(Path(attachment).stat().st_mtime * 1000)),
1931
1931
  "contentType": mtypes[0] or "application/octet-stream",
1932
1932
  "charset": mtypes[1],
1933
1933
  "params": 1,
@@ -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(attachment, "rb").read()))
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()
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: pyzotero
3
- Version: 1.6.9
3
+ Version: 1.6.11
4
4
  Summary: Python wrapper for the Zotero API
5
5
  Author-email: Stephan Hügel <urschrei@gmail.com>
6
6
  License: # Blue Oak Model License
@@ -71,6 +71,7 @@ Requires-Dist: python-dateutil; extra == "test"
71
71
  Requires-Dist: ipython; extra == "test"
72
72
  Requires-Dist: pytest-asyncio; extra == "test"
73
73
  Requires-Dist: pytest-cov>=6.0.0; extra == "test"
74
+ Dynamic: license-file
74
75
 
75
76
  [![Supported Python versions](https://img.shields.io/pypi/pyversions/Pyzotero.svg?style=flat)](https://pypi.python.org/pypi/Pyzotero/) [![Docs](https://readthedocs.org/projects/pyzotero/badge/?version=latest)](http://pyzotero.readthedocs.org/en/latest/?badge=latest) [![PyPI Version](https://img.shields.io/pypi/v/Pyzotero.svg)](https://pypi.python.org/pypi/Pyzotero) [![Anaconda-Server Badge](https://anaconda.org/conda-forge/pyzotero/badges/version.svg)](https://anaconda.org/conda-forge/pyzotero) [![Downloads](https://pepy.tech/badge/pyzotero)](https://pepy.tech/project/pyzotero)
76
77
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes