17
0
Files
python-google-cloud-storage/demock.patch
Markéta Machová 306bf5432c Accepting request 1327659 from home:glaubitz:branches:devel:languages:python:google
- Update to 3.8.0
  * flush the last chunk in append method (#1699)
  * add write resumption strategy (#1663)
  * add bidi stream retry manager. (#1632)
  * implement "append_from_file" (#1686)
  * make flush size configurable (#1677)
  * compute chunk wise checksum for bidi_writes (#1675)
  * expose persisted size in mrd (#1671)
  * add system test for opening with read_handle (#1672)
  * no state lookup while opening bidi-write stream (#1636)
  * close write object stream always (#1661)
- from version 3.7.0
  * Auto enable mTLS when supported certificates are detected (#1637)
  * Send entire object checksum in the final api call of resumable upload (#1654)
  * Support urllib3 >= 2.6.0 (#1658)
  * Fix for move_blob failure when the new blob name contains characters that
    need to be url encoded (#1605)
- from version 3.6.0
  * Add support for partial list buckets (#1606)
  * Make return_partial_success and unreachable fields public for list Bucket (#1601)
  * **zb-experimental:** Add async write object stream
  * **zb-experimental:** Add async write object stream (#1612)
  * Dont pass credentials to StorageClient (#1608)
- from version 3.5.0
  * **experimental:** Add base resumption strategy for bidi streams (#1594)
  * **experimental:** Add checksum for bidi reads operation (#1566)
  * **experimental:** Add read resumption strategy (#1599)
  * **experimental:** Handle BidiReadObjectRedirectedError for bidi reads (#1600)
  * Indicate that md5 is used as a CRC (#1522)
  * Provide option to update user_agent (#1596)

OBS-URL: https://build.opensuse.org/request/show/1327659
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:google/python-google-cloud-storage?expand=0&rev=19
2026-01-16 13:10:32 +00:00

334 lines
11 KiB
Diff

diff -Nru google_cloud_storage-3.8.0.orig/google/cloud/storage/_media/requests/__init__.py google_cloud_storage-3.8.0/google/cloud/storage/_media/requests/__init__.py
--- google_cloud_storage-3.8.0.orig/google/cloud/storage/_media/requests/__init__.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/google/cloud/storage/_media/requests/__init__.py 2026-01-16 10:59:54.646351819 +0100
@@ -32,7 +32,7 @@
import google.auth
import google.auth.credentials as creds_mod
- import mock
+ from unittest import mock
def mock_default(scopes=None):
credentials = mock.Mock(spec=creds_mod.Credentials)
@@ -68,7 +68,7 @@
.. testsetup:: basic-download
- import mock
+ from unittest import mock
import requests
import http.client
@@ -111,7 +111,7 @@
.. testsetup:: basic-download-with-slice
- import mock
+ from unittest import mock
import requests
import http.client
@@ -170,7 +170,7 @@
import io
- import mock
+ from unittest import mock
import requests
import http.client
@@ -230,7 +230,7 @@
.. testsetup:: chunked-download-end
- import mock
+ from unittest import mock
import requests
import http.client
@@ -303,7 +303,7 @@
import json
- import mock
+ from unittest import mock
import requests
import http.client
@@ -363,7 +363,7 @@
import time
- import mock
+ from unittest import mock
import requests
import http.client
@@ -438,7 +438,7 @@
import json
- import mock
+ from unittest import mock
import requests
import http.client
@@ -524,7 +524,7 @@
import io
- import mock
+ from unittest import mock
import requests
import http.client
@@ -585,7 +585,7 @@
import io
import json
- import mock
+ from unittest import mock
import requests
import http.client
diff -Nru google_cloud_storage-3.8.0.orig/google/cloud/storage/_media/requests/upload.py google_cloud_storage-3.8.0/google/cloud/storage/_media/requests/upload.py
--- google_cloud_storage-3.8.0.orig/google/cloud/storage/_media/requests/upload.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/google/cloud/storage/_media/requests/upload.py 2026-01-16 10:59:54.644082466 +0100
@@ -198,7 +198,7 @@
import os
import tempfile
- import mock
+ from unittest import mock
import requests
import http.client
@@ -255,7 +255,7 @@
import io
- import mock
+ from unittest import mock
import requests
import http.client
@@ -296,7 +296,7 @@
import io
- import mock
+ from unittest import mock
import requests
import http.client
@@ -457,7 +457,7 @@
import io
- import mock
+ from unittest import mock
import requests
import http.client
diff -Nru google_cloud_storage-3.8.0.orig/tests/system/test_blob.py google_cloud_storage-3.8.0/tests/system/test_blob.py
--- google_cloud_storage-3.8.0.orig/tests/system/test_blob.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/system/test_blob.py 2026-01-16 10:59:54.678155512 +0100
@@ -21,7 +21,7 @@
import warnings
import pytest
-import mock
+from unittest import mock
from google.cloud.storage.exceptions import DataCorruption
from google.api_core import exceptions
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/gapic/storage_v2/test_storage.py google_cloud_storage-3.8.0/tests/unit/gapic/storage_v2/test_storage.py
--- google_cloud_storage-3.8.0.orig/tests/unit/gapic/storage_v2/test_storage.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/gapic/storage_v2/test_storage.py 2026-01-16 10:59:54.757161041 +0100
@@ -20,7 +20,7 @@
from unittest import mock
from unittest.mock import AsyncMock # pragma: NO COVER
except ImportError: # pragma: NO COVER
- import mock
+ from unittest import mock
import grpc
from grpc.experimental import aio
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test_acl.py google_cloud_storage-3.8.0/tests/unit/test_acl.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test_acl.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test_acl.py 2026-01-16 10:59:54.769161251 +0100
@@ -14,7 +14,7 @@
import unittest
-import mock
+from unittest import mock
from google.cloud.storage.retry import (
DEFAULT_RETRY,
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test_batch.py google_cloud_storage-3.8.0/tests/unit/test_batch.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test_batch.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test_batch.py 2026-01-16 10:59:54.723595781 +0100
@@ -17,7 +17,7 @@
from http.client import NO_CONTENT
import unittest
-import mock
+from unittest import mock
import requests
from google.cloud.storage._helpers import _DEFAULT_UNIVERSE_DOMAIN
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test_blob.py google_cloud_storage-3.8.0/tests/unit/test_blob.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test_blob.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test_blob.py 2026-01-16 10:59:54.711160236 +0100
@@ -24,7 +24,7 @@
from unittest.mock import patch
from urllib.parse import urlencode
-import mock
+from unittest import mock
import pytest
from google.cloud.exceptions import NotFound
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test_bucket.py google_cloud_storage-3.8.0/tests/unit/test_bucket.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test_bucket.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test_bucket.py 2026-01-16 10:59:54.767161216 +0100
@@ -15,7 +15,7 @@
import datetime
import unittest
-import mock
+from unittest import mock
import pytest
from google.cloud.storage.blob import _quote
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test_client.py google_cloud_storage-3.8.0/tests/unit/test_client.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test_client.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test_client.py 2026-01-16 10:59:54.720694818 +0100
@@ -17,7 +17,7 @@
import io
import json
from unittest.mock import patch
-import mock
+from unittest import mock
import pytest
import re
import requests
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test_fileio.py google_cloud_storage-3.8.0/tests/unit/test_fileio.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test_fileio.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test_fileio.py 2026-01-16 10:59:54.718626447 +0100
@@ -18,7 +18,7 @@
import io
import string
-import mock
+from unittest import mock
from google.api_core.exceptions import RequestRangeNotSatisfiable
from google.cloud.storage.fileio import CHUNK_SIZE_MULTIPLE
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test__helpers.py google_cloud_storage-3.8.0/tests/unit/test__helpers.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test__helpers.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test__helpers.py 2026-01-16 10:59:54.716578054 +0100
@@ -14,7 +14,7 @@
import unittest
-import mock
+from unittest import mock
from google.cloud.storage.retry import DEFAULT_RETRY
from google.cloud.storage.retry import DEFAULT_RETRY_IF_METAGENERATION_SPECIFIED
@@ -586,7 +586,7 @@
self.assertEqual(SIGNED_CONTENT, b"kBiQqOnIz21aGlQrIp/r/w==")
def test_it_with_stubs(self):
- import mock
+ from unittest import mock
class _Buffer(object):
def __init__(self, return_vals):
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test_hmac_key.py google_cloud_storage-3.8.0/tests/unit/test_hmac_key.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test_hmac_key.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test_hmac_key.py 2026-01-16 10:59:54.764429205 +0100
@@ -14,7 +14,7 @@
import unittest
-import mock
+from unittest import mock
from google.cloud.storage.retry import DEFAULT_RETRY
from google.cloud.storage.retry import DEFAULT_RETRY_IF_ETAG_IN_JSON
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test__http.py google_cloud_storage-3.8.0/tests/unit/test__http.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test__http.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test__http.py 2026-01-16 10:59:54.704689771 +0100
@@ -15,7 +15,7 @@
import unittest
from unittest.mock import patch
-import mock
+from unittest import mock
from google.cloud.storage import _helpers
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test_notification.py google_cloud_storage-3.8.0/tests/unit/test_notification.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test_notification.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test_notification.py 2026-01-16 10:59:54.706550807 +0100
@@ -14,7 +14,7 @@
import unittest
-import mock
+from unittest import mock
from google.cloud.storage.retry import DEFAULT_RETRY
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test__opentelemetry_tracing.py google_cloud_storage-3.8.0/tests/unit/test__opentelemetry_tracing.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test__opentelemetry_tracing.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test__opentelemetry_tracing.py 2026-01-16 10:59:54.708494391 +0100
@@ -17,7 +17,7 @@
import pytest
import sys
-import mock
+from unittest import mock
from google.api_core.exceptions import GoogleAPICallError
from google.cloud.storage import __version__
from google.cloud.storage import _opentelemetry_tracing
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test_retry.py google_cloud_storage-3.8.0/tests/unit/test_retry.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test_retry.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test_retry.py 2026-01-16 10:59:54.746717083 +0100
@@ -17,7 +17,7 @@
from google.cloud.storage import _helpers
from google.cloud.storage.exceptions import InvalidResponse
-import mock
+from unittest import mock
class Test_should_retry(unittest.TestCase):
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test__signing.py google_cloud_storage-3.8.0/tests/unit/test__signing.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test__signing.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test__signing.py 2026-01-16 10:59:54.714434821 +0100
@@ -23,7 +23,7 @@
import unittest
import urllib.parse
-import mock
+from unittest import mock
import pytest
from google.cloud.storage._helpers import _UTC
diff -Nru google_cloud_storage-3.8.0.orig/tests/unit/test_transfer_manager.py google_cloud_storage-3.8.0/tests/unit/test_transfer_manager.py
--- google_cloud_storage-3.8.0.orig/tests/unit/test_transfer_manager.py 2026-01-14 01:41:56.000000000 +0100
+++ google_cloud_storage-3.8.0/tests/unit/test_transfer_manager.py 2026-01-16 10:59:54.744589019 +0100
@@ -25,7 +25,7 @@
import os
import tempfile
-import mock
+from unittest import mock
import pickle
BLOB_TOKEN_STRING = "blob token"