| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cf50cea commit ec9262c
113 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -177,29 +177,6 @@ Build the docs via: | |||
| 177 | 177 | ||
| 178 | 178 | $ nox -s docs | |
| 179 | 179 | ||
| 180 | - ************************* | ||
| 181 | - Samples and code snippets | ||
| 182 | - ************************* | ||
| 183 | - | ||
| 184 | - Code samples and snippets live in the `samples/` catalogue. Feel free to | ||
| 185 | - provide more examples, but make sure to write tests for those examples. | ||
| 186 | - Each folder containing example code requires its own `noxfile.py` script | ||
| 187 | - which automates testing. If you decide to create a new folder, you can | ||
| 188 | - base it on the `samples/snippets` folder (providing `noxfile.py` and | ||
| 189 | - the requirements files). | ||
| 190 | - | ||
| 191 | - The tests will run against a real Google Cloud Project, so you should | ||
| 192 | - configure them just like the System Tests. | ||
| 193 | - | ||
| 194 | - - To run sample tests, you can execute:: | ||
| 195 | - | ||
| 196 | - # Run all tests in a folder | ||
| 197 | - $ cd samples/snippets | ||
| 198 | - $ nox -s py-3.8 | ||
| 199 | - | ||
| 200 | - # Run a single sample test | ||
| 201 | - $ cd samples/snippets | ||
| 202 | - $ nox -s py-3.8 -- -k <name of test> | ||
| 203 | 180 | ||
| 204 | 181 | ******************************************** | |
| 205 | 182 | Note About ``README`` as it pertains to PyPI | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,3 @@ | |||
| 1 | 1 | [mypy] | |
| 2 | - python_version = 3.8 | ||
| 2 | + python_version = 3.14 | ||
| 3 | 3 | namespace_packages = True | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,7 +35,6 @@ | |||
| 35 | 35 | DEFAULT_PYTHON_VERSION = "3.14" | |
| 36 | 36 | ||
| 37 | 37 | UNIT_TEST_PYTHON_VERSIONS: List[str] = [ | |
| 38 | - "3.8", | ||
| 39 | 38 | "3.9", | |
| 40 | 39 | "3.10", | |
| 41 | 40 | "3.11", | |
@@ -44,9 +43,6 @@ | |||
| 44 | 43 | "3.14", | |
| 45 | 44 | ] | |
| 46 | 45 | ||
| 47 | - ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS) | ||
| 48 | - ALL_PYTHON.extend(["3.7"]) | ||
| 49 | - | ||
| 50 | 46 | UNIT_TEST_STANDARD_DEPENDENCIES = [ | |
| 51 | 47 | "mock", | |
| 52 | 48 | "asyncmock", | |
@@ -86,7 +82,7 @@ | |||
| 86 | 82 | ], | |
| 87 | 83 | } | |
| 88 | 84 | ||
| 89 | - SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON | ||
| 85 | + SYSTEM_TEST_PYTHON_VERSIONS: List[str] = UNIT_TEST_PYTHON_VERSIONS | ||
| 90 | 86 | SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ | |
| 91 | 87 | "mock", | |
| 92 | 88 | "pytest", | |
@@ -225,36 +221,15 @@ def install_unittest_dependencies(session, *constraints): | |||
| 225 | 221 | session.install("-e", ".", *constraints) | |
| 226 | 222 | ||
| 227 | 223 | ||
| 228 | - @nox.session(python=ALL_PYTHON) | ||
| 229 | - @nox.parametrize( | ||
| 230 | - "protobuf_implementation", | ||
| 231 | - ["python", "upb", "cpp"], | ||
| 232 | - ) | ||
| 233 | - def unit(session, protobuf_implementation): | ||
| 224 | + @nox.session(python=UNIT_TEST_PYTHON_VERSIONS) | ||
| 225 | + def unit(session): | ||
| 234 | 226 | # Install all test dependencies, then install this package in-place. | |
| 235 | 227 | ||
| 236 | - if session.python in ("3.7",): | ||
| 237 | - session.skip("Python 3.7 is no longer supported") | ||
| 238 | - | ||
| 239 | - if protobuf_implementation == "cpp" and session.python in ( | ||
| 240 | - "3.11", | ||
| 241 | - "3.12", | ||
| 242 | - "3.13", | ||
| 243 | - "3.14", | ||
| 244 | - ): | ||
| 245 | - session.skip("cpp implementation is not supported in python 3.11+") | ||
| 246 | - | ||
| 247 | 228 | constraints_path = str( | |
| 248 | 229 | CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" | |
| 249 | 230 | ) | |
| 250 | 231 | install_unittest_dependencies(session, "-c", constraints_path) | |
| 251 | 232 | ||
| 252 | - # TODO(https://github.com/googleapis/synthtool/issues/1976): | ||
| 253 | - # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. | ||
| 254 | - # The 'cpp' implementation requires Protobuf<4. | ||
| 255 | - if protobuf_implementation == "cpp": | ||
| 256 | - session.install("protobuf<4") | ||
| 257 | - | ||
| 258 | 233 | # Run py.test against the unit tests. | |
| 259 | 234 | session.run( | |
| 260 | 235 | "py.test", | |
@@ -268,9 +243,6 @@ def unit(session, protobuf_implementation): | |||
| 268 | 243 | "--cov-fail-under=0", | |
| 269 | 244 | os.path.join("tests", "unit"), | |
| 270 | 245 | *session.posargs, | |
| 271 | - env={ | ||
| 272 | - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, | ||
| 273 | - }, | ||
| 274 | 246 | ) | |
| 275 | 247 | ||
| 276 | 248 | ||
@@ -444,21 +416,9 @@ def docfx(session): | |||
| 444 | 416 | ||
| 445 | 417 | ||
| 446 | 418 | @nox.session(python=DEFAULT_PYTHON_VERSION) | |
| 447 | - @nox.parametrize( | ||
| 448 | - "protobuf_implementation", | ||
| 449 | - ["python", "upb", "cpp"], | ||
| 450 | - ) | ||
| 451 | - def prerelease_deps(session, protobuf_implementation): | ||
| 419 | + def prerelease_deps(session): | ||
| 452 | 420 | """Run all tests with prerelease versions of dependencies installed.""" | |
| 453 | 421 | ||
| 454 | - if protobuf_implementation == "cpp" and session.python in ( | ||
| 455 | - "3.11", | ||
| 456 | - "3.12", | ||
| 457 | - "3.13", | ||
| 458 | - "3.14", | ||
| 459 | - ): | ||
| 460 | - session.skip("cpp implementation is not supported in python 3.11+") | ||
| 461 | - | ||
| 462 | 422 | # Install all dependencies | |
| 463 | 423 | session.install("-e", ".[all, tests, tracing]") | |
| 464 | 424 | unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES | |
@@ -518,12 +478,11 @@ def prerelease_deps(session, protobuf_implementation): | |||
| 518 | 478 | # from main to detect any potential breaking changes. For context, see: | |
| 519 | 479 | # https://github.com/googleapis/python-bigquery-pandas/issues/854 | |
| 520 | 480 | session.install( | |
| 521 | - "--pre", | ||
| 522 | - "--upgrade", | ||
| 481 | + "--ignore-installed", | ||
| 523 | 482 | # TODO(https://github.com/googleapis/google-cloud-python/pull/126): Install this again when we relax the pin. | |
| 524 | 483 | # "https://github.com/cloudspannerecosystem/spanner-graph-notebook/archive/refs/heads/main.zip", | |
| 525 | - "https://github.com/googleapis/python-bigquery/archive/main.zip", | ||
| 526 | - "https://github.com/googleapis/google-cloud-python/archive/main.zip#egg=google-cloud-bigquery-storage&subdirectory=packages/google-cloud-bigquery-storage", | ||
| 484 | + f"{CURRENT_DIRECTORY}/../google-cloud-bigquery", | ||
| 485 | + f"{CURRENT_DIRECTORY}/../google-cloud-bigquery-storage", | ||
| 527 | 486 | ) | |
| 528 | 487 | # Print out prerelease package versions | |
| 529 | 488 | session.run("pip", "freeze") | |
@@ -536,9 +495,6 @@ def prerelease_deps(session, protobuf_implementation): | |||
| 536 | 495 | session.run( | |
| 537 | 496 | "py.test", | |
| 538 | 497 | "tests/unit", | |
| 539 | - env={ | ||
| 540 | - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, | ||
| 541 | - }, | ||
| 542 | 498 | ) | |
| 543 | 499 | ||
| 544 | 500 | system_test_path = os.path.join("tests", "system.py") | |
@@ -558,9 +514,6 @@ def prerelease_deps(session, protobuf_implementation): | |||
| 558 | 514 | f"--junitxml=system_{session.python}_sponge_log.xml", | |
| 559 | 515 | system_test_path, | |
| 560 | 516 | *session.posargs, | |
| 561 | - env={ | ||
| 562 | - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, | ||
| 563 | - }, | ||
| 564 | 517 | ) | |
| 565 | 518 | if os.path.exists(system_test_folder_path): | |
| 566 | 519 | session.run( | |
@@ -569,9 +522,6 @@ def prerelease_deps(session, protobuf_implementation): | |||
| 569 | 522 | f"--junitxml=system_{session.python}_sponge_log.xml", | |
| 570 | 523 | system_test_folder_path, | |
| 571 | 524 | *session.posargs, | |
| 572 | - env={ | ||
| 573 | - "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, | ||
| 574 | - }, | ||
| 575 | 525 | ) | |
| 576 | 526 | ||
| 577 | 527 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -106,7 +106,6 @@ | |||
| 106 | 106 | "License :: OSI Approved :: Apache Software License", | |
| 107 | 107 | "Programming Language :: Python", | |
| 108 | 108 | "Programming Language :: Python :: 3", | |
| 109 | - "Programming Language :: Python :: 3.8", | ||
| 110 | 109 | "Programming Language :: Python :: 3.9", | |
| 111 | 110 | "Programming Language :: Python :: 3.10", | |
| 112 | 111 | "Programming Language :: Python :: 3.11", | |
@@ -120,7 +119,7 @@ | |||
| 120 | 119 | packages=packages, | |
| 121 | 120 | install_requires=dependencies, | |
| 122 | 121 | extras_require=extras, | |
| 123 | - python_requires=">=3.8", | ||
| 122 | + python_requires=">=3.9", | ||
| 124 | 123 | include_package_data=True, | |
| 125 | 124 | zip_safe=False, | |
| 126 | 125 | ) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,8 @@ google-cloud-bigquery-storage==2.6.0 | |||
| 11 | 11 | ipywidgets==7.7.1 | |
| 12 | 12 | ipython==7.23.1 | |
| 13 | 13 | ipykernel==5.5.6 | |
| 14 | + packaging==20.0.0 | ||
| 14 | 15 | pandas==1.2.0 | |
| 15 | 16 | pyarrow==3.0.0 | |
| 16 | 17 | pydata-google-auth==1.5.0 | |
| 17 | - tqdm==4.7.4 | ||
| 18 | + tqdm==4.7.4 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,7 +22,7 @@ In order to add a feature: | |||
| 22 | 22 | documentation. | |
| 23 | 23 | ||
| 24 | 24 | - The feature must work fully on the following CPython versions: | |
| 25 | - 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows. | ||
| 25 | + 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows. | ||
| 26 | 26 | ||
| 27 | 27 | - The feature must not add unnecessary dependencies (where | |
| 28 | 28 | "unnecessary" is of course subjective, but new dependencies should | |
@@ -177,29 +177,6 @@ Build the docs via: | |||
| 177 | 177 | ||
| 178 | 178 | $ nox -s docs | |
| 179 | 179 | ||
| 180 | - ************************* | ||
| 181 | - Samples and code snippets | ||
| 182 | - ************************* | ||
| 183 | - | ||
| 184 | - Code samples and snippets live in the `samples/` catalogue. Feel free to | ||
| 185 | - provide more examples, but make sure to write tests for those examples. | ||
| 186 | - Each folder containing example code requires its own `noxfile.py` script | ||
| 187 | - which automates testing. If you decide to create a new folder, you can | ||
| 188 | - base it on the `samples/snippets` folder (providing `noxfile.py` and | ||
| 189 | - the requirements files). | ||
| 190 | - | ||
| 191 | - The tests will run against a real Google Cloud Project, so you should | ||
| 192 | - configure them just like the System Tests. | ||
| 193 | - | ||
| 194 | - - To run sample tests, you can execute:: | ||
| 195 | - | ||
| 196 | - # Run all tests in a folder | ||
| 197 | - $ cd samples/snippets | ||
| 198 | - $ nox -s py-3.8 | ||
| 199 | - | ||
| 200 | - # Run a single sample test | ||
| 201 | - $ cd samples/snippets | ||
| 202 | - $ nox -s py-3.8 -- -k <name of test> | ||
| 203 | 180 | ||
| 204 | 181 | ******************************************** | |
| 205 | 182 | Note About ``README`` as it pertains to PyPI | |
@@ -221,17 +198,13 @@ Supported Python Versions | |||
| 221 | 198 | ||
| 222 | 199 | We support: | |
| 223 | 200 | ||
| 224 | - - `Python 3.7`_ | ||
| 225 | - - `Python 3.8`_ | ||
| 226 | 201 | - `Python 3.9`_ | |
| 227 | 202 | - `Python 3.10`_ | |
| 228 | 203 | - `Python 3.11`_ | |
| 229 | 204 | - `Python 3.12`_ | |
| 230 | 205 | - `Python 3.13`_ | |
| 231 | 206 | - `Python 3.14`_ | |
| 232 | 207 | ||
| 233 | - .. _Python 3.7: https://docs.python.org/3.7/ | ||
| 234 | - .. _Python 3.8: https://docs.python.org/3.8/ | ||
| 235 | 208 | .. _Python 3.9: https://docs.python.org/3.9/ | |
| 236 | 209 | .. _Python 3.10: https://docs.python.org/3.10/ | |
| 237 | 210 | .. _Python 3.11: https://docs.python.org/3.11/ | |
@@ -245,7 +218,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_. | |||
| 245 | 218 | .. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/db-dtypes/noxfile.py | |
| 246 | 219 | ||
| 247 | 220 | ||
| 248 | - We also explicitly decided to support Python 3 beginning with version 3.7. | ||
| 221 | + We also explicitly decided to support Python 3 beginning with version 3.9. | ||
| 249 | 222 | Reasons for this include: | |
| 250 | 223 | ||
| 251 | 224 | - Encouraging use of newest versions of Python 3 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,16 +36,13 @@ | |||
| 36 | 36 | LINT_PYTHON_VERSION = "3.10" | |
| 37 | 37 | ||
| 38 | 38 | UNIT_TEST_PYTHON_VERSIONS: List[str] = [ | |
| 39 | - "3.8", | ||
| 40 | 39 | "3.9", | |
| 41 | 40 | "3.10", | |
| 42 | 41 | "3.11", | |
| 43 | 42 | "3.12", | |
| 44 | 43 | "3.13", | |
| 45 | 44 | "3.14", | |
| 46 | 45 | ] | |
| 47 | - ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS) | ||
| 48 | - ALL_PYTHON.extend(["3.7"]) | ||
| 49 | 46 | ||
| 50 | 47 | UNIT_TEST_STANDARD_DEPENDENCIES = [ | |
| 51 | 48 | "mock", | |
@@ -111,10 +108,6 @@ def lint(session): | |||
| 111 | 108 | session.run("flake8", "db_dtypes", "tests") | |
| 112 | 109 | ||
| 113 | 110 | ||
| 114 | - # TODO: the owlbot-python docker image still has python 3.8 installed ( | ||
| 115 | - # and only 3.8). | ||
| 116 | - # As soon as that gets upgraded, we should be able to revert this session | ||
| 117 | - # to using the DEFAULT_PYTHON_VERSION. | ||
| 118 | 111 | @nox.session(python=DEFAULT_PYTHON_VERSION) | |
| 119 | 112 | def blacken(session): | |
| 120 | 113 | """Run black. Format code to uniform standard.""" | |
@@ -285,12 +278,10 @@ def prerelease(session, tests_path): | |||
| 285 | 278 | ) | |
| 286 | 279 | ||
| 287 | 280 | ||
| 288 | - @nox.session(python=ALL_PYTHON) | ||
| 281 | + @nox.session(python=UNIT_TEST_PYTHON_VERSIONS) | ||
| 289 | 282 | @nox.parametrize("test_type", ["unit", "compliance"]) | |
| 290 | 283 | def unit(session, test_type): | |
| 291 | 284 | """Run the unit test suite.""" | |
| 292 | - if session.python == "3.7": | ||
| 293 | - session.skip("Python 3.7 is no longer supported") | ||
| 294 | 285 | ||
| 295 | 286 | # Compliance tests only run on the latest Python version | |
| 296 | 287 | if test_type == "compliance" and session.python != DEFAULT_PYTHON_VERSION: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -64,7 +64,6 @@ def readme(): | |||
| 64 | 64 | "License :: OSI Approved :: Apache Software License", | |
| 65 | 65 | "Programming Language :: Python", | |
| 66 | 66 | "Programming Language :: Python :: 3", | |
| 67 | - "Programming Language :: Python :: 3.8", | ||
| 68 | 67 | "Programming Language :: Python :: 3.9", | |
| 69 | 68 | "Programming Language :: Python :: 3.10", | |
| 70 | 69 | "Programming Language :: Python :: 3.11", | |
@@ -76,6 +75,6 @@ def readme(): | |||
| 76 | 75 | ], | |
| 77 | 76 | platforms="Posix; MacOS X; Windows", | |
| 78 | 77 | install_requires=dependencies, | |
| 79 | - python_requires=">=3.8", | ||
| 78 | + python_requires=">=3.9", | ||
| 80 | 79 | tests_require=["pytest"], | |
| 81 | 80 | ) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments