Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

chore: sync main into v3 branch#1109

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tswast merged 17 commits intov3fromsync-v3
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
17 commits
Select commitHold shift + click to select a range
750c15d
chore(deps): update all dependencies (#1089)
renovate-botDec 16, 2021
881c081
chore: update .repo-metadata.json (#1093)
partheaDec 28, 2021
9e0ce1f
test: avoid flake if connections were already open at start (#1096)
tswastJan 4, 2022
dcb8728
chore(deps): update all dependencies (#1091)
renovate-botJan 5, 2022
82e0a7c
chore(deps): update all dependencies (#1098)
renovate-botJan 6, 2022
ef1f2cb
README: Update supported Python versions (#1100)
hugovkJan 10, 2022
18ee0b7
chore(samples): Add check for tests in directory (#1103)
gcf-owl-bot[bot]Jan 11, 2022
e23114c
fix: remove query text from exception message, use `exception.debug_m…
tswastJan 12, 2022
073c9d3
build: switch to release-please for tagging (#1107)
gcf-owl-bot[bot]Jan 12, 2022
643b333
chore(main): release 2.32.0 (#1104)
release-please[bot]Jan 13, 2022
aea8d55
chore: sync main into v3 branch
tswastJan 13, 2022
144cbf4
chore(deps): update all dependencies (#1101)
renovate-botJan 14, 2022
51aced2
chore(python): update release.sh to use keystore (#1111)
gcf-owl-bot[bot]Jan 14, 2022
f54d81f
test: make GC check resilient to broken weakrefs (#1099)
msuozzoJan 18, 2022
fa8aea0
chore(python): Noxfile recognizes that tests can live in a folder (#1…
gcf-owl-bot[bot]Jan 19, 2022
727a18d
Merge branch 'v3' into sync-v3
tswastJan 19, 2022
c58ba76
Merge remote-tracking branch 'upstream/main' into sync-v3
tswastJan 19, 2022
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
2 changes: 1 addition & 1 deletion.github/.OwlBot.lock.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:2f90537dd7df70f6b663cd654b1fa5dee483cf6a4edcfd46072b2775be8a23ec
digest: sha256:f0e4b51deef56bed74d3e2359c583fc104a8d6367da3984fc5c66938db738828
1 change: 1 addition & 0 deletions.github/release-please.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
releaseType: python
handleGHRelease: true
1 change: 1 addition & 0 deletions.github/release-trigger.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
enabled: true
2 changes: 1 addition & 1 deletion.kokoro/release.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,7 @@ python3 -m pip install --upgrade twine wheel setuptools
export PYTHONUNBUFFERED=1

# Move into the package, build the distribution and upload.
TWINE_PASSWORD=$(cat "${KOKORO_GFILE_DIR}/secret_manager/google-cloud-pypi-token")
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-1")
cd github/python-bigquery
python3 setup.py sdist bdist_wheel
twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/*
12 changes: 11 additions & 1 deletion.kokoro/release/common.cfg
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,8 +23,18 @@ env_vars: {
value: "github/python-bigquery/.kokoro/release.sh"
}

# Fetch PyPI password
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "google-cloud-pypi-token-keystore-1"
}
}
}

# Tokens needed to report release status back to GitHub
env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem,google-cloud-pypi-token"
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem"
}
7 changes: 4 additions & 3 deletions.repo-metadata.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,15 +2,16 @@
"name": "bigquery",
"name_pretty": "Google Cloud BigQuery",
"product_documentation": "https://cloud.google.com/bigquery",
"client_documentation": "https://googleapis.dev/python/bigquery/latest",
"client_documentation": "https://cloud.google.com/python/docs/reference/bigquery/latest",
"issue_tracker": "https://issuetracker.google.com/savedsearches/559654",
"release_level": "ga",
"release_level": "stable",
"language": "python",
"library_type": "GAPIC_COMBO",
"repo": "googleapis/python-bigquery",
"distribution_name": "google-cloud-bigquery",
"api_id": "bigquery.googleapis.com",
"requires_billing": false,
"default_version": "v2",
"codeowner_team": "@googleapis/api-bigquery"
"codeowner_team": "@googleapis/api-bigquery",
"api_shortname": "bigquery"
}
12 changes: 12 additions & 0 deletionsCHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,6 +5,18 @@
[1]: https://pypi.org/project/google-cloud-bigquery/#history


## [2.32.0](https://github.com/googleapis/python-bigquery/compare/v2.31.0...v2.32.0) (2022-01-12)


### Features

* support authorized dataset entity ([#1075](https://github.com/googleapis/python-bigquery/issues/1075)) ([c098cd0](https://github.com/googleapis/python-bigquery/commit/c098cd01c755633bfaba7193dd5c044a489a5b61))


### Bug Fixes

* remove query text from exception message, use `exception.debug_message` instead ([#1105](https://github.com/googleapis/python-bigquery/issues/1105)) ([e23114c](https://github.com/googleapis/python-bigquery/commit/e23114ce362e09ac72f733a640e53a561cc9ce69))

## [2.31.0](https://www.github.com/googleapis/python-bigquery/compare/v2.30.1...v2.31.0) (2021-11-24)


Expand Down
7 changes: 2 additions & 5 deletionsREADME.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
Python Client for Google BigQuery
=================================

|GA| |pypi| |versions|
|GA| |pypi| |versions|

Querying massive datasets can be time consuming and expensive without the
right hardware and infrastructure. Google `BigQuery`_ solves this problem by
Expand DownExpand Up@@ -52,7 +52,7 @@ dependencies.

Supported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^
Python >= 3.6, < 3.10
Python >= 3.6, < 3.11

Unsupported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand DownExpand Up@@ -140,6 +140,3 @@ In this example all tracing data will be published to the Google

.. _OpenTelemetry documentation: https://opentelemetry-python.readthedocs.io
.. _Cloud Trace: https://cloud.google.com/trace



19 changes: 13 additions & 6 deletionsgoogle/cloud/bigquery/job/query.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -66,6 +66,7 @@


_CONTAINS_ORDER_BY = re.compile(r"ORDER\s+BY", re.IGNORECASE)
_EXCEPTION_FOOTER_TEMPLATE = "{message}\n\nLocation: {location}\nJob ID: {job_id}\n"
_TIMEOUT_BUFFER_SECS = 0.1


Expand DownExpand Up@@ -1196,17 +1197,17 @@ def _blocking_poll(self, timeout=None, **kwargs):
super(QueryJob, self)._blocking_poll(timeout=timeout, **kwargs)

@staticmethod
def _format_for_exception(query, job_id):
def _format_for_exception(message: str, query: str):
"""Format a query for the output in exception message.

Args:
message (str): The original exception message.
query (str): The SQL query to format.
job_id (str): The ID of the job that ran the query.

Returns:
str: A formatted query text.
"""
template = "\n\n(job ID: {job_id})\n\n{header}\n\n{ruler}\n{body}\n{ruler}"
template = "{message}\n\n{header}\n\n{ruler}\n{body}\n{ruler}"

lines = query.splitlines()
max_line_len = max(len(line) for line in lines)
Expand All@@ -1223,7 +1224,7 @@ def _format_for_exception(query, job_id):
"{:4}:{}".format(n, line) for n, line in enumerate(lines, start=1)
)

return template.format(job_id=job_id, header=header, ruler=ruler, body=body)
return template.format(message=message, header=header, ruler=ruler, body=body)

def _begin(self, client=None, retry=DEFAULT_RETRY, timeout=None):
"""API call: begin the job via a POST request
Expand All@@ -1248,7 +1249,10 @@ def _begin(self, client=None, retry=DEFAULT_RETRY, timeout=None):
try:
super(QueryJob, self)._begin(client=client, retry=retry, timeout=timeout)
except exceptions.GoogleAPICallError as exc:
exc.message += self._format_for_exception(self.query, self.job_id)
exc.message = _EXCEPTION_FOOTER_TEMPLATE.format(
message=exc.message, location=self.location, job_id=self.job_id
)
exc.debug_message = self._format_for_exception(exc.message, self.query)
exc.query_job = self
raise

Expand DownExpand Up@@ -1447,7 +1451,10 @@ def do_get_result():
do_get_result()

except exceptions.GoogleAPICallError as exc:
exc.message += self._format_for_exception(self.query, self.job_id)
exc.message = _EXCEPTION_FOOTER_TEMPLATE.format(
message=exc.message, location=self.location, job_id=self.job_id
)
exc.debug_message = self._format_for_exception(exc.message, self.query) # type: ignore
exc.query_job = self # type: ignore
raise
except requests.exceptions.Timeout as exc:
Expand Down
71 changes: 40 additions & 31 deletionssamples/geography/noxfile.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,7 @@

from __future__ import print_function

import glob
import os
from pathlib import Path
import sys
Expand DownExpand Up@@ -184,37 +185,45 @@ def blacken(session: nox.sessions.Session) -> None:
def _session_tests(
session: nox.sessions.Session, post_install: Callable = None
) -> None:
if TEST_CONFIG["pip_version_override"]:
pip_version = TEST_CONFIG["pip_version_override"]
session.install(f"pip=={pip_version}")
"""Runs py.test for a particular project."""
if os.path.exists("requirements.txt"):
if os.path.exists("constraints.txt"):
session.install("-r", "requirements.txt", "-c", "constraints.txt")
else:
session.install("-r", "requirements.txt")

if os.path.exists("requirements-test.txt"):
if os.path.exists("constraints-test.txt"):
session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt")
else:
session.install("-r", "requirements-test.txt")

if INSTALL_LIBRARY_FROM_SOURCE:
session.install("-e", _get_repo_root())

if post_install:
post_install(session)

session.run(
"pytest",
*(PYTEST_COMMON_ARGS + session.posargs),
# Pytest will return 5 when no tests are collected. This can happen
# on travis where slow and flaky tests are excluded.
# See http://doc.pytest.org/en/latest/_modules/_pytest/main.html
success_codes=[0, 5],
env=get_pytest_env_vars(),
)
# check for presence of tests
test_list = glob.glob("*_test.py") + glob.glob("test_*.py")
test_list.extend(glob.glob("tests"))
if len(test_list) == 0:
print("No tests found, skipping directory.")
else:
if TEST_CONFIG["pip_version_override"]:
pip_version = TEST_CONFIG["pip_version_override"]
session.install(f"pip=={pip_version}")
"""Runs py.test for a particular project."""
if os.path.exists("requirements.txt"):
if os.path.exists("constraints.txt"):
session.install("-r", "requirements.txt", "-c", "constraints.txt")
else:
session.install("-r", "requirements.txt")

if os.path.exists("requirements-test.txt"):
if os.path.exists("constraints-test.txt"):
session.install(
"-r", "requirements-test.txt", "-c", "constraints-test.txt"
)
else:
session.install("-r", "requirements-test.txt")

if INSTALL_LIBRARY_FROM_SOURCE:
session.install("-e", _get_repo_root())

if post_install:
post_install(session)

session.run(
"pytest",
*(PYTEST_COMMON_ARGS + session.posargs),
# Pytest will return 5 when no tests are collected. This can happen
# on travis where slow and flaky tests are excluded.
# See http://doc.pytest.org/en/latest/_modules/_pytest/main.html
success_codes=[0, 5],
env=get_pytest_env_vars(),
)


@nox.session(python=ALL_VERSIONS)
Expand Down
27 changes: 11 additions & 16 deletionssamples/geography/requirements.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,46 @@
attrs==21.2.0
cachetools==4.2.4
attrs==21.4.0
certifi==2021.10.8
cffi==1.15.0
charset-normalizer==2.0.9
charset-normalizer==2.0.10
click==8.0.3
click-plugins==1.1.1
cligj==0.7.2
dataclasses==0.6; python_version < '3.7'
db-dtypes==0.3.0
dataclasses==0.8; python_version < '3.7'
db-dtypes==0.3.1
Fiona==1.8.20
geojson==2.5.0
geopandas==0.9.0; python_version < '3.7'
geopandas==0.10.2; python_version >= '3.7'
google-api-core==2.3.0
google-api-core==2.4.0
google-auth==2.3.3
google-cloud-bigquery==2.31.0
google-cloud-bigquery-storage==2.10.1
google-cloud-core==2.2.1
google-crc32c==1.3.0
google-resumable-media==2.1.0
googleapis-common-protos==1.54.0
grpcio==1.42.0
grpcio==1.43.0
idna==3.3
importlib-metadata==4.8.2
libcst==0.3.23
libcst==0.4.0
munch==2.5.0
mypy-extensions==0.4.3
packaging==21.3
pandas==1.1.5; python_version < '3.7'
pandas==1.3.4; python_version >= '3.7'
pandas==1.3.5; python_version >= '3.7'
proto-plus==1.19.8
protobuf==3.19.1
protobuf==3.19.3
pyarrow==6.0.1
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.21
pyparsing==3.0.6
pyproj==3.0.1; python_version < "3.7"
pyproj==3.1.0; python_version > "3.6"
python-dateutil==2.8.2
pytz==2021.3
PyYAML==6.0
requests==2.26.0
requests==2.27.1
rsa==4.8
Shapely==1.8.0
six==1.16.0
typing-extensions==4.0.1
typing-inspect==0.7.1
urllib3==1.26.7
zipp==3.6.0
urllib3==1.26.8
71 changes: 40 additions & 31 deletionssamples/magics/noxfile.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,7 @@

from __future__ import print_function

import glob
import os
from pathlib import Path
import sys
Expand DownExpand Up@@ -184,37 +185,45 @@ def blacken(session: nox.sessions.Session) -> None:
def _session_tests(
session: nox.sessions.Session, post_install: Callable = None
) -> None:
if TEST_CONFIG["pip_version_override"]:
pip_version = TEST_CONFIG["pip_version_override"]
session.install(f"pip=={pip_version}")
"""Runs py.test for a particular project."""
if os.path.exists("requirements.txt"):
if os.path.exists("constraints.txt"):
session.install("-r", "requirements.txt", "-c", "constraints.txt")
else:
session.install("-r", "requirements.txt")

if os.path.exists("requirements-test.txt"):
if os.path.exists("constraints-test.txt"):
session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt")
else:
session.install("-r", "requirements-test.txt")

if INSTALL_LIBRARY_FROM_SOURCE:
session.install("-e", _get_repo_root())

if post_install:
post_install(session)

session.run(
"pytest",
*(PYTEST_COMMON_ARGS + session.posargs),
# Pytest will return 5 when no tests are collected. This can happen
# on travis where slow and flaky tests are excluded.
# See http://doc.pytest.org/en/latest/_modules/_pytest/main.html
success_codes=[0, 5],
env=get_pytest_env_vars(),
)
# check for presence of tests
test_list = glob.glob("*_test.py") + glob.glob("test_*.py")
test_list.extend(glob.glob("tests"))
if len(test_list) == 0:
print("No tests found, skipping directory.")
else:
if TEST_CONFIG["pip_version_override"]:
pip_version = TEST_CONFIG["pip_version_override"]
session.install(f"pip=={pip_version}")
"""Runs py.test for a particular project."""
if os.path.exists("requirements.txt"):
if os.path.exists("constraints.txt"):
session.install("-r", "requirements.txt", "-c", "constraints.txt")
else:
session.install("-r", "requirements.txt")

if os.path.exists("requirements-test.txt"):
if os.path.exists("constraints-test.txt"):
session.install(
"-r", "requirements-test.txt", "-c", "constraints-test.txt"
)
else:
session.install("-r", "requirements-test.txt")

if INSTALL_LIBRARY_FROM_SOURCE:
session.install("-e", _get_repo_root())

if post_install:
post_install(session)

session.run(
"pytest",
*(PYTEST_COMMON_ARGS + session.posargs),
# Pytest will return 5 when no tests are collected. This can happen
# on travis where slow and flaky tests are excluded.
# See http://doc.pytest.org/en/latest/_modules/_pytest/main.html
success_codes=[0, 5],
env=get_pytest_env_vars(),
)


@nox.session(python=ALL_VERSIONS)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp