Skip to content

Commit 494b797

Browse files
authored
Merge branch 'main' into feature-process-time-partition-update
2 parents 3954351 + 0067c1d commit 494b797

File tree

14 files changed

+425
-264
lines changed

14 files changed

+425
-264
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:5581906b957284864632cde4e9c51d1cc66b0094990b27e689132fe5cd036046
17-
# created: 2024-03-05
16+
digest: sha256:25de45b58e52021d3a24a6273964371a97a4efeefe6ad3845a64e697c63b6447
17+
# created: 2025-04-14T14:34:43.260858345Z

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,25 @@ Older versions of this project were distributed as [pybigquery][0].
1414
[2]: https://pypi.org/project/pybigquery/#history
1515

1616

17+
## [1.14.1](https://github.com/googleapis/python-bigquery-sqlalchemy/compare/v1.14.0...v1.14.1) (2025-05-09)
18+
19+
20+
### Bug Fixes
21+
22+
* Updates _get_transitive_schema_fields and tests ([#1200](https://github.com/googleapis/python-bigquery-sqlalchemy/issues/1200)) ([16712da](https://github.com/googleapis/python-bigquery-sqlalchemy/commit/16712da4ba068b1b376eb81ab7d2961a81bbc23d))
23+
24+
## [1.14.0](https://github.com/googleapis/python-bigquery-sqlalchemy/compare/v1.13.0...v1.14.0) (2025-04-23)
25+
26+
27+
### Features
28+
29+
* Allow jobs to be run in a different project ([#1180](https://github.com/googleapis/python-bigquery-sqlalchemy/issues/1180)) ([eea4994](https://github.com/googleapis/python-bigquery-sqlalchemy/commit/eea4994b0134a0e413ea22b8d9e3e85a14ce998d))
30+
31+
32+
### Bug Fixes
33+
34+
* Remove setup.cfg configuration for creating universal wheels ([#1175](https://github.com/googleapis/python-bigquery-sqlalchemy/issues/1175)) ([dc394ac](https://github.com/googleapis/python-bigquery-sqlalchemy/commit/dc394ac5e95095ca69a4f0000ec1820ed3cf53cb))
35+
1736
## [1.13.0](https://github.com/googleapis/python-bigquery-sqlalchemy/compare/v1.12.1...v1.13.0) (2025-03-11)
1837

1938

dev_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ sqlalchemy>=2.0.15,<2.1.0
22
google-cloud-bigquery>=1.6.0
33
pytest===6.2.5
44
pytest-flake8===1.1.0 # versions 1.1.1 and above require pytest 7
5-
pytz==2025.1
5+
pytz==2025.2

noxfile.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import os
2222
import pathlib
2323
import re
24-
import re
2524
import shutil
2625
from typing import Dict, List
2726
import warnings

owlbot.py

Lines changed: 0 additions & 222 deletions
Original file line numberDiff line numberDiff line change
@@ -65,219 +65,6 @@
6565
"sqlalchemy_bigquery/requirements.py",
6666
)
6767

68-
s.replace(
69-
["noxfile.py"],
70-
r"[\"']google[\"']",
71-
'"sqlalchemy_bigquery"',
72-
)
73-
74-
s.replace(
75-
["noxfile.py"],
76-
r"import shutil",
77-
"import re\nimport shutil",
78-
)
79-
80-
s.replace(
81-
["noxfile.py"],
82-
"LINT_PATHS = \[",
83-
"LINT_PATHS = [\"third_party\", "
84-
)
85-
86-
s.replace(
87-
["noxfile.py"],
88-
"--cov=google",
89-
"--cov=sqlalchemy_bigquery",
90-
)
91-
92-
s.replace(
93-
["noxfile.py"],
94-
"""os.path.join("tests", "unit"),""",
95-
"""os.path.join("tests", "unit"),
96-
os.path.join("third_party", "sqlalchemy_bigquery_vendored"),""",
97-
)
98-
99-
s.replace(
100-
["noxfile.py"],
101-
"\+ SYSTEM_TEST_EXTRAS",
102-
"",
103-
)
104-
105-
106-
s.replace(
107-
["noxfile.py"],
108-
""""protobuf",
109-
# dependency of grpc""",
110-
""""protobuf",
111-
"sqlalchemy",
112-
# dependency of grpc""",
113-
)
114-
115-
116-
s.replace(
117-
["noxfile.py"],
118-
r"def unit\(session, protobuf_implementation\)",
119-
"def unit(session, protobuf_implementation, install_extras=True)",
120-
)
121-
122-
123-
def place_before(path, text, *before_text, escape=None):
124-
replacement = "\n".join(before_text) + "\n" + text
125-
if escape:
126-
for c in escape:
127-
text = text.replace(c, "\\" + c)
128-
s.replace([path], text, replacement)
129-
130-
131-
place_before(
132-
"noxfile.py",
133-
"nox.options.error_on_missing_interpreters = True",
134-
"nox.options.stop_on_first_error = True",
135-
)
136-
137-
138-
install_logic = """
139-
if install_extras and session.python in ["3.11", "3.12"]:
140-
install_target = ".[geography,alembic,tests,bqstorage]"
141-
elif install_extras:
142-
install_target = ".[all]"
143-
else:
144-
install_target = "."
145-
session.install("-e", install_target, "-c", constraints_path)
146-
"""
147-
148-
s.replace(
149-
["noxfile.py"],
150-
r"# TODO\(https://github.com/googleapis/synthtool/issues/1976\):",
151-
install_logic + "\n" + "# TODO(https://github.com/googleapis/synthtool/issues/1976):",
152-
)
153-
154-
155-
# Maybe we can get rid of this when we don't need pytest-rerunfailures,
156-
# which we won't need when BQ retries itself:
157-
# https://github.com/googleapis/python-bigquery/pull/837
158-
compliance = '''
159-
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS[-1])
160-
def compliance(session):
161-
"""Run the SQLAlchemy dialect-compliance system tests"""
162-
constraints_path = str(
163-
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
164-
)
165-
system_test_folder_path = os.path.join("tests", "sqlalchemy_dialect_compliance")
166-
167-
if os.environ.get("RUN_COMPLIANCE_TESTS", "true") == "false":
168-
session.skip("RUN_COMPLIANCE_TESTS is set to false, skipping")
169-
if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true":
170-
session.install("pyopenssl")
171-
if not os.path.exists(system_test_folder_path):
172-
session.skip("Compliance tests were not found")
173-
174-
session.install(
175-
"mock",
176-
"pytest",
177-
"pytest-rerunfailures",
178-
"google-cloud-testutils",
179-
"-c",
180-
constraints_path,
181-
)
182-
if session.python == "3.8":
183-
extras = "[tests,alembic]"
184-
elif session.python in ["3.11", "3.12"]:
185-
extras = "[tests,geography]"
186-
else:
187-
extras = "[tests]"
188-
session.install("-e", f".{extras}", "-c", constraints_path)
189-
190-
session.run("python", "-m", "pip", "freeze")
191-
192-
session.run(
193-
"py.test",
194-
"-vv",
195-
f"--junitxml=compliance_{session.python}_sponge_log.xml",
196-
"--reruns=3",
197-
"--reruns-delay=60",
198-
"--only-rerun=Exceeded rate limits",
199-
"--only-rerun=Already Exists",
200-
"--only-rerun=Not found",
201-
"--only-rerun=Cannot execute DML over a non-existent table",
202-
"--only-rerun=Job exceeded rate limits",
203-
system_test_folder_path,
204-
*session.posargs,
205-
# To suppress the "Deprecated API features detected!" warning when
206-
# features not compatible with 2.0 are detected, use a value of "1"
207-
env={
208-
"SQLALCHEMY_SILENCE_UBER_WARNING": "1",
209-
},
210-
)
211-
212-
213-
'''
214-
215-
place_before(
216-
"noxfile.py",
217-
"@nox.session(python=DEFAULT_PYTHON_VERSION)\n" "def cover(session):",
218-
compliance,
219-
escape="()",
220-
)
221-
222-
s.replace(["noxfile.py"], '"alabaster"', '"alabaster", "geoalchemy2", "shapely"')
223-
224-
225-
system_noextras = '''
226-
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
227-
def system_noextras(session):
228-
"""Run the system test suite."""
229-
constraints_path = str(
230-
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
231-
)
232-
system_test_path = os.path.join("tests", "system.py")
233-
system_test_folder_path = os.path.join("tests", "system")
234-
235-
# Check the value of `RUN_SYSTEM_TESTS` env var. It defaults to true.
236-
if os.environ.get("RUN_SYSTEM_TESTS", "true") == "false":
237-
session.skip("RUN_SYSTEM_TESTS is set to false, skipping")
238-
# Install pyopenssl for mTLS testing.
239-
if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true":
240-
session.install("pyopenssl")
241-
242-
system_test_exists = os.path.exists(system_test_path)
243-
system_test_folder_exists = os.path.exists(system_test_folder_path)
244-
# Sanity check: only run tests if found.
245-
if not system_test_exists and not system_test_folder_exists:
246-
session.skip("System tests were not found")
247-
248-
global SYSTEM_TEST_EXTRAS_BY_PYTHON
249-
SYSTEM_TEST_EXTRAS_BY_PYTHON = False
250-
install_systemtest_dependencies(session, "-c", constraints_path)
251-
252-
# Run py.test against the system tests.
253-
if system_test_exists:
254-
session.run(
255-
"py.test",
256-
"--quiet",
257-
f"--junitxml=system_{session.python}_sponge_log.xml",
258-
system_test_path,
259-
*session.posargs,
260-
)
261-
if system_test_folder_exists:
262-
session.run(
263-
"py.test",
264-
"--quiet",
265-
f"--junitxml=system_{session.python}_sponge_log.xml",
266-
system_test_folder_path,
267-
*session.posargs,
268-
)
269-
270-
271-
'''
272-
273-
274-
place_before(
275-
"noxfile.py",
276-
"@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS[-1])\n" "def compliance(session):",
277-
system_noextras,
278-
escape="()[]",
279-
)
280-
28168

28269
# Add DB config for SQLAlchemy dialect test suite.
28370
# https://github.com/googleapis/python-bigquery-sqlalchemy/issues/89
@@ -288,15 +75,6 @@ def system_noextras(session):
28875
""",
28976
)
29077

291-
292-
# Make sure build includes all necessary files.
293-
s.replace(
294-
["MANIFEST.in"],
295-
re.escape("recursive-include google"),
296-
"""recursive-include third_party/sqlalchemy_bigquery_vendored *
297-
recursive-include sqlalchemy_bigquery""",
298-
)
299-
30078
# ----------------------------------------------------------------------------
30179
# Samples templates
30280
# ----------------------------------------------------------------------------

samples/snippets/requirements-test.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ attrs==25.3.0
22
click==8.1.8
33
google-auth==2.38.0
44
google-cloud-testutils==1.6.0
5-
iniconfig==2.0.0
5+
iniconfig==2.1.0
66
packaging==24.2
77
pluggy==1.5.0
88
py==1.11.0
99
pyasn1==0.6.1
10-
pyasn1-modules==0.4.1
10+
pyasn1-modules==0.4.2
1111
pyparsing===3.1.4; python_version == '3.8'
12-
pyparsing==3.2.1; python_version >= '3.9'
12+
pyparsing==3.2.3; python_version >= '3.9'
1313
pytest===6.2.5
1414
rsa==4.9
1515
six==1.17.0
1616
toml==0.10.2
17-
typing-extensions==4.12.2
17+
typing-extensions==4.13.0

samples/snippets/requirements.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
alembic===1.14.0; python_version == '3.8'
2-
alembic==1.15.1; python_version >= '3.9'
2+
alembic==1.15.2; python_version >= '3.9'
33
certifi==2025.1.31
44
charset-normalizer==3.4.1
55
geoalchemy2==0.17.1
66
google-api-core[grpc]==2.24.2
77
google-auth==2.38.0
8-
google-cloud-bigquery==3.30.0
8+
google-cloud-bigquery===3.30.0; python_version == '3.8'
9+
google-cloud-bigquery==3.31.0; python_version >= '3.9'
910
google-cloud-core==2.4.3
1011
google-crc32c===1.5.0; python_version == '3.8'
11-
google-crc32c==1.6.0; python_version >= '3.9'
12+
google-crc32c==1.7.1; python_version >= '3.9'
1213
google-resumable-media==2.7.2
1314
googleapis-common-protos==1.69.2
1415
greenlet==3.1.1
@@ -27,16 +28,16 @@ packaging==24.2
2728
proto-plus==1.26.1
2829
protobuf===5.28.3; python_version >= '3.8'
2930
pyasn1==0.6.1
30-
pyasn1-modules==0.4.1
31+
pyasn1-modules==0.4.2
3132
pyparsing===3.1.4; python_version == '3.8'
32-
pyparsing==3.2.1; python_version >= '3.9'
33+
pyparsing==3.2.3; python_version >= '3.9'
3334
python-dateutil==2.9.0.post0
34-
pytz==2025.1
35+
pytz==2025.2
3536
requests==2.32.3
3637
rsa==4.9
3738
shapely==2.0.7
3839
six==1.17.0
3940
sqlalchemy===1.4.27
40-
typing-extensions==4.12.2
41+
typing-extensions==4.13.0
4142
urllib3===2.2.3; python_version == '3.8'
4243
urllib3==2.3.0; python_version >= '3.9'

sqlalchemy_bigquery/_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def _get_transitive_schema_fields(fields):
8383
results = []
8484
for field in fields:
8585
results += [field]
86-
if field.field_type in STRUCT_FIELD_TYPES:
86+
if field.field_type in STRUCT_FIELD_TYPES and field.mode != "REPEATED":
8787
sub_fields = [
8888
SchemaField.from_api_repr(
8989
dict(f.to_api_repr(), name=f"{field.name}.{f.name}")

0 commit comments

Comments
 (0)