Skip to content

Commit

Permalink
chore(deps): bump urllib3 from 1.26.12 to 1.26.17 in /.kokoro (#1140)
Browse files Browse the repository at this point in the history
* chore: [autoapprove] Update `black` and `isort` to latest versions

Source-Link: googleapis/synthtool@0c7b033
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:08e34975760f002746b1d8c86fdc90660be45945ee6d9db914d1508acdf9a547

* update black in noxfile.py

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people authored Oct 10, 2023
1 parent 3a0f551 commit aefcdd4
Show file tree
Hide file tree
Showing 17 changed files with 11 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:fac304457974bb530cc5396abd4ab25d26a469cd3bc97cbfb18c8d4324c584eb
# created: 2023-10-02T21:31:03.517640371Z
digest: sha256:08e34975760f002746b1d8c86fdc90660be45945ee6d9db914d1508acdf9a547
# created: 2023-10-09T14:06:13.397766266Z
6 changes: 3 additions & 3 deletions .kokoro/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,9 @@ typing-extensions==4.4.0 \
--hash=sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa \
--hash=sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e
# via -r requirements.in
urllib3==1.26.12 \
--hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \
--hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997
urllib3==1.26.17 \
--hash=sha256:24d6a242c28d29af46c3fae832c36db3bbebcc533dd1bb549172cd739c82df21 \
--hash=sha256:94a757d178c9be92ef5539b8840d48dc9cf1b2709c9d6b588232a055c524458b
# via
# requests
# twine
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
Expand Down
2 changes: 0 additions & 2 deletions google/cloud/storage/_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ def get_expiration_seconds_v4(expiration):
seconds = expiration

if isinstance(expiration, datetime.datetime):

if expiration.tzinfo is None:
expiration = expiration.replace(tzinfo=_helpers.UTC)

Expand Down Expand Up @@ -646,7 +645,6 @@ def get_v4_now_dtstamps():


def _sign_message(message, access_token, service_account_email):

"""Signs a message.
:type message: str
Expand Down
1 change: 0 additions & 1 deletion google/cloud/storage/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,6 @@ def _do_download(
response = download.consume(transport, timeout=timeout)
self._extract_headers_from_download(response)
else:

if checksum:
msg = _CHUNKED_DOWNLOAD_CHECKSUM_MESSAGE.format(checksum)
_logger.info(msg)
Expand Down
2 changes: 0 additions & 2 deletions google/cloud/storage/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,15 +474,13 @@ def __init__(
bucket_policy_only_locked_time=_default,
):
if bucket_policy_only_enabled is not _default:

if uniform_bucket_level_access_enabled is not _default:
raise ValueError(_UBLA_BPO_ENABLED_MESSAGE)

warnings.warn(_BPO_ENABLED_MESSAGE, DeprecationWarning, stacklevel=2)
uniform_bucket_level_access_enabled = bucket_policy_only_enabled

if bucket_policy_only_locked_time is not _default:

if uniform_bucket_level_access_locked_time is not _default:
raise ValueError(_UBLA_BPO_LOCK_TIME_MESSAGE)

Expand Down
1 change: 0 additions & 1 deletion google/cloud/storage/transfer_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,6 @@ def upload_chunks_concurrently(
futures = []

with pool_class(max_workers=max_workers) as executor:

for part_number in range(1, num_of_parts + 1):
start = (part_number - 1) * chunk_size
end = min(part_number * chunk_size, size)
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import nox


BLACK_VERSION = "black==22.3.0"
BLACK_VERSION = "black==23.7.0"
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.8"
Expand Down
3 changes: 0 additions & 3 deletions tests/system/test_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def test_large_file_write_from_stream_w_failed_checksum(
# The # remote API is still exercised.
info = file_data["big"]
with open(info["path"], "rb") as file_obj:

with mock.patch(
"google.resumable_media._helpers.prepare_checksum_digest",
return_value="FFFFFF==",
Expand Down Expand Up @@ -527,7 +526,6 @@ def test_blob_direct_write_and_read_into_file(
same_blob.reload() # Initialize properties.

with tempfile.NamedTemporaryFile() as temp_f:

with open(temp_f.name, "wb") as file_obj:
same_blob.download_to_file(file_obj)

Expand All @@ -553,7 +551,6 @@ def test_blob_download_w_generation_match(
same_blob.reload() # Initialize properties.

with tempfile.NamedTemporaryFile() as temp_f:

with open(temp_f.name, "wb") as file_obj:
with pytest.raises(exceptions.PreconditionFailed):
same_blob.download_to_file(
Expand Down
1 change: 0 additions & 1 deletion tests/system/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ def test_download_blob_to_file_w_uri(
blobs_to_delete.append(blob)

with tempfile.NamedTemporaryFile() as temp_f:

with open(temp_f.name, "wb") as file_obj:
storage_client.download_blob_to_file(
"gs://" + shared_bucket.name + "/MyBuffer", file_obj
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test__helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def _make_one(self, *args, **kw):

def _derivedClass(self, path=None, user_project=None):
class Derived(self._get_target_class()):

client = None
_actual_encryption_headers = None

Expand Down
2 changes: 0 additions & 2 deletions tests/unit/test_acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,6 @@ def test_user_project(self):


class _Blob(object):

user_project = None

def __init__(self, bucket, blob):
Expand All @@ -1085,7 +1084,6 @@ def path(self):


class _Bucket(object):

user_project = None

def __init__(self, name):
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,6 @@ def test___setitem__(self):


class _Connection(object):

project = "TESTING"

def __init__(self, **kw):
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/test_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -3017,7 +3017,6 @@ def _do_resumable_helper(
with patch.object(
_helpers, "_get_invocation_id", return_value=GCCL_INVOCATION_TEST_CONST
):

response = blob._do_resumable_upload(
client,
stream,
Expand Down Expand Up @@ -5952,7 +5951,6 @@ def test_w_existing_qs(self):


class _Connection(object):

API_BASE_URL = "http://example.com"
USER_AGENT = "testing 1.2.3"
user_agent = "testing 1.2.3"
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2818,7 +2818,6 @@ def test_conformance_post_policy(test_data):
return_value=in_data["expiration"],
):
with mock.patch("google.cloud.storage.client._NOW", return_value=timestamp):

policy = client.generate_signed_post_policy_v4(
bucket_name=in_data["bucket"],
blob_name=in_data["object"],
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


class TestBucketNotification(unittest.TestCase):

BUCKET_NAME = "test-bucket"
BUCKET_PROJECT = "bucket-project-123"
TOPIC_NAME = "test-topic"
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/test_transfer_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_upload_many_with_filenames():
upload_kwargs=UPLOAD_KWARGS,
worker_type=transfer_manager.THREAD,
)
for (filename, mock_blob) in FILE_BLOB_PAIRS:
for filename, mock_blob in FILE_BLOB_PAIRS:
mock_blob._handle_filename_and_upload.assert_any_call(
filename, **expected_upload_kwargs
)
Expand All @@ -100,7 +100,7 @@ def test_upload_many_with_file_objs():
upload_kwargs=UPLOAD_KWARGS,
worker_type=transfer_manager.THREAD,
)
for (file, mock_blob) in FILE_BLOB_PAIRS:
for file, mock_blob in FILE_BLOB_PAIRS:
mock_blob._prep_and_do_upload.assert_any_call(file, **expected_upload_kwargs)
for result in results:
assert result == FAKE_RESULT
Expand Down Expand Up @@ -263,7 +263,7 @@ def test_download_many_with_filenames():
download_kwargs=DOWNLOAD_KWARGS,
worker_type=transfer_manager.THREAD,
)
for (mock_blob, file) in BLOB_FILE_PAIRS:
for mock_blob, file in BLOB_FILE_PAIRS:
mock_blob._handle_filename_and_download.assert_any_call(
file, **EXPECTED_DOWNLOAD_KWARGS
)
Expand All @@ -285,7 +285,7 @@ def test_download_many_with_file_objs():
download_kwargs=DOWNLOAD_KWARGS,
worker_type=transfer_manager.THREAD,
)
for (mock_blob, file) in BLOB_FILE_PAIRS:
for mock_blob, file in BLOB_FILE_PAIRS:
mock_blob._prep_and_do_download.assert_any_call(file, **DOWNLOAD_KWARGS)
for result in results:
assert result == FAKE_RESULT
Expand Down

0 comments on commit aefcdd4

Please sign in to comment.