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: move grpc, proto-plus and protobuf packages to extras #1721

Merged
merged 6 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,16 @@
# 'Development Status :: 5 - Production/Stable'
release_status = "Development Status :: 5 - Production/Stable"
dependencies = [
"grpcio >= 1.47.0, < 2.0dev", # https://github.com/googleapis/python-bigquery/issues/1262
"grpcio >= 1.49.1, < 2.0dev; python_version>='3.11'",
# NOTE: Maintainers, please do not require google-api-core>=2.x.x
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to the grpcio install? Why have these been removed entirely?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we mentioned this at our last meeting, but it was because grpcio was both in dependencies and bqstorage optional extras, I believe it was supposed to be moved there but was not until the referenced issue above it was closed

# Until this issue is closed
# https://github.com/googleapis/google-cloud-python/issues/10566
"google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0",
"proto-plus >= 1.15.0, <2.0.0dev",
"google-api-core >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0",
kiraksi marked this conversation as resolved.
Show resolved Hide resolved
# NOTE: Maintainers, please do not require google-cloud-core>=2.x.x
# Until this issue is closed
# https://github.com/googleapis/google-cloud-python/issues/10566
"google-cloud-core >= 1.6.0, <3.0.0dev",
"google-resumable-media >= 0.6.0, < 3.0dev",
"packaging >= 20.0.0",
"protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", # For the legacy proto-based types.
"python-dateutil >= 2.7.2, <3.0dev",
"requests >= 2.21.0, < 3.0.0dev",
]
Expand Down Expand Up @@ -82,6 +78,10 @@
"opentelemetry-sdk >= 1.1.0",
"opentelemetry-instrumentation >= 0.20b0",
],
"bigquery_v2": [
"proto-plus >= 1.15.0, <2.0.0dev",
"protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", # For the legacy proto-based types.
],
}

all_extras = []
Expand Down
8 changes: 8 additions & 0 deletions tests/unit/test_legacy_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest

import warnings

try:
import proto # type: ignore
except ImportError: # pragma: NO COVER
proto = None


@pytest.mark.skipif(proto is None, reason="proto is not installed")
def test_importing_legacy_types_emits_warning():
with warnings.catch_warnings(record=True) as warned:
from google.cloud.bigquery_v2 import types # noqa: F401
Expand Down