Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit 74be886

Browse files
fix: require google-api-core >= 1.22.2 (#103)
1 parent ea74423 commit 74be886

File tree

6 files changed

+28
-121
lines changed

6 files changed

+28
-121
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ repos:
1212
hooks:
1313
- id: black
1414
- repo: https://gitlab.com/pycqa/flake8
15-
rev: 3.8.4
15+
rev: 3.9.0
1616
hooks:
1717
- id: flake8

UPGRADING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Methods expect request objects. We provide a script that will convert most commo
2020
* Install the library
2121

2222
```py
23-
python3 -m pip install google-cloud-containeranalysis
23+
python3 -m pip install google-cloud-containeranalysis[libcst]
2424
```
2525

2626
* The script `fixup_containeranalysis_v1_keywords.py` is shipped with the library. It expects

noxfile.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
from __future__ import absolute_import
2020
import os
21+
import pathlib
2122
import shutil
2223

2324
import nox
@@ -30,6 +31,8 @@
3031
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"]
3132
UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
3233

34+
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
35+
3336
# 'docfx' is excluded since it only needs to run in 'docs-presubmit'
3437
nox.options.sessions = [
3538
"unit",
@@ -84,13 +87,15 @@ def lint_setup_py(session):
8487

8588
def default(session):
8689
# Install all test dependencies, then install this package in-place.
87-
session.install("asyncmock", "pytest-asyncio")
8890

89-
session.install(
90-
"mock", "pytest", "pytest-cov",
91+
constraints_path = str(
92+
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
9193
)
94+
session.install("asyncmock", "pytest-asyncio", "-c", constraints_path)
9295

93-
session.install("-e", ".")
96+
session.install("mock", "pytest", "pytest-cov", "-c", constraints_path)
97+
98+
session.install("-e", ".", "-c", constraints_path)
9499

95100
# Run py.test against the unit tests.
96101
session.run(
@@ -117,6 +122,9 @@ def unit(session):
117122
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
118123
def system(session):
119124
"""Run the system test suite."""
125+
constraints_path = str(
126+
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
127+
)
120128
system_test_path = os.path.join("tests", "system.py")
121129
system_test_folder_path = os.path.join("tests", "system")
122130

@@ -141,10 +149,8 @@ def system(session):
141149

142150
# Install all test dependencies, then install this package into the
143151
# virtualenv's dist-packages.
144-
session.install(
145-
"mock", "pytest", "google-cloud-testutils",
146-
)
147-
session.install("-e", ".")
152+
session.install("mock", "pytest", "google-cloud-testutils", "-c", constraints_path)
153+
session.install("-e", ".", "-c", constraints_path)
148154

149155
# Run py.test against the system tests.
150156
if system_test_exists:
@@ -205,9 +211,7 @@ def docfx(session):
205211
"""Build the docfx yaml files for this library."""
206212

207213
session.install("-e", ".")
208-
# sphinx-docfx-yaml supports up to sphinx version 1.5.5.
209-
# https://github.com/docascode/sphinx-docfx-yaml/issues/97
210-
session.install("sphinx==1.5.5", "alabaster", "recommonmark", "sphinx-docfx-yaml")
214+
session.install("sphinx", "alabaster", "recommonmark", "gcp-sphinx-docfx-yaml")
211215

212216
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
213217
session.run(

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
version = "2.2.2"
2626
release_status = "Development Status :: 5 - Production/Stable"
2727
dependencies = [
28-
"google-api-core[grpc] >= 1.22.0, < 2.0.0dev",
28+
"google-api-core[grpc] >= 1.22.2, < 2.0.0dev",
2929
"grpc-google-iam-v1 >= 0.12.3, < 0.13dev",
3030
"proto-plus >= 1.4.0",
31-
"libcst >= 0.2.5",
3231
"grafeas >=1.0.0, <2.0dev",
3332
]
33+
extras = {"libcst": "libcst >= 0.2.5"}
3434

3535

3636
package_root = os.path.abspath(os.path.dirname(__file__))
@@ -76,6 +76,7 @@
7676
packages=packages,
7777
namespace_packages=namespaces,
7878
install_requires=dependencies,
79+
extras_requires=extras,
7980
python_requires=">=3.6",
8081
scripts=["scripts/fixup_containeranalysis_v1_keywords.py"],
8182
include_package_data=True,

synth.metadata

Lines changed: 6 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,30 @@
33
{
44
"git": {
55
"name": ".",
6-
"remote": "https://github.com/googleapis/python-containeranalysis.git",
7-
"sha": "0246d28a08958cf3b625c134eed455d622c73062"
6+
"remote": "git@github.com:googleapis/python-containeranalysis",
7+
"sha": "971a03c1fe4ac9e0f15972bd5b35bcf9bea3966f"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "149a3a84c29c9b8189576c7442ccb6dcf6a8f95b",
15-
"internalRef": "364411656"
14+
"sha": "f6b491910e5ebbb7f3bb9b13f53294b6e94b2f48",
15+
"internalRef": "366337595"
1616
}
1717
},
1818
{
1919
"git": {
2020
"name": "synthtool",
2121
"remote": "https://github.com/googleapis/synthtool.git",
22-
"sha": "79c8dd7ee768292f933012d3a69a5b4676404cda"
22+
"sha": "6d76df2138f8f841e5a5b9ac427f81def520c15f"
2323
}
2424
},
2525
{
2626
"git": {
2727
"name": "synthtool",
2828
"remote": "https://github.com/googleapis/synthtool.git",
29-
"sha": "79c8dd7ee768292f933012d3a69a5b4676404cda"
29+
"sha": "6d76df2138f8f841e5a5b9ac427f81def520c15f"
3030
}
3131
}
3232
],
@@ -40,103 +40,5 @@
4040
"generator": "bazel"
4141
}
4242
}
43-
],
44-
"generatedFiles": [
45-
".coveragerc",
46-
".flake8",
47-
".github/CONTRIBUTING.md",
48-
".github/ISSUE_TEMPLATE/bug_report.md",
49-
".github/ISSUE_TEMPLATE/feature_request.md",
50-
".github/ISSUE_TEMPLATE/support_request.md",
51-
".github/PULL_REQUEST_TEMPLATE.md",
52-
".github/header-checker-lint.yml",
53-
".github/release-please.yml",
54-
".github/snippet-bot.yml",
55-
".gitignore",
56-
".kokoro/build.sh",
57-
".kokoro/continuous/common.cfg",
58-
".kokoro/continuous/continuous.cfg",
59-
".kokoro/docker/docs/Dockerfile",
60-
".kokoro/docker/docs/fetch_gpg_keys.sh",
61-
".kokoro/docs/common.cfg",
62-
".kokoro/docs/docs-presubmit.cfg",
63-
".kokoro/docs/docs.cfg",
64-
".kokoro/populate-secrets.sh",
65-
".kokoro/presubmit/common.cfg",
66-
".kokoro/presubmit/presubmit.cfg",
67-
".kokoro/publish-docs.sh",
68-
".kokoro/release.sh",
69-
".kokoro/release/common.cfg",
70-
".kokoro/release/release.cfg",
71-
".kokoro/samples/lint/common.cfg",
72-
".kokoro/samples/lint/continuous.cfg",
73-
".kokoro/samples/lint/periodic.cfg",
74-
".kokoro/samples/lint/presubmit.cfg",
75-
".kokoro/samples/python3.6/common.cfg",
76-
".kokoro/samples/python3.6/continuous.cfg",
77-
".kokoro/samples/python3.6/periodic-head.cfg",
78-
".kokoro/samples/python3.6/periodic.cfg",
79-
".kokoro/samples/python3.6/presubmit.cfg",
80-
".kokoro/samples/python3.7/common.cfg",
81-
".kokoro/samples/python3.7/continuous.cfg",
82-
".kokoro/samples/python3.7/periodic-head.cfg",
83-
".kokoro/samples/python3.7/periodic.cfg",
84-
".kokoro/samples/python3.7/presubmit.cfg",
85-
".kokoro/samples/python3.8/common.cfg",
86-
".kokoro/samples/python3.8/continuous.cfg",
87-
".kokoro/samples/python3.8/periodic-head.cfg",
88-
".kokoro/samples/python3.8/periodic.cfg",
89-
".kokoro/samples/python3.8/presubmit.cfg",
90-
".kokoro/test-samples-against-head.sh",
91-
".kokoro/test-samples-impl.sh",
92-
".kokoro/test-samples.sh",
93-
".kokoro/trampoline.sh",
94-
".kokoro/trampoline_v2.sh",
95-
".pre-commit-config.yaml",
96-
".trampolinerc",
97-
"CODE_OF_CONDUCT.md",
98-
"CONTRIBUTING.rst",
99-
"LICENSE",
100-
"MANIFEST.in",
101-
"docs/_static/custom.css",
102-
"docs/_templates/layout.html",
103-
"docs/conf.py",
104-
"docs/containeranalysis_v1/container_analysis.rst",
105-
"docs/containeranalysis_v1/services.rst",
106-
"docs/containeranalysis_v1/types.rst",
107-
"docs/multiprocessing.rst",
108-
"google/cloud/devtools/containeranalysis/__init__.py",
109-
"google/cloud/devtools/containeranalysis/py.typed",
110-
"google/cloud/devtools/containeranalysis_v1/__init__.py",
111-
"google/cloud/devtools/containeranalysis_v1/proto/containeranalysis.proto",
112-
"google/cloud/devtools/containeranalysis_v1/py.typed",
113-
"google/cloud/devtools/containeranalysis_v1/services/__init__.py",
114-
"google/cloud/devtools/containeranalysis_v1/services/container_analysis/__init__.py",
115-
"google/cloud/devtools/containeranalysis_v1/services/container_analysis/async_client.py",
116-
"google/cloud/devtools/containeranalysis_v1/services/container_analysis/client.py",
117-
"google/cloud/devtools/containeranalysis_v1/services/container_analysis/transports/__init__.py",
118-
"google/cloud/devtools/containeranalysis_v1/services/container_analysis/transports/base.py",
119-
"google/cloud/devtools/containeranalysis_v1/services/container_analysis/transports/grpc.py",
120-
"google/cloud/devtools/containeranalysis_v1/services/container_analysis/transports/grpc_asyncio.py",
121-
"google/cloud/devtools/containeranalysis_v1/types/__init__.py",
122-
"google/cloud/devtools/containeranalysis_v1/types/containeranalysis.py",
123-
"mypy.ini",
124-
"noxfile.py",
125-
"renovate.json",
126-
"samples/AUTHORING_GUIDE.md",
127-
"samples/CONTRIBUTING.md",
128-
"samples/snippets/noxfile.py",
129-
"scripts/decrypt-secrets.sh",
130-
"scripts/fixup_containeranalysis_v1_keywords.py",
131-
"scripts/readme-gen/readme_gen.py",
132-
"scripts/readme-gen/templates/README.tmpl.rst",
133-
"scripts/readme-gen/templates/auth.tmpl.rst",
134-
"scripts/readme-gen/templates/auth_api_key.tmpl.rst",
135-
"scripts/readme-gen/templates/install_deps.tmpl.rst",
136-
"scripts/readme-gen/templates/install_portaudio.tmpl.rst",
137-
"setup.cfg",
138-
"testing/.gitignore",
139-
"tests/unit/gapic/containeranalysis_v1/__init__.py",
140-
"tests/unit/gapic/containeranalysis_v1/test_container_analysis.py"
14143
]
14244
}

testing/constraints-3.6.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#
66
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
77
# Then this file should have foo==1.14.0
8-
google-api-core==1.22.0
8+
google-api-core==1.22.2
99
grpc-google-iam-v1==0.12.3
1010
proto-plus==1.4.0
1111
libcst==0.2.5
12-
grafeas==1.0.0
12+
grafeas==1.0.0

0 commit comments

Comments
 (0)