Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ade0c24

Browse filesBrowse files
authored
Merge branch 'main' into postgresql_dialect
2 parents 1bf0440 + fa5ba0a commit ade0c24
Copy full SHA for ade0c24

File tree

Expand file treeCollapse file tree

4 files changed

+80
-2
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+80
-2
lines changed

‎.github/.OwlBot.lock.yaml

Copy file name to clipboardExpand all lines: .github/.OwlBot.lock.yaml
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:81ed5ecdfc7cac5b699ba4537376f3563f6f04122c4ec9e735d3b3dc1d43dd32
17-
# created: 2022-05-05T22:08:23.383410683Z
16+
digest: sha256:b2dc5f80edcf5d4486c39068c9fa11f7f851d9568eea4dcba130f994ea9b5e97
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Only run this nox session.
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "prerelease_deps"
7+
}

‎.kokoro/presubmit/prerelease-deps.cfg

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Only run this nox session.
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "prerelease_deps"
7+
}

‎noxfile.py

Copy file name to clipboardExpand all lines: noxfile.py
+65Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from __future__ import absolute_import
2020
import os
2121
import pathlib
22+
import re
2223
import shutil
2324
import warnings
2425

@@ -355,3 +356,67 @@ def docfx(session):
355356
os.path.join("docs", ""),
356357
os.path.join("docs", "_build", "html", ""),
357358
)
359+
360+
361+
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
362+
def prerelease_deps(session):
363+
"""Run all tests with prerelease versions of dependencies installed."""
364+
365+
prerel_deps = [
366+
"protobuf",
367+
"googleapis-common-protos",
368+
"google-auth",
369+
"grpcio",
370+
"grpcio-status",
371+
"google-api-core",
372+
"proto-plus",
373+
# dependencies of google-auth
374+
"cryptography",
375+
"pyasn1",
376+
]
377+
378+
for dep in prerel_deps:
379+
session.install("--pre", "--no-deps", "--upgrade", dep)
380+
381+
# Remaining dependencies
382+
other_deps = ["requests"]
383+
session.install(*other_deps)
384+
385+
session.install(*UNIT_TEST_STANDARD_DEPENDENCIES)
386+
session.install(*SYSTEM_TEST_STANDARD_DEPENDENCIES)
387+
388+
# Because we test minimum dependency versions on the minimum Python
389+
# version, the first version we test with in the unit tests sessions has a
390+
# constraints file containing all dependencies and extras.
391+
with open(
392+
CURRENT_DIRECTORY
393+
/ "testing"
394+
/ f"constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt",
395+
encoding="utf-8",
396+
) as constraints_file:
397+
constraints_text = constraints_file.read()
398+
399+
# Ignore leading whitespace and comment lines.
400+
deps = [
401+
match.group(1)
402+
for match in re.finditer(
403+
r"^\s*(\S+)(?===\S+)", constraints_text, flags=re.MULTILINE
404+
)
405+
]
406+
407+
# Don't overwrite prerelease packages.
408+
deps = [dep for dep in deps if dep not in prerel_deps]
409+
# We use --no-deps to ensure that pre-release versions aren't overwritten
410+
# by the version ranges in setup.py.
411+
session.install(*deps)
412+
session.install("--no-deps", "-e", ".[all]")
413+
414+
# Print out prerelease package versions
415+
session.run(
416+
"python", "-c", "import google.protobuf; print(google.protobuf.__version__)"
417+
)
418+
session.run("python", "-c", "import grpc; print(grpc.__version__)")
419+
420+
session.run("py.test", "tests/unit")
421+
session.run("py.test", "tests/system")
422+
session.run("py.test", "samples/snippets")

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.