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.
- {dropbox-12.2.3/dropbox.egg-info → dropbox-12.2.4}/PKG-INFO +1 -1
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/_version.py +3 -3
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/base.py +0 -33
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/dropbox_client.py +15 -3
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/exceptions.py +6 -3
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/sharing.py +385 -17
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/team_log.py +699 -0
- {dropbox-12.2.3 → dropbox-12.2.4/dropbox.egg-info}/PKG-INFO +1 -1
- dropbox-12.2.4/dropbox.egg-info/scm_version.json +8 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/test/unit/test_dropbox_unit.py +69 -0
- dropbox-12.2.3/dropbox.egg-info/scm_version.json +0 -8
- {dropbox-12.2.3 → dropbox-12.2.4}/.coveragerc +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.github/ISSUE_TEMPLATE/question_help.md +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.github/dependabot.yml +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.github/pull_request_template.md +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.github/workflows/ci.yml +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.github/workflows/codeql.yml +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.github/workflows/coverage.yml +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.github/workflows/pypiupload.yml +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.github/workflows/spec_update.yml +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.gitignore +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.gitmodules +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.pylintrc +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/.readthedocs.yml +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/CODE_OF_CONDUCT.md +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/CONTRIBUTING.md +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/LICENSE +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/MANIFEST.in +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/README.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/UPGRADING.md +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/codecov.yml +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/Makefile +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/_static/.gitkeep +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/async.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/auth.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/common.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/contacts.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/dropbox.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/exceptions.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/file_properties.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/file_requests.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/file_transfer.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/files.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/oauth.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/paper.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/seen_state.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/sharing.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/team.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/team_common.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/team_log.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/team_policies.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/users.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/api/users_common.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/conf.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/index.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/make.bat +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/docs/tutorial.rst +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/__init__.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/_http.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/account.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/account_id.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/async.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/async_.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/auth.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/base_team.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/check.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/common.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/contacts.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/content_hash.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/file_properties.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/file_requests.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/file_transfer.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/files.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/oauth.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/openid.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/paper.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/riviera.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/secondary_emails.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/seen_state.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/session.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/stone_base.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/stone_serializers.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/stone_validators.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/team.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/team_common.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/team_policies.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/users.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox/users_common.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox.egg-info/SOURCES.txt +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox.egg-info/dependency_links.txt +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox.egg-info/not-zip-safe +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox.egg-info/requires.txt +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox.egg-info/scm_file_list.json +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/dropbox.egg-info/top_level.txt +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/example/back-up-and-restore/README.md +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/example/back-up-and-restore/backup-and-restore-example.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/example/back-up-and-restore/my-file.txt +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/example/file_transfer.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/example/oauth/commandline-oauth-pkce.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/example/oauth/commandline-oauth-scopes.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/example/oauth/commandline-oauth.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/example/updown.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/generate_base_client.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/generator/dropbox_python_client.stoneg.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/pyproject.toml +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/requirements.txt +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/scripts/release_note_generator.sh +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/scripts/update_version.sh +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/setup.cfg +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/test/fixtures/Costa Rican Frog.jpg +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/test/fixtures/dropbox_song.mp3 +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/test/fixtures/foo.txt +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/test/integration/expired-certs.crt +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/test/integration/test_dropbox.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/test/integration/trusted-certs.crt +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/test/requirements.txt +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/test/unit/test_content_hash.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/test/unit/test_file_transfer.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/test/unit/test_http.py +0 -0
- {dropbox-12.2.3 → dropbox-12.2.4}/tox.ini +0 -0
|
@@ -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.
|
|
22
|
-
__version_tuple__ = version_tuple = (12, 2,
|
|
21
|
+
__version__ = version = '12.2.4'
|
|
22
|
+
__version_tuple__ = version_tuple = (12, 2, 4)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
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
|
-
|
|
730
|
-
|
|
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
|
-
|
|
74
|
-
|
|
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):
|