Comments (7)
ISTM that this effort is not complete: e.g., the client does not have a get_blob
method, nor any of the notification-related methods for buckets.
This partial refactoring complicates the tests a lot -- if it were complete, then bucket / blob unit tests would just use mocked clients and assert that the corresponding method is called correctly, rather than creating mock connections (and real clients, see #416) and grubbing around three layers down.
Basically, any non-client method using the client's _connection
to make API requests should instead be calling a method of the client:
$ git grep api_request google/cloud/storage/{_helpers,blob,bucket,hmac_key,notification}.py
google/cloud/storage/_helpers.py: api_response = client._connection.api_request(
google/cloud/storage/_helpers.py: api_response = client._connection.api_request(
google/cloud/storage/_helpers.py: api_response = client._connection.api_request(
google/cloud/storage/blob.py: client._connection.api_request(
google/cloud/storage/blob.py: info = client._connection.api_request(
google/cloud/storage/blob.py: info = client._connection.api_request(
google/cloud/storage/blob.py: resp = client._connection.api_request(
google/cloud/storage/blob.py: api_response = client._connection.api_request(
google/cloud/storage/blob.py: api_response = client._connection.api_request(
google/cloud/storage/bucket.py: client._connection.api_request(
google/cloud/storage/bucket.py: api_request = functools.partial(
google/cloud/storage/bucket.py: client._connection.api_request, timeout=timeout, retry=retry
google/cloud/storage/bucket.py: api_request=api_request,
google/cloud/storage/bucket.py: client._connection.api_request(
google/cloud/storage/bucket.py: client._connection.api_request(
google/cloud/storage/bucket.py: copy_result = client._connection.api_request(
google/cloud/storage/bucket.py: info = client._connection.api_request(
google/cloud/storage/bucket.py: info = client._connection.api_request(
google/cloud/storage/bucket.py: resp = client._connection.api_request(
google/cloud/storage/bucket.py: api_response = client._connection.api_request(
google/cloud/storage/hmac_key.py: self._client._connection.api_request(
google/cloud/storage/hmac_key.py: self._properties = self._client._connection.api_request(
google/cloud/storage/hmac_key.py: self._properties = self._client._connection.api_request(
google/cloud/storage/hmac_key.py: self._client._connection.api_request(
google/cloud/storage/notification.py: self._properties = client._connection.api_request(
google/cloud/storage/notification.py: client._connection.api_request(
google/cloud/storage/notification.py: response = client._connection.api_request(
google/cloud/storage/notification.py: client._connection.api_request(
from python-storage.
@IlyaFaer I believe this is complete. I'm closing FR.
If there's something that I missed please reopen.
from python-storage.
@frankyn, I've delegated the last part to @paul1319
@paul1319, do you have something to push for this issue?
from python-storage.
Reopening in case there's something pending.
from python-storage.
@IlyaFaer haven't heard back for a bit. What's remaining?
from python-storage.
@frankyn as I see it, Blob class Refactor and Deprecate part.
from python-storage.
I believe the refactor is complete through #431 #436 #441 #442 #443 #446
from python-storage.
Related Issues (20)
- tests.system.test_bucket: test_blob_exists_hierarchy failed HOT 1
- tests.system.test_bucket: test_bucket_list_blobs_hierarchy_root_level failed
- tests.system.test_bucket: test_bucket_list_blobs_hierarchy_first_level failed
- tests.system.test_bucket: test_bucket_list_blobs_hierarchy_second_level failed
- tests.system.test_bucket: test_bucket_list_blobs_hierarchy_third_level failed
- tests.system.test_bucket: test_bucket_list_blobs_hierarchy_w_include_trailing_delimiter failed
- tests.system.test_bucket: test_bucket_list_blobs failed HOT 1
- tests.system.test_bucket: test_bucket_list_blobs_w_user_project failed
- tests.system.test_bucket: test_bucket_list_blobs_paginated failed HOT 1
- tests.system.test_bucket: test_bucket_list_blobs_paginated_w_offset failed HOT 1
- tests.system.test_transfer_manager: test_upload_many_skip_if_exists failed HOT 2
- tests.system.test_transfer_manager: test_upload_many_from_filenames_with_attributes failed HOT 1
- tests.system.test_transfer_manager: test_download_many failed HOT 1
- tests.system.test_transfer_manager: test_download_many_with_threads_and_file_objs failed HOT 1
- tests.system.test_bucket: test_ubla_set_unset_preserves_acls failed HOT 1
- tests.system.test_kms_integration: test_bucket_w_default_kms_key_name failed HOT 1
- Make it possible to update / add to the user-agent for an existing client object
- Micropi cannot install the package HOT 1
- OSError occurred while downloading files using transfer_manager.download_many_to_path HOT 6
- Warning: a recent release failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-storage.