Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop python<=3.7 support and use of six #509

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# Dropbox for Python documentation build configuration file, created by
# sphinx-quickstart on Fri Oct 24 13:42:45 2014.
Expand Down Expand Up @@ -54,8 +53,8 @@
master_doc = 'index'

# General information about the project.
project = u'Dropbox for Python'
copyright = u'2015-2024, Dropbox, Inc.'
project = 'Dropbox for Python'
copyright = '2015-2024, Dropbox, Inc.'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
2 changes: 0 additions & 2 deletions dropbox/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

from dropbox.dropbox_client import ( # noqa: F401 # pylint: disable=unused-import
__version__, Dropbox, DropboxTeam, create_session
)
Expand Down
14 changes: 6 additions & 8 deletions dropbox/account.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# @generated
# flake8: noqa
# pylint: skip-file
from __future__ import unicode_literals
from stone.backends.python_rsrc import stone_base as bb
from stone.backends.python_rsrc import stone_validators as bv

Expand Down Expand Up @@ -61,7 +59,7 @@ def get_base64_data(self):
return self._value

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(PhotoSourceArg, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

PhotoSourceArg_validator = bv.Union(PhotoSourceArg)

Expand All @@ -87,7 +85,7 @@ def __init__(self,
photo = bb.Attribute("photo", user_defined=True)

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(SetProfilePhotoArg, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

SetProfilePhotoArg_validator = bv.Struct(SetProfilePhotoArg)

Expand Down Expand Up @@ -172,7 +170,7 @@ def is_other(self):
return self._tag == 'other'

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(SetProfilePhotoError, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

SetProfilePhotoError_validator = bv.Union(SetProfilePhotoError)

Expand All @@ -198,7 +196,7 @@ def __init__(self,
profile_photo_url = bb.Attribute("profile_photo_url")

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(SetProfilePhotoResult, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

SetProfilePhotoResult_validator = bv.Struct(SetProfilePhotoResult)

Expand All @@ -212,7 +210,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
PhotoSourceArg.other = PhotoSourceArg('other')

SetProfilePhotoArg.photo.validator = PhotoSourceArg_validator
SetProfilePhotoArg._all_field_names_ = set(['photo'])
SetProfilePhotoArg._all_field_names_ = {'photo'}
SetProfilePhotoArg._all_fields_ = [('photo', SetProfilePhotoArg.photo.validator)]

SetProfilePhotoError._file_type_error_validator = bv.Void()
Expand All @@ -238,7 +236,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
SetProfilePhotoError.other = SetProfilePhotoError('other')

SetProfilePhotoResult.profile_photo_url.validator = bv.String()
SetProfilePhotoResult._all_field_names_ = set(['profile_photo_url'])
SetProfilePhotoResult._all_field_names_ = {'profile_photo_url'}
SetProfilePhotoResult._all_fields_ = [('profile_photo_url', SetProfilePhotoResult.profile_photo_url.validator)]

set_profile_photo = bb.Route(
Expand Down
1 change: 0 additions & 1 deletion dropbox/async.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# @generated
# flake8: noqa
Expand Down
16 changes: 7 additions & 9 deletions dropbox/async_.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# @generated
# flake8: noqa
# pylint: skip-file
from __future__ import unicode_literals
from stone.backends.python_rsrc import stone_base as bb
from stone.backends.python_rsrc import stone_validators as bv

Expand Down Expand Up @@ -59,7 +57,7 @@ def get_async_job_id(self):
return self._value

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(LaunchResultBase, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

LaunchResultBase_validator = bv.Union(LaunchResultBase)

Expand Down Expand Up @@ -89,7 +87,7 @@ def is_complete(self):
return self._tag == 'complete'

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(LaunchEmptyResult, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

LaunchEmptyResult_validator = bv.Union(LaunchEmptyResult)

Expand Down Expand Up @@ -117,7 +115,7 @@ def __init__(self,
async_job_id = bb.Attribute("async_job_id")

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(PollArg, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

PollArg_validator = bv.Struct(PollArg)

Expand Down Expand Up @@ -149,7 +147,7 @@ def is_in_progress(self):
return self._tag == 'in_progress'

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(PollResultBase, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

PollResultBase_validator = bv.Union(PollResultBase)

Expand Down Expand Up @@ -178,7 +176,7 @@ def is_complete(self):
return self._tag == 'complete'

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(PollEmptyResult, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

PollEmptyResult_validator = bv.Union(PollEmptyResult)

Expand Down Expand Up @@ -229,7 +227,7 @@ def is_other(self):
return self._tag == 'other'

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(PollError, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

PollError_validator = bv.Union(PollError)

Expand All @@ -248,7 +246,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
LaunchEmptyResult.complete = LaunchEmptyResult('complete')

PollArg.async_job_id.validator = AsyncJobId_validator
PollArg._all_field_names_ = set(['async_job_id'])
PollArg._all_field_names_ = {'async_job_id'}
PollArg._all_fields_ = [('async_job_id', PollArg.async_job_id.validator)]

PollResultBase._in_progress_validator = bv.Void()
Expand Down
34 changes: 16 additions & 18 deletions dropbox/auth.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# @generated
# flake8: noqa
# pylint: skip-file
from __future__ import unicode_literals
from stone.backends.python_rsrc import stone_base as bb
from stone.backends.python_rsrc import stone_validators as bv

Expand Down Expand Up @@ -97,7 +95,7 @@ def get_paper_access_denied(self):
return self._value

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(AccessError, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

AccessError_validator = bv.Union(AccessError)

Expand Down Expand Up @@ -226,7 +224,7 @@ def get_missing_scope(self):
return self._value

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(AuthError, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

AuthError_validator = bv.Union(AuthError)

Expand Down Expand Up @@ -275,7 +273,7 @@ def is_other(self):
return self._tag == 'other'

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(InvalidAccountTypeError, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

InvalidAccountTypeError_validator = bv.Union(InvalidAccountTypeError)

Expand Down Expand Up @@ -323,7 +321,7 @@ def is_other(self):
return self._tag == 'other'

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(PaperAccessError, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

PaperAccessError_validator = bv.Union(PaperAccessError)

Expand Down Expand Up @@ -361,7 +359,7 @@ def __init__(self,
retry_after = bb.Attribute("retry_after")

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(RateLimitError, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

RateLimitError_validator = bv.Struct(RateLimitError)

Expand Down Expand Up @@ -410,7 +408,7 @@ def is_other(self):
return self._tag == 'other'

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(RateLimitReason, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

RateLimitReason_validator = bv.Union(RateLimitReason)

Expand Down Expand Up @@ -446,7 +444,7 @@ def __init__(self,
oauth1_token_secret = bb.Attribute("oauth1_token_secret")

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(TokenFromOAuth1Arg, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

TokenFromOAuth1Arg_validator = bv.Struct(TokenFromOAuth1Arg)

Expand Down Expand Up @@ -495,7 +493,7 @@ def is_other(self):
return self._tag == 'other'

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(TokenFromOAuth1Error, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

TokenFromOAuth1Error_validator = bv.Union(TokenFromOAuth1Error)

Expand All @@ -521,7 +519,7 @@ def __init__(self,
oauth2_token = bb.Attribute("oauth2_token")

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(TokenFromOAuth1Result, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

TokenFromOAuth1Result_validator = bv.Struct(TokenFromOAuth1Result)

Expand All @@ -547,7 +545,7 @@ def __init__(self,
required_scope = bb.Attribute("required_scope")

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(TokenScopeError, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

TokenScopeError_validator = bv.Struct(TokenScopeError)

Expand Down Expand Up @@ -617,10 +615,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):

RateLimitError.reason.validator = RateLimitReason_validator
RateLimitError.retry_after.validator = bv.UInt64()
RateLimitError._all_field_names_ = set([
RateLimitError._all_field_names_ = {
'reason',
'retry_after',
])
}
RateLimitError._all_fields_ = [
('reason', RateLimitError.reason.validator),
('retry_after', RateLimitError.retry_after.validator),
Expand All @@ -641,10 +639,10 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):

TokenFromOAuth1Arg.oauth1_token.validator = bv.String(min_length=1)
TokenFromOAuth1Arg.oauth1_token_secret.validator = bv.String(min_length=1)
TokenFromOAuth1Arg._all_field_names_ = set([
TokenFromOAuth1Arg._all_field_names_ = {
'oauth1_token',
'oauth1_token_secret',
])
}
TokenFromOAuth1Arg._all_fields_ = [
('oauth1_token', TokenFromOAuth1Arg.oauth1_token.validator),
('oauth1_token_secret', TokenFromOAuth1Arg.oauth1_token_secret.validator),
Expand All @@ -664,11 +662,11 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
TokenFromOAuth1Error.other = TokenFromOAuth1Error('other')

TokenFromOAuth1Result.oauth2_token.validator = bv.String(min_length=1)
TokenFromOAuth1Result._all_field_names_ = set(['oauth2_token'])
TokenFromOAuth1Result._all_field_names_ = {'oauth2_token'}
TokenFromOAuth1Result._all_fields_ = [('oauth2_token', TokenFromOAuth1Result.oauth2_token.validator)]

TokenScopeError.required_scope.validator = bv.String()
TokenScopeError._all_field_names_ = set(['required_scope'])
TokenScopeError._all_field_names_ = {'required_scope'}
TokenScopeError._all_fields_ = [('required_scope', TokenScopeError.required_scope.validator)]

RateLimitError.retry_after.default = 1
Expand Down
3 changes: 1 addition & 2 deletions dropbox/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# flake8: noqa
# pylint: skip-file
Expand Down Expand Up @@ -28,7 +27,7 @@
from dropbox import users_common


class DropboxBase(object):
class DropboxBase:
__metaclass__ = ABCMeta

@abstractmethod
Expand Down
3 changes: 1 addition & 2 deletions dropbox/base_team.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# flake8: noqa
# pylint: skip-file
Expand Down Expand Up @@ -28,7 +27,7 @@
from dropbox import users_common


class DropboxTeamBase(object):
class DropboxTeamBase:
__metaclass__ = ABCMeta

@abstractmethod
Expand Down
10 changes: 4 additions & 6 deletions dropbox/check.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# @generated
# flake8: noqa
# pylint: skip-file
from __future__ import unicode_literals
from stone.backends.python_rsrc import stone_base as bb
from stone.backends.python_rsrc import stone_validators as bv

Expand Down Expand Up @@ -31,7 +29,7 @@ def __init__(self,
query = bb.Attribute("query")

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(EchoArg, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

EchoArg_validator = bv.Struct(EchoArg)

Expand Down Expand Up @@ -59,16 +57,16 @@ def __init__(self,
result = bb.Attribute("result")

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(EchoResult, self)._process_custom_annotations(annotation_type, field_path, processor)
super()._process_custom_annotations(annotation_type, field_path, processor)

EchoResult_validator = bv.Struct(EchoResult)

EchoArg.query.validator = bv.String(max_length=500)
EchoArg._all_field_names_ = set(['query'])
EchoArg._all_field_names_ = {'query'}
EchoArg._all_fields_ = [('query', EchoArg.query.validator)]

EchoResult.result.validator = bv.String()
EchoResult._all_field_names_ = set(['result'])
EchoResult._all_field_names_ = {'result'}
EchoResult._all_fields_ = [('result', EchoResult.result.validator)]

EchoArg.query.default = ''
Expand Down
Loading