We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BigQuery: test with all optional dependencies in Python 3.8
Blocked on:

- Apache Arrow: https://issues.apache.org/jira/browse/ARROW-6920
- fastparquet: https://github.com/dask/fastparquet/issues/468

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `noxfile.py`
Content:
```
1 # Copyright 2016 Google LLC
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 from __future__ import absolute_import
16 
17 import os
18 import shutil
19 
20 import nox
21 
22 
23 BLACK_PATHS = ("docs", "google", "samples", "tests", "noxfile.py", "setup.py")
24 
25 
26 def default(session):
27     """Default unit test session.
28 
29     This is intended to be run **without** an interpreter set, so
30     that the current ``python`` (on the ``PATH``) or the version of
31     Python corresponding to the ``nox`` binary the ``PATH`` can
32     run the tests.
33     """
34     # Install all test dependencies, then install local packages in-place.
35     session.install("mock", "pytest", "pytest-cov", "freezegun")
36     session.install("grpcio")
37     session.install("-e", "test_utils")
38 
39     coverage_fail_under = "--cov-fail-under=97"
40 
41     # fastparquet is not included in .[all] because, in general, it's redundant
42     # with pyarrow. We still want to run some unit tests with fastparquet
43     # serialization, though.
44     dev_install = ".[all,fastparquet]"
45 
46     # There is no pyarrow or fastparquet wheel for Python 3.8.
47     if session.python == "3.8":
48         # Since many tests are skipped due to missing dependencies, test
49         # coverage is much lower in Python 3.8. Remove once we can test with
50         # pyarrow.
51         coverage_fail_under = "--cov-fail-under=91"
52         dev_install = ".[pandas,tqdm]"
53 
54     session.install("-e", dev_install)
55 
56     # IPython does not support Python 2 after version 5.x
57     if session.python == "2.7":
58         session.install("ipython==5.5")
59     else:
60         session.install("ipython")
61 
62     # Run py.test against the unit tests.
63     session.run(
64         "py.test",
65         "--quiet",
66         "--cov=google.cloud.bigquery",
67         "--cov=tests.unit",
68         "--cov-append",
69         "--cov-config=.coveragerc",
70         "--cov-report=",
71         coverage_fail_under,
72         os.path.join("tests", "unit"),
73         *session.posargs,
74     )
75 
76 
77 @nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"])
78 def unit(session):
79     """Run the unit test suite."""
80     default(session)
81 
82 
83 @nox.session(python=["2.7", "3.7"])
84 def system(session):
85     """Run the system test suite."""
86 
87     # Sanity check: Only run system tests if the environment variable is set.
88     if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""):
89         session.skip("Credentials must be set via environment variable.")
90 
91     # Use pre-release gRPC for system tests.
92     session.install("--pre", "grpcio")
93 
94     # Install all test dependencies, then install local packages in place.
95     session.install("mock", "pytest", "psutil")
96     session.install("google-cloud-storage")
97     session.install("fastavro")
98     session.install("-e", "test_utils")
99     session.install("-e", ".[all]")
100 
101     # IPython does not support Python 2 after version 5.x
102     if session.python == "2.7":
103         session.install("ipython==5.5")
104     else:
105         session.install("ipython")
106 
107     # Run py.test against the system tests.
108     session.run(
109         "py.test", "--quiet", os.path.join("tests", "system.py"), *session.posargs
110     )
111 
112 
113 @nox.session(python=["2.7", "3.7"])
114 def snippets(session):
115     """Run the snippets test suite."""
116 
117     # Sanity check: Only run snippets tests if the environment variable is set.
118     if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""):
119         session.skip("Credentials must be set via environment variable.")
120 
121     # Install all test dependencies, then install local packages in place.
122     session.install("mock", "pytest")
123     session.install("google-cloud-storage")
124     session.install("grpcio")
125     session.install("-e", "test_utils")
126     session.install("-e", ".[all]")
127 
128     # Run py.test against the snippets tests.
129     session.run("py.test", os.path.join("docs", "snippets.py"), *session.posargs)
130     session.run("py.test", "samples", *session.posargs)
131 
132 
133 @nox.session(python="3.7")
134 def cover(session):
135     """Run the final coverage report.
136 
137     This outputs the coverage report aggregating coverage from the unit
138     test runs (not system test runs), and then erases coverage data.
139     """
140     session.install("coverage", "pytest-cov")
141     session.run("coverage", "report", "--show-missing", "--fail-under=100")
142     session.run("coverage", "erase")
143 
144 
145 @nox.session(python="3.7")
146 def lint(session):
147     """Run linters.
148 
149     Returns a failure if the linters find linting errors or sufficiently
150     serious code quality issues.
151     """
152 
153     session.install("black", "flake8")
154     session.install("-e", ".")
155     session.run("flake8", os.path.join("google", "cloud", "bigquery"))
156     session.run("flake8", "tests")
157     session.run("flake8", os.path.join("docs", "samples"))
158     session.run("flake8", os.path.join("docs", "snippets.py"))
159     session.run("black", "--check", *BLACK_PATHS)
160 
161 
162 @nox.session(python="3.7")
163 def lint_setup_py(session):
164     """Verify that setup.py is valid (including RST check)."""
165 
166     session.install("docutils", "Pygments")
167     session.run("python", "setup.py", "check", "--restructuredtext", "--strict")
168 
169 
170 @nox.session(python="3.6")
171 def blacken(session):
172     """Run black.
173     Format code to uniform standard.
174 
175     This currently uses Python 3.6 due to the automated Kokoro run of synthtool.
176     That run uses an image that doesn't have 3.6 installed. Before updating this
177     check the state of the `gcp_ubuntu_config` we use for that Kokoro run.
178     """
179     session.install("black")
180     session.run("black", *BLACK_PATHS)
181 
182 
183 @nox.session(python="3.7")
184 def docs(session):
185     """Build the docs."""
186 
187     session.install("ipython", "recommonmark", "sphinx", "sphinx_rtd_theme")
188     session.install("google-cloud-storage")
189     session.install("-e", ".[all]")
190 
191     shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
192     session.run(
193         "sphinx-build",
194         "-W",  # warnings as errors
195         "-T",  # show full traceback on exception
196         "-N",  # no colors
197         "-b",
198         "html",
199         "-d",
200         os.path.join("docs", "_build", "doctrees", ""),
201         os.path.join("docs", ""),
202         os.path.join("docs", "_build", "html", ""),
203     )
204
```

Path: `setup.py`
Content:
```
1 # Copyright 2018 Google LLC
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 import io
16 import os
17 
18 import setuptools
19 
20 
21 # Package metadata.
22 
23 name = "google-cloud-bigquery"
24 description = "Google BigQuery API client library"
25 version = "1.24.0"
26 # Should be one of:
27 # 'Development Status :: 3 - Alpha'
28 # 'Development Status :: 4 - Beta'
29 # 'Development Status :: 5 - Production/Stable'
30 release_status = "Development Status :: 5 - Production/Stable"
31 dependencies = [
32     'enum34; python_version < "3.4"',
33     "google-auth >= 1.9.0, < 2.0dev",
34     "google-api-core >= 1.15.0, < 2.0dev",
35     "google-cloud-core >= 1.1.0, < 2.0dev",
36     "google-resumable-media >= 0.5.0, < 0.6dev",
37     "protobuf >= 3.6.0",
38     "six >=1.13.0,< 2.0.0dev",
39 ]
40 extras = {
41     "bqstorage": [
42         "google-cloud-bigquery-storage >= 0.6.0, <2.0.0dev",
43         "pyarrow>=0.16.0, < 2.0dev",
44     ],
45     "pandas": ["pandas>=0.17.1"],
46     # Exclude PyArrow dependency from Windows Python 2.7.
47     'pyarrow: platform_system != "Windows" or python_version >= "3.4"': [
48         # Bad Linux release for 0.14.0.
49         # https://issues.apache.org/jira/browse/ARROW-5868
50         "pyarrow>=0.4.1, != 0.14.0"
51     ],
52     "tqdm": ["tqdm >= 4.0.0, <5.0.0dev"],
53     "fastparquet": ["fastparquet", "python-snappy"],
54 }
55 
56 all_extras = []
57 
58 for extra in extras:
59     if extra == "fastparquet":
60         # Skip fastparquet from "all" because it is redundant with pyarrow and
61         # creates a dependency on pre-release versions of numpy. See:
62         # https://github.com/googleapis/google-cloud-python/issues/8549
63         continue
64     all_extras.extend(extras[extra])
65 
66 extras["all"] = all_extras
67 
68 # Setup boilerplate below this line.
69 
70 package_root = os.path.abspath(os.path.dirname(__file__))
71 
72 readme_filename = os.path.join(package_root, "README.rst")
73 with io.open(readme_filename, encoding="utf-8") as readme_file:
74     readme = readme_file.read()
75 
76 # Only include packages under the 'google' namespace. Do not include tests,
77 # benchmarks, etc.
78 packages = [
79     package for package in setuptools.find_packages() if package.startswith("google")
80 ]
81 
82 # Determine which namespaces are needed.
83 namespaces = ["google"]
84 if "google.cloud" in packages:
85     namespaces.append("google.cloud")
86 
87 
88 setuptools.setup(
89     name=name,
90     version=version,
91     description=description,
92     long_description=readme,
93     author="Google LLC",
94     author_email="googleapis-packages@google.com",
95     license="Apache 2.0",
96     url="https://github.com/googleapis/python-bigquery",
97     classifiers=[
98         release_status,
99         "Intended Audience :: Developers",
100         "License :: OSI Approved :: Apache Software License",
101         "Programming Language :: Python",
102         "Programming Language :: Python :: 2",
103         "Programming Language :: Python :: 2.7",
104         "Programming Language :: Python :: 3",
105         "Programming Language :: Python :: 3.5",
106         "Programming Language :: Python :: 3.6",
107         "Programming Language :: Python :: 3.7",
108         "Operating System :: OS Independent",
109         "Topic :: Internet",
110     ],
111     platforms="Posix; MacOS X; Windows",
112     packages=packages,
113     namespace_packages=namespaces,
114     install_requires=dependencies,
115     extras_require=extras,
116     python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*",
117     include_package_data=True,
118     zip_safe=False,
119 )
120
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/noxfile.py b/noxfile.py
--- a/noxfile.py
+++ b/noxfile.py
@@ -43,14 +43,6 @@
     # serialization, though.
     dev_install = ".[all,fastparquet]"
 
-    # There is no pyarrow or fastparquet wheel for Python 3.8.
-    if session.python == "3.8":
-        # Since many tests are skipped due to missing dependencies, test
-        # coverage is much lower in Python 3.8. Remove once we can test with
-        # pyarrow.
-        coverage_fail_under = "--cov-fail-under=91"
-        dev_install = ".[pandas,tqdm]"
-
     session.install("-e", dev_install)
 
     # IPython does not support Python 2 after version 5.x
@@ -80,7 +72,7 @@
     default(session)
 
 
-@nox.session(python=["2.7", "3.7"])
+@nox.session(python=["2.7", "3.8"])
 def system(session):
     """Run the system test suite."""
 
@@ -110,7 +102,7 @@
     )
 
 
-@nox.session(python=["2.7", "3.7"])
+@nox.session(python=["2.7", "3.8"])
 def snippets(session):
     """Run the snippets test suite."""
 
@@ -130,7 +122,7 @@
     session.run("py.test", "samples", *session.posargs)
 
 
-@nox.session(python="3.7")
+@nox.session(python="3.8")
 def cover(session):
     """Run the final coverage report.
 
@@ -142,7 +134,7 @@
     session.run("coverage", "erase")
 
 
-@nox.session(python="3.7")
+@nox.session(python="3.8")
 def lint(session):
     """Run linters.
 
@@ -159,7 +151,7 @@
     session.run("black", "--check", *BLACK_PATHS)
 
 
-@nox.session(python="3.7")
+@nox.session(python="3.8")
 def lint_setup_py(session):
     """Verify that setup.py is valid (including RST check)."""
 
@@ -180,7 +172,7 @@
     session.run("black", *BLACK_PATHS)
 
 
-@nox.session(python="3.7")
+@nox.session(python="3.8")
 def docs(session):
     """Build the docs."""
 
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -105,6 +105,7 @@
         "Programming Language :: Python :: 3.5",
         "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
+        "Programming Language :: Python :: 3.8",
         "Operating System :: OS Independent",
         "Topic :: Internet",
     ],

{"golden_diff": "diff --git a/noxfile.py b/noxfile.py\n--- a/noxfile.py\n+++ b/noxfile.py\n@@ -43,14 +43,6 @@\n     # serialization, though.\n     dev_install = \".[all,fastparquet]\"\n \n-    # There is no pyarrow or fastparquet wheel for Python 3.8.\n-    if session.python == \"3.8\":\n-        # Since many tests are skipped due to missing dependencies, test\n-        # coverage is much lower in Python 3.8. Remove once we can test with\n-        # pyarrow.\n-        coverage_fail_under = \"--cov-fail-under=91\"\n-        dev_install = \".[pandas,tqdm]\"\n-\n     session.install(\"-e\", dev_install)\n \n     # IPython does not support Python 2 after version 5.x\n@@ -80,7 +72,7 @@\n     default(session)\n \n \n-@nox.session(python=[\"2.7\", \"3.7\"])\n+@nox.session(python=[\"2.7\", \"3.8\"])\n def system(session):\n     \"\"\"Run the system test suite.\"\"\"\n \n@@ -110,7 +102,7 @@\n     )\n \n \n-@nox.session(python=[\"2.7\", \"3.7\"])\n+@nox.session(python=[\"2.7\", \"3.8\"])\n def snippets(session):\n     \"\"\"Run the snippets test suite.\"\"\"\n \n@@ -130,7 +122,7 @@\n     session.run(\"py.test\", \"samples\", *session.posargs)\n \n \n-@nox.session(python=\"3.7\")\n+@nox.session(python=\"3.8\")\n def cover(session):\n     \"\"\"Run the final coverage report.\n \n@@ -142,7 +134,7 @@\n     session.run(\"coverage\", \"erase\")\n \n \n-@nox.session(python=\"3.7\")\n+@nox.session(python=\"3.8\")\n def lint(session):\n     \"\"\"Run linters.\n \n@@ -159,7 +151,7 @@\n     session.run(\"black\", \"--check\", *BLACK_PATHS)\n \n \n-@nox.session(python=\"3.7\")\n+@nox.session(python=\"3.8\")\n def lint_setup_py(session):\n     \"\"\"Verify that setup.py is valid (including RST check).\"\"\"\n \n@@ -180,7 +172,7 @@\n     session.run(\"black\", *BLACK_PATHS)\n \n \n-@nox.session(python=\"3.7\")\n+@nox.session(python=\"3.8\")\n def docs(session):\n     \"\"\"Build the docs.\"\"\"\n \ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -105,6 +105,7 @@\n         \"Programming Language :: Python :: 3.5\",\n         \"Programming Language :: Python :: 3.6\",\n         \"Programming Language :: Python :: 3.7\",\n+        \"Programming Language :: Python :: 3.8\",\n         \"Operating System :: OS Independent\",\n         \"Topic :: Internet\",\n     ],\n", "issue": "BigQuery: test with all optional dependencies in Python 3.8\nBlocked on:\r\n\r\n- Apache Arrow: https://issues.apache.org/jira/browse/ARROW-6920\r\n- fastparquet: https://github.com/dask/fastparquet/issues/468\n", "before_files": [{"content": "# Copyright 2016 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import absolute_import\n\nimport os\nimport shutil\n\nimport nox\n\n\nBLACK_PATHS = (\"docs\", \"google\", \"samples\", \"tests\", \"noxfile.py\", \"setup.py\")\n\n\ndef default(session):\n    \"\"\"Default unit test session.\n\n    This is intended to be run **without** an interpreter set, so\n    that the current ``python`` (on the ``PATH``) or the version of\n    Python corresponding to the ``nox`` binary the ``PATH`` can\n    run the tests.\n    \"\"\"\n    # Install all test dependencies, then install local packages in-place.\n    session.install(\"mock\", \"pytest\", \"pytest-cov\", \"freezegun\")\n    session.install(\"grpcio\")\n    session.install(\"-e\", \"test_utils\")\n\n    coverage_fail_under = \"--cov-fail-under=97\"\n\n    # fastparquet is not included in .[all] because, in general, it's redundant\n    # with pyarrow. We still want to run some unit tests with fastparquet\n    # serialization, though.\n    dev_install = \".[all,fastparquet]\"\n\n    # There is no pyarrow or fastparquet wheel for Python 3.8.\n    if session.python == \"3.8\":\n        # Since many tests are skipped due to missing dependencies, test\n        # coverage is much lower in Python 3.8. Remove once we can test with\n        # pyarrow.\n        coverage_fail_under = \"--cov-fail-under=91\"\n        dev_install = \".[pandas,tqdm]\"\n\n    session.install(\"-e\", dev_install)\n\n    # IPython does not support Python 2 after version 5.x\n    if session.python == \"2.7\":\n        session.install(\"ipython==5.5\")\n    else:\n        session.install(\"ipython\")\n\n    # Run py.test against the unit tests.\n    session.run(\n        \"py.test\",\n        \"--quiet\",\n        \"--cov=google.cloud.bigquery\",\n        \"--cov=tests.unit\",\n        \"--cov-append\",\n        \"--cov-config=.coveragerc\",\n        \"--cov-report=\",\n        coverage_fail_under,\n        os.path.join(\"tests\", \"unit\"),\n        *session.posargs,\n    )\n\n\n@nox.session(python=[\"2.7\", \"3.5\", \"3.6\", \"3.7\", \"3.8\"])\ndef unit(session):\n    \"\"\"Run the unit test suite.\"\"\"\n    default(session)\n\n\n@nox.session(python=[\"2.7\", \"3.7\"])\ndef system(session):\n    \"\"\"Run the system test suite.\"\"\"\n\n    # Sanity check: Only run system tests if the environment variable is set.\n    if not os.environ.get(\"GOOGLE_APPLICATION_CREDENTIALS\", \"\"):\n        session.skip(\"Credentials must be set via environment variable.\")\n\n    # Use pre-release gRPC for system tests.\n    session.install(\"--pre\", \"grpcio\")\n\n    # Install all test dependencies, then install local packages in place.\n    session.install(\"mock\", \"pytest\", \"psutil\")\n    session.install(\"google-cloud-storage\")\n    session.install(\"fastavro\")\n    session.install(\"-e\", \"test_utils\")\n    session.install(\"-e\", \".[all]\")\n\n    # IPython does not support Python 2 after version 5.x\n    if session.python == \"2.7\":\n        session.install(\"ipython==5.5\")\n    else:\n        session.install(\"ipython\")\n\n    # Run py.test against the system tests.\n    session.run(\n        \"py.test\", \"--quiet\", os.path.join(\"tests\", \"system.py\"), *session.posargs\n    )\n\n\n@nox.session(python=[\"2.7\", \"3.7\"])\ndef snippets(session):\n    \"\"\"Run the snippets test suite.\"\"\"\n\n    # Sanity check: Only run snippets tests if the environment variable is set.\n    if not os.environ.get(\"GOOGLE_APPLICATION_CREDENTIALS\", \"\"):\n        session.skip(\"Credentials must be set via environment variable.\")\n\n    # Install all test dependencies, then install local packages in place.\n    session.install(\"mock\", \"pytest\")\n    session.install(\"google-cloud-storage\")\n    session.install(\"grpcio\")\n    session.install(\"-e\", \"test_utils\")\n    session.install(\"-e\", \".[all]\")\n\n    # Run py.test against the snippets tests.\n    session.run(\"py.test\", os.path.join(\"docs\", \"snippets.py\"), *session.posargs)\n    session.run(\"py.test\", \"samples\", *session.posargs)\n\n\n@nox.session(python=\"3.7\")\ndef cover(session):\n    \"\"\"Run the final coverage report.\n\n    This outputs the coverage report aggregating coverage from the unit\n    test runs (not system test runs), and then erases coverage data.\n    \"\"\"\n    session.install(\"coverage\", \"pytest-cov\")\n    session.run(\"coverage\", \"report\", \"--show-missing\", \"--fail-under=100\")\n    session.run(\"coverage\", \"erase\")\n\n\n@nox.session(python=\"3.7\")\ndef lint(session):\n    \"\"\"Run linters.\n\n    Returns a failure if the linters find linting errors or sufficiently\n    serious code quality issues.\n    \"\"\"\n\n    session.install(\"black\", \"flake8\")\n    session.install(\"-e\", \".\")\n    session.run(\"flake8\", os.path.join(\"google\", \"cloud\", \"bigquery\"))\n    session.run(\"flake8\", \"tests\")\n    session.run(\"flake8\", os.path.join(\"docs\", \"samples\"))\n    session.run(\"flake8\", os.path.join(\"docs\", \"snippets.py\"))\n    session.run(\"black\", \"--check\", *BLACK_PATHS)\n\n\n@nox.session(python=\"3.7\")\ndef lint_setup_py(session):\n    \"\"\"Verify that setup.py is valid (including RST check).\"\"\"\n\n    session.install(\"docutils\", \"Pygments\")\n    session.run(\"python\", \"setup.py\", \"check\", \"--restructuredtext\", \"--strict\")\n\n\n@nox.session(python=\"3.6\")\ndef blacken(session):\n    \"\"\"Run black.\n    Format code to uniform standard.\n\n    This currently uses Python 3.6 due to the automated Kokoro run of synthtool.\n    That run uses an image that doesn't have 3.6 installed. Before updating this\n    check the state of the `gcp_ubuntu_config` we use for that Kokoro run.\n    \"\"\"\n    session.install(\"black\")\n    session.run(\"black\", *BLACK_PATHS)\n\n\n@nox.session(python=\"3.7\")\ndef docs(session):\n    \"\"\"Build the docs.\"\"\"\n\n    session.install(\"ipython\", \"recommonmark\", \"sphinx\", \"sphinx_rtd_theme\")\n    session.install(\"google-cloud-storage\")\n    session.install(\"-e\", \".[all]\")\n\n    shutil.rmtree(os.path.join(\"docs\", \"_build\"), ignore_errors=True)\n    session.run(\n        \"sphinx-build\",\n        \"-W\",  # warnings as errors\n        \"-T\",  # show full traceback on exception\n        \"-N\",  # no colors\n        \"-b\",\n        \"html\",\n        \"-d\",\n        os.path.join(\"docs\", \"_build\", \"doctrees\", \"\"),\n        os.path.join(\"docs\", \"\"),\n        os.path.join(\"docs\", \"_build\", \"html\", \"\"),\n    )\n", "path": "noxfile.py"}, {"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport io\nimport os\n\nimport setuptools\n\n\n# Package metadata.\n\nname = \"google-cloud-bigquery\"\ndescription = \"Google BigQuery API client library\"\nversion = \"1.24.0\"\n# Should be one of:\n# 'Development Status :: 3 - Alpha'\n# 'Development Status :: 4 - Beta'\n# 'Development Status :: 5 - Production/Stable'\nrelease_status = \"Development Status :: 5 - Production/Stable\"\ndependencies = [\n    'enum34; python_version < \"3.4\"',\n    \"google-auth >= 1.9.0, < 2.0dev\",\n    \"google-api-core >= 1.15.0, < 2.0dev\",\n    \"google-cloud-core >= 1.1.0, < 2.0dev\",\n    \"google-resumable-media >= 0.5.0, < 0.6dev\",\n    \"protobuf >= 3.6.0\",\n    \"six >=1.13.0,< 2.0.0dev\",\n]\nextras = {\n    \"bqstorage\": [\n        \"google-cloud-bigquery-storage >= 0.6.0, <2.0.0dev\",\n        \"pyarrow>=0.16.0, < 2.0dev\",\n    ],\n    \"pandas\": [\"pandas>=0.17.1\"],\n    # Exclude PyArrow dependency from Windows Python 2.7.\n    'pyarrow: platform_system != \"Windows\" or python_version >= \"3.4\"': [\n        # Bad Linux release for 0.14.0.\n        # https://issues.apache.org/jira/browse/ARROW-5868\n        \"pyarrow>=0.4.1, != 0.14.0\"\n    ],\n    \"tqdm\": [\"tqdm >= 4.0.0, <5.0.0dev\"],\n    \"fastparquet\": [\"fastparquet\", \"python-snappy\"],\n}\n\nall_extras = []\n\nfor extra in extras:\n    if extra == \"fastparquet\":\n        # Skip fastparquet from \"all\" because it is redundant with pyarrow and\n        # creates a dependency on pre-release versions of numpy. See:\n        # https://github.com/googleapis/google-cloud-python/issues/8549\n        continue\n    all_extras.extend(extras[extra])\n\nextras[\"all\"] = all_extras\n\n# Setup boilerplate below this line.\n\npackage_root = os.path.abspath(os.path.dirname(__file__))\n\nreadme_filename = os.path.join(package_root, \"README.rst\")\nwith io.open(readme_filename, encoding=\"utf-8\") as readme_file:\n    readme = readme_file.read()\n\n# Only include packages under the 'google' namespace. Do not include tests,\n# benchmarks, etc.\npackages = [\n    package for package in setuptools.find_packages() if package.startswith(\"google\")\n]\n\n# Determine which namespaces are needed.\nnamespaces = [\"google\"]\nif \"google.cloud\" in packages:\n    namespaces.append(\"google.cloud\")\n\n\nsetuptools.setup(\n    name=name,\n    version=version,\n    description=description,\n    long_description=readme,\n    author=\"Google LLC\",\n    author_email=\"googleapis-packages@google.com\",\n    license=\"Apache 2.0\",\n    url=\"https://github.com/googleapis/python-bigquery\",\n    classifiers=[\n        release_status,\n        \"Intended Audience :: Developers\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.5\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Operating System :: OS Independent\",\n        \"Topic :: Internet\",\n    ],\n    platforms=\"Posix; MacOS X; Windows\",\n    packages=packages,\n    namespace_packages=namespaces,\n    install_requires=dependencies,\n    extras_require=extras,\n    python_requires=\">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*\",\n    include_package_data=True,\n    zip_safe=False,\n)\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright 2016 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import absolute_import\n\nimport os\nimport shutil\n\nimport nox\n\n\nBLACK_PATHS = (\"docs\", \"google\", \"samples\", \"tests\", \"noxfile.py\", \"setup.py\")\n\n\ndef default(session):\n    \"\"\"Default unit test session.\n\n    This is intended to be run **without** an interpreter set, so\n    that the current ``python`` (on the ``PATH``) or the version of\n    Python corresponding to the ``nox`` binary the ``PATH`` can\n    run the tests.\n    \"\"\"\n    # Install all test dependencies, then install local packages in-place.\n    session.install(\"mock\", \"pytest\", \"pytest-cov\", \"freezegun\")\n    session.install(\"grpcio\")\n    session.install(\"-e\", \"test_utils\")\n\n    coverage_fail_under = \"--cov-fail-under=97\"\n\n    # fastparquet is not included in .[all] because, in general, it's redundant\n    # with pyarrow. We still want to run some unit tests with fastparquet\n    # serialization, though.\n    dev_install = \".[all,fastparquet]\"\n\n    session.install(\"-e\", dev_install)\n\n    # IPython does not support Python 2 after version 5.x\n    if session.python == \"2.7\":\n        session.install(\"ipython==5.5\")\n    else:\n        session.install(\"ipython\")\n\n    # Run py.test against the unit tests.\n    session.run(\n        \"py.test\",\n        \"--quiet\",\n        \"--cov=google.cloud.bigquery\",\n        \"--cov=tests.unit\",\n        \"--cov-append\",\n        \"--cov-config=.coveragerc\",\n        \"--cov-report=\",\n        coverage_fail_under,\n        os.path.join(\"tests\", \"unit\"),\n        *session.posargs,\n    )\n\n\n@nox.session(python=[\"2.7\", \"3.5\", \"3.6\", \"3.7\", \"3.8\"])\ndef unit(session):\n    \"\"\"Run the unit test suite.\"\"\"\n    default(session)\n\n\n@nox.session(python=[\"2.7\", \"3.8\"])\ndef system(session):\n    \"\"\"Run the system test suite.\"\"\"\n\n    # Sanity check: Only run system tests if the environment variable is set.\n    if not os.environ.get(\"GOOGLE_APPLICATION_CREDENTIALS\", \"\"):\n        session.skip(\"Credentials must be set via environment variable.\")\n\n    # Use pre-release gRPC for system tests.\n    session.install(\"--pre\", \"grpcio\")\n\n    # Install all test dependencies, then install local packages in place.\n    session.install(\"mock\", \"pytest\", \"psutil\")\n    session.install(\"google-cloud-storage\")\n    session.install(\"fastavro\")\n    session.install(\"-e\", \"test_utils\")\n    session.install(\"-e\", \".[all]\")\n\n    # IPython does not support Python 2 after version 5.x\n    if session.python == \"2.7\":\n        session.install(\"ipython==5.5\")\n    else:\n        session.install(\"ipython\")\n\n    # Run py.test against the system tests.\n    session.run(\n        \"py.test\", \"--quiet\", os.path.join(\"tests\", \"system.py\"), *session.posargs\n    )\n\n\n@nox.session(python=[\"2.7\", \"3.8\"])\ndef snippets(session):\n    \"\"\"Run the snippets test suite.\"\"\"\n\n    # Sanity check: Only run snippets tests if the environment variable is set.\n    if not os.environ.get(\"GOOGLE_APPLICATION_CREDENTIALS\", \"\"):\n        session.skip(\"Credentials must be set via environment variable.\")\n\n    # Install all test dependencies, then install local packages in place.\n    session.install(\"mock\", \"pytest\")\n    session.install(\"google-cloud-storage\")\n    session.install(\"grpcio\")\n    session.install(\"-e\", \"test_utils\")\n    session.install(\"-e\", \".[all]\")\n\n    # Run py.test against the snippets tests.\n    session.run(\"py.test\", os.path.join(\"docs\", \"snippets.py\"), *session.posargs)\n    session.run(\"py.test\", \"samples\", *session.posargs)\n\n\n@nox.session(python=\"3.8\")\ndef cover(session):\n    \"\"\"Run the final coverage report.\n\n    This outputs the coverage report aggregating coverage from the unit\n    test runs (not system test runs), and then erases coverage data.\n    \"\"\"\n    session.install(\"coverage\", \"pytest-cov\")\n    session.run(\"coverage\", \"report\", \"--show-missing\", \"--fail-under=100\")\n    session.run(\"coverage\", \"erase\")\n\n\n@nox.session(python=\"3.8\")\ndef lint(session):\n    \"\"\"Run linters.\n\n    Returns a failure if the linters find linting errors or sufficiently\n    serious code quality issues.\n    \"\"\"\n\n    session.install(\"black\", \"flake8\")\n    session.install(\"-e\", \".\")\n    session.run(\"flake8\", os.path.join(\"google\", \"cloud\", \"bigquery\"))\n    session.run(\"flake8\", \"tests\")\n    session.run(\"flake8\", os.path.join(\"docs\", \"samples\"))\n    session.run(\"flake8\", os.path.join(\"docs\", \"snippets.py\"))\n    session.run(\"black\", \"--check\", *BLACK_PATHS)\n\n\n@nox.session(python=\"3.8\")\ndef lint_setup_py(session):\n    \"\"\"Verify that setup.py is valid (including RST check).\"\"\"\n\n    session.install(\"docutils\", \"Pygments\")\n    session.run(\"python\", \"setup.py\", \"check\", \"--restructuredtext\", \"--strict\")\n\n\n@nox.session(python=\"3.6\")\ndef blacken(session):\n    \"\"\"Run black.\n    Format code to uniform standard.\n\n    This currently uses Python 3.6 due to the automated Kokoro run of synthtool.\n    That run uses an image that doesn't have 3.6 installed. Before updating this\n    check the state of the `gcp_ubuntu_config` we use for that Kokoro run.\n    \"\"\"\n    session.install(\"black\")\n    session.run(\"black\", *BLACK_PATHS)\n\n\n@nox.session(python=\"3.8\")\ndef docs(session):\n    \"\"\"Build the docs.\"\"\"\n\n    session.install(\"ipython\", \"recommonmark\", \"sphinx\", \"sphinx_rtd_theme\")\n    session.install(\"google-cloud-storage\")\n    session.install(\"-e\", \".[all]\")\n\n    shutil.rmtree(os.path.join(\"docs\", \"_build\"), ignore_errors=True)\n    session.run(\n        \"sphinx-build\",\n        \"-W\",  # warnings as errors\n        \"-T\",  # show full traceback on exception\n        \"-N\",  # no colors\n        \"-b\",\n        \"html\",\n        \"-d\",\n        os.path.join(\"docs\", \"_build\", \"doctrees\", \"\"),\n        os.path.join(\"docs\", \"\"),\n        os.path.join(\"docs\", \"_build\", \"html\", \"\"),\n    )\n", "path": "noxfile.py"}, {"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport io\nimport os\n\nimport setuptools\n\n\n# Package metadata.\n\nname = \"google-cloud-bigquery\"\ndescription = \"Google BigQuery API client library\"\nversion = \"1.24.0\"\n# Should be one of:\n# 'Development Status :: 3 - Alpha'\n# 'Development Status :: 4 - Beta'\n# 'Development Status :: 5 - Production/Stable'\nrelease_status = \"Development Status :: 5 - Production/Stable\"\ndependencies = [\n    'enum34; python_version < \"3.4\"',\n    \"google-auth >= 1.9.0, < 2.0dev\",\n    \"google-api-core >= 1.15.0, < 2.0dev\",\n    \"google-cloud-core >= 1.1.0, < 2.0dev\",\n    \"google-resumable-media >= 0.5.0, < 0.6dev\",\n    \"protobuf >= 3.6.0\",\n    \"six >=1.13.0,< 2.0.0dev\",\n]\nextras = {\n    \"bqstorage\": [\n        \"google-cloud-bigquery-storage >= 0.6.0, <2.0.0dev\",\n        \"pyarrow>=0.16.0, < 2.0dev\",\n    ],\n    \"pandas\": [\"pandas>=0.17.1\"],\n    # Exclude PyArrow dependency from Windows Python 2.7.\n    'pyarrow: platform_system != \"Windows\" or python_version >= \"3.4\"': [\n        # Bad Linux release for 0.14.0.\n        # https://issues.apache.org/jira/browse/ARROW-5868\n        \"pyarrow>=0.4.1, != 0.14.0\"\n    ],\n    \"tqdm\": [\"tqdm >= 4.0.0, <5.0.0dev\"],\n    \"fastparquet\": [\"fastparquet\", \"python-snappy\"],\n}\n\nall_extras = []\n\nfor extra in extras:\n    if extra == \"fastparquet\":\n        # Skip fastparquet from \"all\" because it is redundant with pyarrow and\n        # creates a dependency on pre-release versions of numpy. See:\n        # https://github.com/googleapis/google-cloud-python/issues/8549\n        continue\n    all_extras.extend(extras[extra])\n\nextras[\"all\"] = all_extras\n\n# Setup boilerplate below this line.\n\npackage_root = os.path.abspath(os.path.dirname(__file__))\n\nreadme_filename = os.path.join(package_root, \"README.rst\")\nwith io.open(readme_filename, encoding=\"utf-8\") as readme_file:\n    readme = readme_file.read()\n\n# Only include packages under the 'google' namespace. Do not include tests,\n# benchmarks, etc.\npackages = [\n    package for package in setuptools.find_packages() if package.startswith(\"google\")\n]\n\n# Determine which namespaces are needed.\nnamespaces = [\"google\"]\nif \"google.cloud\" in packages:\n    namespaces.append(\"google.cloud\")\n\n\nsetuptools.setup(\n    name=name,\n    version=version,\n    description=description,\n    long_description=readme,\n    author=\"Google LLC\",\n    author_email=\"googleapis-packages@google.com\",\n    license=\"Apache 2.0\",\n    url=\"https://github.com/googleapis/python-bigquery\",\n    classifiers=[\n        release_status,\n        \"Intended Audience :: Developers\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.5\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Operating System :: OS Independent\",\n        \"Topic :: Internet\",\n    ],\n    platforms=\"Posix; MacOS X; Windows\",\n    packages=packages,\n    namespace_packages=namespaces,\n    install_requires=dependencies,\n    extras_require=extras,\n    python_requires=\">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*\",\n    include_package_data=True,\n    zip_safe=False,\n)\n", "path": "setup.py"}]}