From d79a0b5ef1bc820c499ffa6b9560459268846e70 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Thu, 6 May 2021 08:36:03 -0600 Subject: [PATCH 1/3] chore: use 3.8 for blacken session --- noxfile.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/noxfile.py b/noxfile.py index 654bbd093..5d33a6214 100644 --- a/noxfile.py +++ b/noxfile.py @@ -253,15 +253,12 @@ def lint_setup_py(session): session.run("python", "setup.py", "check", "--restructuredtext", "--strict") -@nox.session(python="3.6") +@nox.session(python=DEFAULT_PYTHON_VERSION) def blacken(session): """Run black. Format code to uniform standard. - - This currently uses Python 3.6 due to the automated Kokoro run of synthtool. - That run uses an image that doesn't have 3.6 installed. Before updating this - check the state of the `gcp_ubuntu_config` we use for that Kokoro run. """ + session.install(BLACK_VERSION) session.run("black", *BLACK_PATHS) From e24d47e72a3fdb8b6fe3d387abc31f79c5a32bc0 Mon Sep 17 00:00:00 2001 From: Peter Lamut Date: Fri, 7 May 2021 16:55:55 +0200 Subject: [PATCH 2/3] chore: avoid pytype error caused by attrs==21.1.0 (#656) --- noxfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/noxfile.py b/noxfile.py index 654bbd093..dc77be3b7 100644 --- a/noxfile.py +++ b/noxfile.py @@ -103,6 +103,10 @@ def unit_noextras(session): @nox.session(python=DEFAULT_PYTHON_VERSION) def pytype(session): """Run type checks.""" + # An indirect dependecy attrs==21.1.0 breaks the check, and installing a less + # recent version avoids the error until a possibly better fix is found. + # https://github.com/googleapis/python-bigquery/issues/655 + session.install("attrs==20.3.0") session.install("-e", ".[all]") session.install("ipython") session.install(PYTYPE_VERSION) From aa919d7dcd25146db0aa774c1a135fea9379e441 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Thu, 6 May 2021 08:36:03 -0600 Subject: [PATCH 3/3] chore: use 3.8 for blacken session --- noxfile.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/noxfile.py b/noxfile.py index dc77be3b7..a52025635 100644 --- a/noxfile.py +++ b/noxfile.py @@ -257,15 +257,12 @@ def lint_setup_py(session): session.run("python", "setup.py", "check", "--restructuredtext", "--strict") -@nox.session(python="3.6") +@nox.session(python=DEFAULT_PYTHON_VERSION) def blacken(session): """Run black. Format code to uniform standard. - - This currently uses Python 3.6 due to the automated Kokoro run of synthtool. - That run uses an image that doesn't have 3.6 installed. Before updating this - check the state of the `gcp_ubuntu_config` we use for that Kokoro run. """ + session.install(BLACK_VERSION) session.run("black", *BLACK_PATHS)