Skip to content

Commit 9a3f9ce

Browse files
authored
Merge pull request #311 from Backblaze/remove-inheritance-from-object
Remove inheritance from object (leftover from python2)
2 parents ba638d2 + 0220f22 commit 9a3f9ce

29 files changed

+53
-70
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
* Don't run coverage in pypy in CI
1111
* Introduce a common thread worker pool for all downloads
1212
* Increase http timeout to 20min (for copy using 5GB parts)
13+
* Remove inheritance from object (leftover from python2)
1314

1415
### Added
1516
* Add pypy-3.8 to test matrix

b2sdk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
logging.getLogger(__name__).addHandler(logging.NullHandler())
1515

1616

17-
class UrllibWarningFilter(object):
17+
class UrllibWarningFilter:
1818
def filter(self, record):
1919
return record.msg != "Connection pool is full, discarding connection: %s"
2020

b2sdk/account_info/upload_url_pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from .abstract import AbstractAccountInfo
1616

1717

18-
class UploadUrlPool(object):
18+
class UploadUrlPool:
1919
"""
2020
For each key (either a bucket id or large file id), hold a pool
2121
of (url, auth_token) pairs.

b2sdk/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def url_for_api(info, api_name):
4848
return '%s/b2api/%s/%s' % (base, API_VERSION, api_name)
4949

5050

51-
class Services(object):
51+
class Services:
5252
""" Gathers objects that provide high level logic over raw api usage. """
5353
UPLOAD_MANAGER_CLASS = staticmethod(UploadManager)
5454
COPY_MANAGER_CLASS = staticmethod(CopyManager)

b2sdk/b2http.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _print_exception(e, indent=''):
4343
_print_exception(a, indent + ' ')
4444

4545

46-
class ResponseContextManager(object):
46+
class ResponseContextManager:
4747
"""
4848
A context manager that closes a requests.Response when done.
4949
"""
@@ -58,7 +58,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
5858
self.response.close()
5959

6060

61-
class HttpCallback(object):
61+
class HttpCallback:
6262
"""
6363
A callback object that does nothing. Overrides pre_request
6464
and/or post_request as desired.
@@ -128,7 +128,7 @@ def post_request(self, method, url, headers, response):
128128
raise ClockSkew(skew_seconds)
129129

130130

131-
class B2Http(object):
131+
class B2Http:
132132
"""
133133
A wrapper for the requests module. Provides the operations
134134
needed to access B2, and handles retrying when the returned

b2sdk/bounded_queue_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import threading
1212

1313

14-
class BoundedQueueExecutor(object):
14+
class BoundedQueueExecutor:
1515
"""
1616
Wrap a concurrent.futures.Executor and limits the number of requests that
1717
can be queued at once. Requests to submit() tasks block until

b2sdk/bucket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ def __repr__(self):
943943
return 'Bucket<%s,%s,%s>' % (self.id_, self.name, self.type_)
944944

945945

946-
class BucketFactory(object):
946+
class BucketFactory:
947947
"""
948948
This is a factory for creating bucket objects from different kind of objects.
949949
"""

b2sdk/file_version.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def _get_args_for_clone(self):
348348
return args
349349

350350

351-
class FileVersionFactory(object):
351+
class FileVersionFactory:
352352
"""
353353
Construct :py:class:`b2sdk.v2.FileVersion` objects from api responses.
354354
"""
@@ -430,7 +430,7 @@ def from_api_response(self, file_version_dict, force_action=None):
430430
)
431431

432432

433-
class DownloadVersionFactory(object):
433+
class DownloadVersionFactory:
434434
"""
435435
Construct :py:class:`b2sdk.v2.DownloadVersion` objects from download headers.
436436
"""
@@ -487,7 +487,7 @@ def from_response_headers(self, headers):
487487
)
488488

489489

490-
class FileIdAndName(object):
490+
class FileIdAndName:
491491
"""
492492
A structure which represents a B2 cloud file with just `file_name` and `fileId` attributes.
493493

b2sdk/large_file/part.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
######################################################################
1010

1111

12-
class PartFactory(object):
12+
class PartFactory:
1313
@classmethod
1414
def from_list_parts_dict(cls, part_dict):
1515
return Part(
@@ -20,7 +20,7 @@ def from_list_parts_dict(cls, part_dict):
2020
)
2121

2222

23-
class Part(object):
23+
class Part:
2424
"""
2525
A structure which represents a *part* of a large file upload.
2626

b2sdk/large_file/services.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from b2sdk.large_file.unfinished_large_file import UnfinishedLargeFile
1818

1919

20-
class LargeFileServices(object):
20+
class LargeFileServices:
2121
def __init__(self, services):
2222
self.services = services
2323

0 commit comments

Comments
 (0)