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

fix!: drop Python 2.7 support #229

Merged
merged 20 commits into from Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions tests/unit/requests/test_download.py
Expand Up @@ -24,10 +24,8 @@
from google.resumable_media.requests import _request_helpers


EXAMPLE_URL = (
"https://www.googleapis.com/download/storage/v1/b/"
"{BUCKET}/o/{OBJECT}?alt=media"
)
URL_PREFIX = "https://www.googleapis.com/download/storage/v1/b/{BUCKET}/o/"
EXAMPLE_URL = URL_PREFIX + "{OBJECT}?alt=media"
EXPECTED_TIMEOUT = (61, 60)


Expand Down
16 changes: 4 additions & 12 deletions tests/unit/requests/test_upload.py
Expand Up @@ -22,18 +22,10 @@
import google.resumable_media.requests.upload as upload_mod


SIMPLE_URL = (
"https://www.googleapis.com/upload/storage/v1/b/{BUCKET}/o?"
"uploadType=media&name={OBJECT}"
)
MULTIPART_URL = (
"https://www.googleapis.com/upload/storage/v1/b/{BUCKET}/o?"
"uploadType=multipart"
)
RESUMABLE_URL = (
"https://www.googleapis.com/upload/storage/v1/b/{BUCKET}/o?"
"uploadType=resumable"
)
URL_PREFIX = "https://www.googleapis.com/upload/storage/v1/b/{BUCKET}/o"
SIMPLE_URL = URL_PREFIX + "?uploadType=media&name={OBJECT}"
MULTIPART_URL = URL_PREFIX + "?uploadType=multipart"
RESUMABLE_URL = URL_PREFIX + "?uploadType=resumable"
ONE_MB = 1024 * 1024
BASIC_CONTENT = "text/plain"
JSON_TYPE = "application/json; charset=UTF-8"
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/test__download.py
Expand Up @@ -23,8 +23,7 @@


EXAMPLE_URL = (
"https://www.googleapis.com/download/storage/v1/b/"
"{BUCKET}/o/{OBJECT}?alt=media"
"https://www.googleapis.com/download/storage/v1/b/" "{BUCKET}/o/{OBJECT}?alt=media"
tseaver marked this conversation as resolved.
Show resolved Hide resolved
)


Expand Down
6 changes: 5 additions & 1 deletion tests/unit/test__helpers.py
Expand Up @@ -446,7 +446,11 @@ def test__is_fast_crcmod_wo_extension_warning(mock_import):
assert not _helpers._is_fast_crcmod()

mock_import.assert_called_once_with(
"crcmod.crcmod", mock.ANY, {}, ["_usingExtension"], 0,
"crcmod.crcmod",
mock.ANY,
{},
["_usingExtension"],
0,
)


Expand Down
16 changes: 4 additions & 12 deletions tests/unit/test__upload.py
Expand Up @@ -25,18 +25,10 @@
from google.resumable_media import common


SIMPLE_URL = (
"https://www.googleapis.com/upload/storage/v1/b/{BUCKET}/o?"
"uploadType=media&name={OBJECT}"
)
MULTIPART_URL = (
"https://www.googleapis.com/upload/storage/v1/b/{BUCKET}/o?"
"uploadType=multipart"
)
RESUMABLE_URL = (
"https://www.googleapis.com/upload/storage/v1/b/{BUCKET}/o?"
"uploadType=resumable"
)
URL_PREFIX = "https://www.googleapis.com/upload/storage/v1/b/{BUCKET}/o"
SIMPLE_URL = URL_PREFIX + "?uploadType=media&name={OBJECT}"
MULTIPART_URL = URL_PREFIX + "?uploadType=multipart"
RESUMABLE_URL = URL_PREFIX + "?uploadType=resumable"
ONE_MB = 1024 * 1024
BASIC_CONTENT = "text/plain"
JSON_TYPE = "application/json; charset=UTF-8"
Expand Down