dropbox 12.2.3__tar.gz → 12.2.4__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 (123) hide show
  1. {dropbox-12.2.3/dropbox.egg-info → dropbox-12.2.4}/PKG-INFO +1 -1
  2. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/_version.py +3 -3
  3. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/base.py +0 -33
  4. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/dropbox_client.py +15 -3
  5. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/exceptions.py +6 -3
  6. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/sharing.py +385 -17
  7. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/team_log.py +699 -0
  8. {dropbox-12.2.3 → dropbox-12.2.4/dropbox.egg-info}/PKG-INFO +1 -1
  9. dropbox-12.2.4/dropbox.egg-info/scm_version.json +8 -0
  10. {dropbox-12.2.3 → dropbox-12.2.4}/test/unit/test_dropbox_unit.py +69 -0
  11. dropbox-12.2.3/dropbox.egg-info/scm_version.json +0 -8
  12. {dropbox-12.2.3 → dropbox-12.2.4}/.coveragerc +0 -0
  13. {dropbox-12.2.3 → dropbox-12.2.4}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  14. {dropbox-12.2.3 → dropbox-12.2.4}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  15. {dropbox-12.2.3 → dropbox-12.2.4}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  16. {dropbox-12.2.3 → dropbox-12.2.4}/.github/ISSUE_TEMPLATE/question_help.md +0 -0
  17. {dropbox-12.2.3 → dropbox-12.2.4}/.github/dependabot.yml +0 -0
  18. {dropbox-12.2.3 → dropbox-12.2.4}/.github/pull_request_template.md +0 -0
  19. {dropbox-12.2.3 → dropbox-12.2.4}/.github/workflows/ci.yml +0 -0
  20. {dropbox-12.2.3 → dropbox-12.2.4}/.github/workflows/codeql.yml +0 -0
  21. {dropbox-12.2.3 → dropbox-12.2.4}/.github/workflows/coverage.yml +0 -0
  22. {dropbox-12.2.3 → dropbox-12.2.4}/.github/workflows/pypiupload.yml +0 -0
  23. {dropbox-12.2.3 → dropbox-12.2.4}/.github/workflows/spec_update.yml +0 -0
  24. {dropbox-12.2.3 → dropbox-12.2.4}/.gitignore +0 -0
  25. {dropbox-12.2.3 → dropbox-12.2.4}/.gitmodules +0 -0
  26. {dropbox-12.2.3 → dropbox-12.2.4}/.pylintrc +0 -0
  27. {dropbox-12.2.3 → dropbox-12.2.4}/.readthedocs.yml +0 -0
  28. {dropbox-12.2.3 → dropbox-12.2.4}/CODE_OF_CONDUCT.md +0 -0
  29. {dropbox-12.2.3 → dropbox-12.2.4}/CONTRIBUTING.md +0 -0
  30. {dropbox-12.2.3 → dropbox-12.2.4}/LICENSE +0 -0
  31. {dropbox-12.2.3 → dropbox-12.2.4}/MANIFEST.in +0 -0
  32. {dropbox-12.2.3 → dropbox-12.2.4}/README.rst +0 -0
  33. {dropbox-12.2.3 → dropbox-12.2.4}/UPGRADING.md +0 -0
  34. {dropbox-12.2.3 → dropbox-12.2.4}/codecov.yml +0 -0
  35. {dropbox-12.2.3 → dropbox-12.2.4}/docs/Makefile +0 -0
  36. {dropbox-12.2.3 → dropbox-12.2.4}/docs/_static/.gitkeep +0 -0
  37. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/async.rst +0 -0
  38. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/auth.rst +0 -0
  39. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/common.rst +0 -0
  40. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/contacts.rst +0 -0
  41. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/dropbox.rst +0 -0
  42. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/exceptions.rst +0 -0
  43. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/file_properties.rst +0 -0
  44. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/file_requests.rst +0 -0
  45. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/file_transfer.rst +0 -0
  46. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/files.rst +0 -0
  47. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/oauth.rst +0 -0
  48. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/paper.rst +0 -0
  49. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/seen_state.rst +0 -0
  50. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/sharing.rst +0 -0
  51. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/team.rst +0 -0
  52. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/team_common.rst +0 -0
  53. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/team_log.rst +0 -0
  54. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/team_policies.rst +0 -0
  55. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/users.rst +0 -0
  56. {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/users_common.rst +0 -0
  57. {dropbox-12.2.3 → dropbox-12.2.4}/docs/conf.py +0 -0
  58. {dropbox-12.2.3 → dropbox-12.2.4}/docs/index.rst +0 -0
  59. {dropbox-12.2.3 → dropbox-12.2.4}/docs/make.bat +0 -0
  60. {dropbox-12.2.3 → dropbox-12.2.4}/docs/tutorial.rst +0 -0
  61. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/__init__.py +0 -0
  62. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/_http.py +0 -0
  63. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/account.py +0 -0
  64. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/account_id.py +0 -0
  65. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/async.py +0 -0
  66. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/async_.py +0 -0
  67. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/auth.py +0 -0
  68. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/base_team.py +0 -0
  69. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/check.py +0 -0
  70. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/common.py +0 -0
  71. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/contacts.py +0 -0
  72. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/content_hash.py +0 -0
  73. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/file_properties.py +0 -0
  74. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/file_requests.py +0 -0
  75. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/file_transfer.py +0 -0
  76. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/files.py +0 -0
  77. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/oauth.py +0 -0
  78. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/openid.py +0 -0
  79. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/paper.py +0 -0
  80. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/riviera.py +0 -0
  81. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/secondary_emails.py +0 -0
  82. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/seen_state.py +0 -0
  83. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/session.py +0 -0
  84. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/stone_base.py +0 -0
  85. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/stone_serializers.py +0 -0
  86. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/stone_validators.py +0 -0
  87. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/team.py +0 -0
  88. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/team_common.py +0 -0
  89. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/team_policies.py +0 -0
  90. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/users.py +0 -0
  91. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/users_common.py +0 -0
  92. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox.egg-info/SOURCES.txt +0 -0
  93. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox.egg-info/dependency_links.txt +0 -0
  94. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox.egg-info/not-zip-safe +0 -0
  95. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox.egg-info/requires.txt +0 -0
  96. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox.egg-info/scm_file_list.json +0 -0
  97. {dropbox-12.2.3 → dropbox-12.2.4}/dropbox.egg-info/top_level.txt +0 -0
  98. {dropbox-12.2.3 → dropbox-12.2.4}/example/back-up-and-restore/README.md +0 -0
  99. {dropbox-12.2.3 → dropbox-12.2.4}/example/back-up-and-restore/backup-and-restore-example.py +0 -0
  100. {dropbox-12.2.3 → dropbox-12.2.4}/example/back-up-and-restore/my-file.txt +0 -0
  101. {dropbox-12.2.3 → dropbox-12.2.4}/example/file_transfer.py +0 -0
  102. {dropbox-12.2.3 → dropbox-12.2.4}/example/oauth/commandline-oauth-pkce.py +0 -0
  103. {dropbox-12.2.3 → dropbox-12.2.4}/example/oauth/commandline-oauth-scopes.py +0 -0
  104. {dropbox-12.2.3 → dropbox-12.2.4}/example/oauth/commandline-oauth.py +0 -0
  105. {dropbox-12.2.3 → dropbox-12.2.4}/example/updown.py +0 -0
  106. {dropbox-12.2.3 → dropbox-12.2.4}/generate_base_client.py +0 -0
  107. {dropbox-12.2.3 → dropbox-12.2.4}/generator/dropbox_python_client.stoneg.py +0 -0
  108. {dropbox-12.2.3 → dropbox-12.2.4}/pyproject.toml +0 -0
  109. {dropbox-12.2.3 → dropbox-12.2.4}/requirements.txt +0 -0
  110. {dropbox-12.2.3 → dropbox-12.2.4}/scripts/release_note_generator.sh +0 -0
  111. {dropbox-12.2.3 → dropbox-12.2.4}/scripts/update_version.sh +0 -0
  112. {dropbox-12.2.3 → dropbox-12.2.4}/setup.cfg +0 -0
  113. {dropbox-12.2.3 → dropbox-12.2.4}/test/fixtures/Costa Rican Frog.jpg +0 -0
  114. {dropbox-12.2.3 → dropbox-12.2.4}/test/fixtures/dropbox_song.mp3 +0 -0
  115. {dropbox-12.2.3 → dropbox-12.2.4}/test/fixtures/foo.txt +0 -0
  116. {dropbox-12.2.3 → dropbox-12.2.4}/test/integration/expired-certs.crt +0 -0
  117. {dropbox-12.2.3 → dropbox-12.2.4}/test/integration/test_dropbox.py +0 -0
  118. {dropbox-12.2.3 → dropbox-12.2.4}/test/integration/trusted-certs.crt +0 -0
  119. {dropbox-12.2.3 → dropbox-12.2.4}/test/requirements.txt +0 -0
  120. {dropbox-12.2.3 → dropbox-12.2.4}/test/unit/test_content_hash.py +0 -0
  121. {dropbox-12.2.3 → dropbox-12.2.4}/test/unit/test_file_transfer.py +0 -0
  122. {dropbox-12.2.3 → dropbox-12.2.4}/test/unit/test_http.py +0 -0
  123. {dropbox-12.2.3 → dropbox-12.2.4}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dropbox
3
- Version: 12.2.3
3
+ Version: 12.2.4
4
4
  Summary: Official Dropbox API Client
5
5
  Author-email: Dropbox <dev-platform@dropbox.com>
6
6
  License-Expression: MIT
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '12.2.3'
22
- __version_tuple__ = version_tuple = (12, 2, 3)
21
+ __version__ = version = '12.2.4'
22
+ __version_tuple__ = version_tuple = (12, 2, 4)
23
23
 
24
- __commit_id__ = commit_id = 'g3dfe03e64'
24
+ __commit_id__ = commit_id = 'g51e6b817c'
@@ -6051,39 +6051,6 @@ class DropboxBase(object):
6051
6051
  )
6052
6052
  return r
6053
6053
 
6054
- def sharing_remove_file_member(self, file, member):
6055
- """
6056
- Identical to remove_file_member_2 but with less information returned.
6057
-
6058
- Route attributes:
6059
- scope: sharing.write
6060
-
6061
- :param file: File from which to remove members.
6062
- :type file: str
6063
- :param member: Member to remove from this file. Note that even if an
6064
- email is specified, it may result in the removal of a user (not an
6065
- invitee) if the user's main account corresponds to that email
6066
- address.
6067
- :type member: :class:`dropbox.sharing.MemberSelector`
6068
- :rtype: :class:`dropbox.sharing.FileMemberActionIndividualResult`
6069
- :raises: :class:`.exceptions.ApiError`
6070
-
6071
- If this raises, ApiError will contain:
6072
- :class:`dropbox.sharing.RemoveFileMemberError`
6073
- """
6074
- warnings.warn(
6075
- "remove_file_member is deprecated.",
6076
- DeprecationWarning,
6077
- )
6078
- arg = sharing.RemoveFileMemberArg(file, member)
6079
- r = self.request(
6080
- sharing.remove_file_member,
6081
- "sharing",
6082
- arg,
6083
- None,
6084
- )
6085
- return r
6086
-
6087
6054
  def sharing_remove_file_member_2(self, file, member):
6088
6055
  """
6089
6056
  Removes a specified member from the file.
@@ -18,6 +18,7 @@ from dropbox._version import __version__
18
18
  from stone.backends.python_rsrc import stone_serializers
19
19
 
20
20
  from dropbox import files
21
+ from dropbox.auth import AuthError as AuthErrorUnion
21
22
  from dropbox.auth import (
22
23
  AuthError_validator,
23
24
  RateLimitError_validator,
@@ -564,7 +565,7 @@ class _DropboxTransport(object):
564
565
  "ExpiredCredentials status_code=%s: Refreshing and Retrying",
565
566
  e.status_code,
566
567
  )
567
- self.refresh_access_token()
568
+ self.refresh_access_token(scope=self._scope)
568
569
  has_refreshed = True
569
570
  else:
570
571
  raise
@@ -726,8 +727,19 @@ class _DropboxTransport(object):
726
727
  "Expected content-type to be application/json, got %r"
727
728
  % res.headers.get("content-type")
728
729
  )
729
- err = stone_serializers.json_compat_obj_decode(AuthError_validator, res.json()["error"])
730
- raise AuthError(request_id, err)
730
+ raw_error = res.json()["error"]
731
+ # Stone reserves the catch-all tag for unknown variants and rejects
732
+ # it on the wire, even with strict=False. Some 401 responses send
733
+ # "other" explicitly; keep those as authentication errors too.
734
+ if raw_error == "other" or (
735
+ isinstance(raw_error, dict) and raw_error.get(".tag") == "other"
736
+ ):
737
+ err = AuthErrorUnion.other
738
+ else:
739
+ err = stone_serializers.json_compat_obj_decode(
740
+ AuthError_validator, raw_error, strict=False
741
+ )
742
+ raise AuthError(request_id, err, body=res.text)
731
743
  elif res.status_code == HTTP_STATUS_INVALID_PATH_ROOT:
732
744
  err = stone_serializers.json_compat_obj_decode(
733
745
  PathRootError_validator, res.json()["error"]
@@ -68,10 +68,13 @@ class BadInputError(HttpError):
68
68
 
69
69
 
70
70
  class AuthError(HttpError):
71
- """Errors due to invalid authentication credentials."""
71
+ """Errors due to invalid authentication credentials.
72
72
 
73
- def __init__(self, request_id, error):
74
- super(AuthError, self).__init__(request_id, 401, None)
73
+ The optional ``body`` contains the original HTTP response body, when available.
74
+ """
75
+
76
+ def __init__(self, request_id, error, body=None):
77
+ super(AuthError, self).__init__(request_id, 401, body)
75
78
  self.error = error
76
79
 
77
80
  def __repr__(self):