Skip to content

Commit 45df2c9

Browse files
committed
chore(gapic): revert changes to client-post-processing YAMLs
1 parent 6a61cd0 commit 45df2c9

3 files changed

Lines changed: 32 additions & 87 deletions

File tree

.librarian/generator-input/client-post-processing/bigtable-integration.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,8 @@ replacements:
613613
["python", "upb", "cpp"],
614614
)
615615
def unit(session, protobuf_implementation):
616+
if session.python in ("3.7"):
617+
session.skip("Python 3.7 is no longer supported")
616618
617619
# Install all test dependencies, then install this package in-place.
618620
py_version = tuple([int(v) for v in session.python.split(".")])

.librarian/generator-input/client-post-processing/spanner-integration.yaml

Lines changed: 20 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,8 @@ replacements:
816816
def unit(session, protobuf_implementation):
817817
# Install all test dependencies, then install this package in-place.
818818
819+
if session.python in ("3.7",):
820+
session.skip("Python 3.7 is no longer supported")
819821
if protobuf_implementation == "cpp" and session.python in (
820822
"3.11",
821823
"3.12",
@@ -1249,12 +1251,6 @@ replacements:
12491251
system_test_path = os.path.join("tests", "system.py")
12501252
system_test_folder_path = os.path.join("tests", "system")
12511253
1252-
system_test_exists = os.path.exists(system_test_path)
1253-
system_test_folder_exists = os.path.exists(system_test_folder_path)
1254-
# Sanity check: only run tests if found.
1255-
if not system_test_exists and not system_test_folder_exists:
1256-
session.skip("System tests were not found")
1257-
12581254
if os.environ.get("SPANNER_EMULATOR_HOST"):
12591255
# Run tests against the emulator
12601256
run_system = True
@@ -1275,77 +1271,24 @@ replacements:
12751271
run_system = False
12761272
12771273
if run_system:
1278-
# Run py.test against the system tests.
1279-
if system_test_exists:
1280-
args = [
1281-
"py.test",
1282-
"--quiet",
1283-
"-o",
1284-
"asyncio_mode=auto",
1285-
f"--junitxml=system_{session.python}_sponge_log.xml",
1286-
]
1287-
if not session.posargs:
1288-
args.append(system_test_path)
1289-
args.extend(session.posargs)
1290-
1291-
session.run(
1292-
*args,
1293-
env={
1294-
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
1295-
"SPANNER_DATABASE_DIALECT": database_dialect,
1296-
"SKIP_BACKUP_TESTS": "true",
1297-
},
1298-
)
1299-
elif system_test_folder_exists:
1300-
# Run sync tests
1301-
sync_args = [
1302-
"py.test",
1303-
"--quiet",
1304-
"-o",
1305-
"asyncio_mode=auto",
1306-
f"--junitxml=system_{session.python}_sync_sponge_log.xml",
1307-
]
1308-
if not session.posargs:
1309-
sync_args.append(system_test_folder_path)
1310-
sync_args.append(
1311-
f"--ignore={os.path.join(system_test_folder_path, '_async')}"
1312-
)
1313-
else:
1314-
sync_args.extend(session.posargs)
1315-
1316-
session.run(
1317-
*sync_args,
1318-
env={
1319-
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
1320-
"SPANNER_DATABASE_DIALECT": database_dialect,
1321-
"SKIP_BACKUP_TESTS": "true",
1322-
},
1323-
)
1324-
1325-
# Run async tests
1326-
async_args = [
1327-
"py.test",
1328-
"--quiet",
1329-
"-o",
1330-
"asyncio_mode=auto",
1331-
f"--junitxml=system_{session.python}_async_sponge_log.xml",
1332-
]
1333-
if not session.posargs:
1334-
async_args.append(os.path.join(system_test_folder_path, "_async"))
1335-
else:
1336-
# If posargs are provided, only run if they match async tests
1337-
# or just skip if they were already run in sync.
1338-
# For simplicity, we only run async folder if no posargs.
1339-
return
1340-
1341-
session.run(
1342-
*async_args,
1343-
env={
1344-
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
1345-
"SPANNER_DATABASE_DIALECT": database_dialect,
1346-
"SKIP_BACKUP_TESTS": "true",
1347-
},
1348-
)
1274+
# Run the tests (deduplicated logic)
1275+
test_path = (
1276+
system_test_path
1277+
if os.path.exists(system_test_path)
1278+
else system_test_folder_path
1279+
)
1280+
session.run(
1281+
"py.test",
1282+
"--verbose",
1283+
f"--junitxml=system_{session.python}_sponge_log.xml",
1284+
test_path,
1285+
*session.posargs,
1286+
env={
1287+
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
1288+
"SPANNER_DATABASE_DIALECT": database_dialect,
1289+
"SKIP_BACKUP_TESTS": "true",
1290+
},
1291+
)
13491292
13501293
13511294
@nox.session(python=ALL_PYTHON)

.librarian/generator-input/client-post-processing/storage-integration.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ replacements:
4343
"Credentials must be set via environment variable GOOGLE_APPLICATION_CREDENTIALS"
4444
)
4545
46-
# Install dependencies for the unit test environment
47-
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
48-
session.install(*unit_deps_all)
46+
# Install all test dependencies
47+
session.install("mock", "pytest", "pytest-cov", "brotli")
4948
5049
# Install dependencies needed for system tests
5150
session.install(
@@ -60,8 +59,7 @@ replacements:
6059
6160
prerel_deps = [
6261
"google-api-core",
63-
# Exclude google-auth 3.0.0.dev0 which was yanked
64-
"google-auth!=3.0.0.dev0",
62+
"google-auth",
6563
"google-cloud-core",
6664
"google-crc32c",
6765
"google-resumable-media",
@@ -90,7 +88,9 @@ replacements:
9088
f"import {version_namespace}; print({version_namespace}.__version__)",
9189
)
9290
# Remaining dependencies
93-
other_deps = ["requests", "pyopenssl"]
91+
other_deps = [
92+
"requests",
93+
]
9494
session.install(*other_deps)
9595
9696
session.run(
@@ -287,11 +287,11 @@ replacements:
287287
packages/google-cloud-storage/README.rst,
288288
]
289289
before: |
290-
Python Client for Cloud Storage
290+
Python Client for Google Cloud Storage
291291
[\s\S]*?\(This is the reason for 2.i. above.\)
292292
after: |
293-
Python Client for Cloud Storage
294-
===============================
293+
Python Client for Google Cloud Storage
294+
======================================
295295
296296
|stable| |pypi| |versions|
297297
@@ -377,7 +377,7 @@ replacements:
377377
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
378378
Python.
379379
380-
Python >= 3.8
380+
Python >= 3.7
381381
382382
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
383383
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches

0 commit comments

Comments
 (0)