- Update to 12.0.2

* Remove the pin for urllib3 (#507)
  * Fix incorrect pin of requests (#505)
- Update to 12.0.0
  * Fixes to Restore CI (#492, #501)
  * Fixes to doc generation (#500, #503)
  * Manual Spec Update (#498)
  * Stop providing a hardcoded CA bundle (#489, #499)
- Update to 11.36.2
  * Fix invalid specifier in stone requirement (#456)
  * Added _ca_certs property to _SSLAdapter to properly support pickling (broke in SDK v11.33) (#440)
  * Add ca_certs argument for oauth and dropbox client (#385)
  * [Setup] Update deprecated description-file to use description_file (#410)
  * Add scopes to documentation (#408)
  * Ensure Dropbox error is thrown in refresh access token (#407)
  * Fix CI test environment (#391)
  * Add integration tests to the test suite (#377)
  * Refresh access token when using a very old short-lived access token with unknown expiration (#352)
  * Bump actions/setup-python from v2.2.1 to v2.2.2 (#342)
  * Bump codecov/codecov-action from v1.2.1 to v1.3.2 (#339)
  * Update Release Notes Generator to Fetch Latest Tags (#341)
  * Fix status classifier in setup.py (#334)
  * Fix setup.py dependencies by removing pull from requirements.txt (#333)
  * Move requirements.txt and test/requirements.txt as source of truth (#329)
  * Update dropbox reference to link to the new name to fix documentation (#328)
  * Fix and update build step for Python2.7 (#326)
  * Fix DropboxOAuth2Flow Documentation Parameters (#325)
  * Bump peter-evans/create-pull-request from v3.7.0 to v3.8.2 (#322)
  * Bump peter-evans/create-pull-request from v3.5.1 to v3.7.0 (#318)
  * Bump codecov/codecov-action from v1.0.15 to v1.2.1 (#315)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dropbox?expand=0&rev=14
This commit is contained in:
2025-05-05 13:21:55 +00:00
committed by Git OBS Bridge
commit 5f699e3633
7 changed files with 481 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
dropbox-10.4.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:20d039d030f7c1f54f22d182832c1909ee5b5626ad52469a19d274bf07041e06
size 663762

3
dropbox-12.0.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eec8095311fcc8b4f48f6cd3a2ee539dbf18ffc906091c80c36ac042978c5093
size 1155008

235
python-dropbox.changes Normal file
View File

@@ -0,0 +1,235 @@
-------------------------------------------------------------------
Mon May 5 11:26:23 UTC 2025 - Felix Stegmeier <felix.stegmeier@suse.com>
- Update to 12.0.2
* Remove the pin for urllib3 (#507)
* Fix incorrect pin of requests (#505)
- Update to 12.0.0
* Fixes to Restore CI (#492, #501)
* Fixes to doc generation (#500, #503)
* Manual Spec Update (#498)
* Stop providing a hardcoded CA bundle (#489, #499)
- Update to 11.36.2
* Fix invalid specifier in stone requirement (#456)
* Added _ca_certs property to _SSLAdapter to properly support pickling (broke in SDK v11.33) (#440)
* Add ca_certs argument for oauth and dropbox client (#385)
* [Setup] Update deprecated description-file to use description_file (#410)
* Add scopes to documentation (#408)
* Ensure Dropbox error is thrown in refresh access token (#407)
* Fix CI test environment (#391)
* Add integration tests to the test suite (#377)
* Refresh access token when using a very old short-lived access token with unknown expiration (#352)
* Bump actions/setup-python from v2.2.1 to v2.2.2 (#342)
* Bump codecov/codecov-action from v1.2.1 to v1.3.2 (#339)
* Update Release Notes Generator to Fetch Latest Tags (#341)
* Fix status classifier in setup.py (#334)
* Fix setup.py dependencies by removing pull from requirements.txt (#333)
* Move requirements.txt and test/requirements.txt as source of truth (#329)
* Update dropbox reference to link to the new name to fix documentation (#328)
* Fix and update build step for Python2.7 (#326)
* Fix DropboxOAuth2Flow Documentation Parameters (#325)
* Bump peter-evans/create-pull-request from v3.7.0 to v3.8.2 (#322)
* Bump peter-evans/create-pull-request from v3.5.1 to v3.7.0 (#318)
* Bump codecov/codecov-action from v1.0.15 to v1.2.1 (#315)
* Bump actions/setup-python from v2.1.4 to v2.2.1 (#306)
* Convert integration tests to use pytest instead of unittest (#313)
* Add support for app authentication (#305)
* Reorganize test directory (#312)
* Fix CI matrix Python version (#311
* Add stone to setup.py (#300)
* Fix links in release notes to be absolute (#287)
* Bump peter-evans/create-pull-request from v3.4.1 to v3.5.1 (#297)
* change update_version.sh to reflect the renaming of dropbox/dropbox.py to dropbox/dropbox_client.py (#294)
* Regenerate client using Stone 3.2.0 (#291)
* Bump codecov/codecov-action from v1.0.14 to v1.0.15 (#290)
* remove auto generated stone_fixtures.py (#292)
- Add remove_six.patch to remove six from requirements
-------------------------------------------------------------------
Tue Apr 23 22:28:00 UTC 2024 - Georg Pfuetzenreuter <mail+rpm@georg-pfuetzenreuter.net>
- Switch to sle15_python_module_pythons to build for newer Python stack
-------------------------------------------------------------------
Thu Dec 9 09:15:50 UTC 2021 - pgajdos@suse.com
- do not require pytest-runner for build, not required
-------------------------------------------------------------------
Thu Sep 17 06:53:36 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to 10.4.1:
* Fix bug with client copy
* Fix bug with team client as_user and as_admin
* Fix Python 3 linter issue
* Update tox.ini to check python 3.7 and 3.8
* Update setup.py to support python 3.7 and 3.8
* Remove stone as submodule and add as dependency
* Update Spec
* Files Namespace
* Add internal_error to SearchError union.
* Add locked to LookupError union.
* Add cant_move_into_vault to RelocationError union.
* Add MoveIntoVaultError union.
* Add SearchMatchFieldOptions struct.
* Add optional match_field_options to SearchV2Arg struct.
* Doc/example changes.
* Sharing Namespace
* Add is_vault to SharePathError union.
* Add invalid_shared_folder to AddFolderMemberError union.
* Team Namespace
* Make members field of LegalHoldsPolicyUpdateArg struct optional.
* Add app_folder_removal_not_supported to RevokeLinkedAppError union.
* Doc/example changes.
* Add auto_approve to InviteMethod union.
* Add moved_from_another_team to InviteMethod union.
* Add moved_from_another_team to MemberStatus union.
* Add no_one to SharedLinkVisibility union.
* Add optional new_team to MemberChangeStatusDetails struct.
* Add optional previous_team to MemberChangeStatusDetails struct.
* Add external_sharing_create_report_details to EventDetails union.
* Add external_sharing_report_failed to EventDetails union.
* Add content_administration_policy_changed_details to EventDetails
* Add external_sharing_create_report to EventType.
* Add external_sharing_report_failed to EventType.
* Add content_administration_policy_changed to EventType.
* union.
* Add send_for_signature_policy_changed_details to EventDetails union.
* Add external_sharing_create_report to EventTypeArgs union.
* Add external_sharing_report_failed to EventTypeArgs union.
* Add content_administration_policy_changed to EventTypeArgs union.
* Add send_for_signature_policy_changed to EventTypeArgs union.
* Add SendForSignaturePolicy union.
* Add ExternalSharingCreateReportDetails struct.
* Add ExternalSharingReportFailedDetails struct.
* Add ContentAdministrationPolicyChangedDetails struct.
* Add SendForSignaturePolicyChangedDetails struct.
* Add ExternalSharingCreateReportType struct.
* Add ExternalSharingReportFailedType struct.
* Add ContentAdministrationPolicyChangedType struct.
* Add SendForSignaturePolicyChangedType struct.
-------------------------------------------------------------------
Tue Jun 16 03:55:01 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 10.2.0:
* Added comments to legalHoldPolicy struct
* Add more detailed comments to LegalHoldsListHeldRevisionResult
* Fix misc typos in comments
* Add optional EventTypeArg event_type to GetTeamEventsArg struct
* Add invalid_filters to GetTeamEventsError union
* Add deprecated tag to was_linked_apps_truncated, was_linked_devices_truncated, was_link_shared_folders_truncated parameters in JoinTeamDetails struct
* Added the EventTypeArg union
* Update comment for retain_team_shares arg of MembersRemoveArg
* Fix bug in constructor for OAuth object (expires_in -> expiration)
* Remove oauth examples from code and redirect to examples folder
* Bug Fix to add timeout parameter to Refresh Token calls
* added a new route property is_cloud_doc_auth indicating whether the endpoint is a Dropbox cloud docs endpoint which takes cloud docs auth token.
* lock_file_batch, unlock_file_batch and get_file_lock_batch are no longer preview routes
* Update query description on SearchArg Struct, SearchV2Arg Struct
* Update move:2 and move_batch:2 route descirption
* Deleted deprecated routes legal_holds/export_policy and legal_holds/export_policy_job_status/check
* Added AccountState union
* Added AccountLockOrUnlockedType struct
* Added AccountLockOrUnlockedDetails struct
* Added MemberSendInvitePolicy union
* Added MemberSendInvitePolicyChangedType struct
* Added MemberSendInvitePolicyChangedDetails struct
* Added a new tag first_party_token_exchange to LoginMethod union
* Added new tags account_lock_or_unlocked_details and member_send_invite_policy_changed_details to EventDetails union
* Added new tags account_lock_or_unlocked and member_send_invite_policy_changed to EventType union
* Added a new field file_size to FileOrFolderLogInfo and FileLogInfo struct
* Added a new field file_count to FolderLogInfo struct
* Add NoExpirationLinkGenCreateReportDetails, NoExpirationLinkGenReportFailedDetails, NoPasswordLinkGenCreateReportDetails, NoPasswordLinkGenReportFailedDetails, NoPasswordLinkViewCreateReportDetails, NoPasswordLinkViewReportFailedDetails, OutdatedLinkViewCreateReportDetails, OutdatedLnkViewReportFailedDetails structs to the EventDetails union
* Add NoExpirationLinkGenCreateReportType, NoExpirationLinkGenReportFailedType, NoPasswordLinkGenCreateReportType, NoPasswordLinkGenReportFailedType, NoPasswordLinkViewCreateReportType, NoPasswordLinkViewReportFailedType, OutdatedLinkViewCreateReportType, OutdatedLinkViewReportFailedType structs to the EventType union
* Add get_content, get_metadata, rename, unlock, and lock routes
* Add corresponding args, results, and errors
* Update AddPropertiesArg description
* Add duplicate_property_groups to InvalidPropertyGroupError Union
* Update property_groups description on AddPropertiesError Union
* Update SharedLinkSettings example
* Update auth type string patterns
* Update host string patterns
* Update style string patterns
* Update select_admin_mode string patterns
* Add team_exceeded_legal_hold_quota to LegalHoldsPolicyCreateError union
* Change LegalHoldsListHeldRevisionsError and LegalHoldsPolicyReleaseError to extend LegalHoldsError
* Remove is_preview from route add, resend_verification_emails, and delete
* Add support for PKCE
* Add support for Short-Lived Tokens
* Add support for Scopes
* These features are all in beta, please contact Dropbox support if you are interested in these features
* Update Requirements.txt
* Add Github action to auto-publish to pypi
* DropboxOAuth2Flow consumer_secret parameter moved to end of constructor as it became optional with support of PKCE
* Assertions in constructors have been mapped to their BadInputException
-------------------------------------------------------------------
Fri Apr 3 08:29:38 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- update to 9.5.0
* Add optional lockholder_account_id to FileLockMetadata struct
* Add optional invalid_argument to SearchError union
* Add get_thumbnail:2 route
* Add add_creator_as_owner to GroupCreateArg struct
* Add exporting to LegalHoldStatus union
* Add MembersInfo struct
* Add team_invite_details to ActionDetails union
* Add optional indicators to JoinTeamDetails struct
* Add optional shared_content_link to SharedLinkSettings* structs
* Add many functionalities to EventType and EventDetails unions
* Add InviteMethod union
* Add LockStatus union
* Add RewindPolicy union
* Add FileLockingValue union
-------------------------------------------------------------------
Fri Jul 26 10:55:24 UTC 2019 - pgajdos@suse.com
- version update to 9.4.0
* auth Namespace:
Added missing_scope into AuthError.
* file_requests namespace:
Added list and list/continue endpoints.
Added count endpoint.
Added delete and delete_all_closed endpoints.
* files namespace:
Added unsupported_file to DownloadError.
Added upper bound 9999 to start field in SearchArg.
Added unsupported_content_type to LookupError.
Added cant_move_shared_folder to RelocationError.
Added email_not_verified and unsupported_file to GetTemporaryLinkError.
Added ExportInfo struct.
Added fields (is_downloadable, export_info) to FileMetadata.
Added include_non_downloadable_files to ListFolderArg.
Added ExportMetadata, ExportArg, Export Result Structs.
Added ExportError union.
Added /export route.
* seen_state namespace:
Added mobile_ios, mobile_android and api into PlatformType.
Deprecated mobile in PlatformType.
* sharing namespace:
Updated shared_link_already_exists under CreateSharedLinkWithSettingsError from void to SharedLinkAlreadyExistsMetadata.
Updated docstrings for LinkPermissions
Added banned_member to AddFolderMemberError.
Added password field to LinkAudience.
Added effective_audience and link_access_level fields to LinkPermissions struct.
Added audience and access fields to SharedLinkSettings struct.
Added LinkAccessLevel and RequestedLinkAccessLevel union.
Added create_view_link and create_edit_link fields to FileAction union.
* team namespace:
Added profile_photo_url and suspended_on into MemberProfile.
* team_log namespace:
Added various new types.
* team_policies namespace:
Added TwoStepVerificationState union.
* team_reports namespace:
Added TemporaryFailureReason union.
-------------------------------------------------------------------
Sat Feb 16 11:03:48 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Initial spec for v9.3.0

64
python-dropbox.spec Normal file
View File

@@ -0,0 +1,64 @@
#
# spec file for package python-dropbox
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-dropbox
Version: 12.0.2
Release: 0
Summary: Official Dropbox API Client
License: MIT
Group: Development/Languages/Python
URL: https://github.com/dropbox/dropbox-sdk-python
Source: https://github.com/dropbox/dropbox-sdk-python/archive/refs/tags/v%{version}.tar.gz#/dropbox-%{version}.tar.gz
# PATCH-FIX-UPSTREAM remove_six.patch https://github.com/dropbox/dropbox-sdk-python/pull/493
Patch1: remove_six.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-requests >= 2.16.2
Requires: python-stone
BuildArch: noarch
%python_subpackages
%description
Official Dropbox API Client
%prep
%autosetup -p1 -n dropbox-sdk-python-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# Tests require an access token
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/dropbox
%{python_sitelib}/dropbox-%{version}.dist-info
%check
%changelog

152
remove_six.patch Normal file
View File

@@ -0,0 +1,152 @@
From f27f5e46a92c0ee246a0563cc4b034beec7360d5 Mon Sep 17 00:00:00 2001
From: Max Belanger <max@dropbox.com>
Date: Wed, 8 May 2024 16:27:20 -0700
Subject: [PATCH] remove `six`, drop support for python 2
---
dropbox/dropbox_client.py | 5 ++---
dropbox/oauth.py | 25 +++++++------------------
example/updown.py | 3 +--
requirements.txt | 1 -
setup.py | 1 -
5 files changed, 10 insertions(+), 25 deletions(-)
Index: dropbox-sdk-python-12.0.2/dropbox/dropbox_client.py
===================================================================
--- dropbox-sdk-python-12.0.2.orig/dropbox/dropbox_client.py
+++ dropbox-sdk-python-12.0.2/dropbox/dropbox_client.py
@@ -16,7 +16,6 @@ import random
import time
import requests
-import six
from datetime import datetime, timedelta
from dropbox.auth import (
@@ -75,7 +74,7 @@ class RouteResult(object):
:param requests.models.Response http_resp: A raw HTTP response. It will
be used to stream the binary-body payload of the response.
"""
- assert isinstance(obj_result, six.string_types), \
+ assert isinstance(obj_result, str), \
'obj_result: expected string, got %r' % type(obj_result)
if http_resp is not None:
assert isinstance(http_resp, requests.models.Response), \
@@ -530,7 +529,7 @@ class _DropboxTransport(object):
if host not in self._host_map:
raise ValueError('Unknown value for host: %r' % host)
- if not isinstance(request_binary, (six.binary_type, type(None))):
+ if not isinstance(request_binary, (bytes, type(None))):
# Disallow streams and file-like objects even though the underlying
# requests library supports them. This is to prevent incorrect
# behavior when a non-rewindable stream is read from, but the
Index: dropbox-sdk-python-12.0.2/dropbox/oauth.py
===================================================================
--- dropbox-sdk-python-12.0.2.orig/dropbox/oauth.py
+++ dropbox-sdk-python-12.0.2/dropbox/oauth.py
@@ -14,7 +14,6 @@ __all__ = [
import base64
import os
-import six
import urllib
import re
from datetime import datetime, timedelta
@@ -26,13 +25,6 @@ from .session import (
DEFAULT_TIMEOUT,
)
-if six.PY3:
- url_path_quote = urllib.parse.quote # pylint: disable=no-member,useless-suppression
- url_encode = urllib.parse.urlencode # pylint: disable=no-member,useless-suppression
-else:
- url_path_quote = urllib.quote # pylint: disable=no-member,useless-suppression
- url_encode = urllib.urlencode # pylint: disable=no-member,useless-suppression
-
TOKEN_ACCESS_TYPES = ['offline', 'online', 'legacy']
INCLUDE_GRANTED_SCOPES_TYPES = ['user', 'team']
PKCE_VERIFIER_LENGTH = 128
@@ -233,10 +225,7 @@ class DropboxOAuth2FlowBase(object):
:return: The path and parameters components of an API URL.
:rtype: str
"""
- if six.PY2 and isinstance(target, six.text_type):
- target = target.encode('utf8')
-
- target_path = url_path_quote(target)
+ target_path = urllib.parse.quote(target)
params = params or {}
params = params.copy()
@@ -606,20 +595,20 @@ def _params_to_urlencoded(params):
Returns a application/x-www-form-urlencoded :class:`str` representing the key/value pairs in
:attr:`params`.
- Keys are values are ``str()``'d before calling :meth:`urllib.urlencode`, with the exception of
- unicode objects which are utf8-encoded.
+ Keys and values are coerced via ``str()``'d and encoded via UTF-8 before calling
+ :meth:`urllib.parse.urlencode`.
"""
def encode(o):
- if isinstance(o, six.binary_type):
+ if isinstance(o, bytes):
return o
else:
- if isinstance(o, six.text_type):
+ if isinstance(o, str):
return o.encode('utf-8')
else:
return str(o).encode('utf-8')
- utf8_params = {encode(k): encode(v) for k, v in six.iteritems(params)}
- return url_encode(utf8_params)
+ utf8_params = {encode(k): encode(v) for k, v in params.items()}
+ return urllib.parse.urlencode(utf8_params)
def _generate_pkce_code_verifier():
code_verifier = base64.urlsafe_b64encode(os.urandom(PKCE_VERIFIER_LENGTH)).decode('utf-8')
Index: dropbox-sdk-python-12.0.2/example/updown.py
===================================================================
--- dropbox-sdk-python-12.0.2.orig/example/updown.py
+++ dropbox-sdk-python-12.0.2/example/updown.py
@@ -9,7 +9,6 @@ import argparse
import contextlib
import datetime
import os
-import six
import sys
import time
import unicodedata
@@ -74,7 +73,7 @@ def main():
# First do all the files.
for name in files:
fullname = os.path.join(dn, name)
- if not isinstance(name, six.text_type):
+ if not isinstance(name, str):
name = name.decode('utf-8')
nname = unicodedata.normalize('NFC', name)
if name.startswith('.'):
Index: dropbox-sdk-python-12.0.2/requirements.txt
===================================================================
--- dropbox-sdk-python-12.0.2.orig/requirements.txt
+++ dropbox-sdk-python-12.0.2/requirements.txt
@@ -1,6 +1,5 @@
# Dependencies required for installation (keep in sync with setup.py)
requests>=2.16.2
-six >= 1.12.0
stone>=2,<3.3.3
# Other dependencies for development
ply
Index: dropbox-sdk-python-12.0.2/setup.py
===================================================================
--- dropbox-sdk-python-12.0.2.orig/setup.py
+++ dropbox-sdk-python-12.0.2/setup.py
@@ -26,7 +26,6 @@ version = eval(line.split('=', 1)[1].str
install_reqs = [
'requests>=2.16.2',
- 'six >= 1.12.0',
'stone>=2,<3.3.3',
]