Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
fix(deps): require protobuf>=3.19.0,<4.0.0 on v0 branch (#211)
Browse files Browse the repository at this point in the history
* fix(deps): require protobuf>=3.19.0,<4.0.0 on v0 branch

* chore: set up CI
  • Loading branch information
parthea committed Jun 7, 2022
1 parent 60ea50a commit 32f1acd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
21 changes: 13 additions & 8 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,31 @@
import nox


DEFAULT_PYTHON_VERSION = "3.8"

BLACK_VERSION = "black==19.3b0"
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

if os.path.exists("samples"):
BLACK_PATHS.append("samples")

# Error if a python version is missing
nox.options.error_on_missing_interpreters = True


@nox.session(python="3.7")
@nox.session(python=DEFAULT_PYTHON_VERSION)
def lint(session):
"""Run linters.
Returns a failure if the linters find linting errors or sufficiently
serious code quality issues.
"""
session.install("flake8", BLACK_VERSION)
session.install("flake8", BLACK_VERSION, "click<8.1.0")
session.run("black", "--check", *BLACK_PATHS)
session.run("flake8", "google", "tests")


@nox.session(python="3.6")
@nox.session(python=DEFAULT_PYTHON_VERSION)
def blacken(session):
"""Run black.
Expand All @@ -52,11 +57,11 @@ def blacken(session):
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.install(BLACK_VERSION, "click<8.1.0")
session.run("black", *BLACK_PATHS)


@nox.session(python="3.7")
@nox.session(python=DEFAULT_PYTHON_VERSION)
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.install("docutils", "pygments")
Expand Down Expand Up @@ -120,7 +125,7 @@ def system(session):
session.run("py.test", "--quiet", system_test_folder_path, *session.posargs)


@nox.session(python="3.7")
@nox.session(python=DEFAULT_PYTHON_VERSION)
def cover(session):
"""Run the final coverage report.
Expand All @@ -133,12 +138,12 @@ def cover(session):
session.run("coverage", "erase")


@nox.session(python="3.7")
@nox.session(python=DEFAULT_PYTHON_VERSION)
def docs(session):
"""Build the docs for this library."""

session.install("-e", ".")
session.install("sphinx<3.0.0", "alabaster", "recommonmark")
session.install("sphinx<3.0.0", "jinja2<3.1", "alabaster", "recommonmark")

shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
release_status = "Development Status :: 4 - Beta"
dependencies = [
"google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0",
"protobuf >= 3.19.0, <4.0.0dev",
'enum34; python_version < "3.4"',
]

Expand Down

0 comments on commit 32f1acd

Please sign in to comment.