Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: add "extra" for IPython, exclude bad IPython release #1151

Merged
merged 5 commits into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions .kokoro/continuous/prerelease-deps-3.10.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
value: "prerelease_deps-3.10"
}
2 changes: 1 addition & 1 deletion .kokoro/continuous/prerelease-deps-3.8.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
value: "prerelease_deps"
value: "prerelease_deps-3.8"
}
7 changes: 7 additions & 0 deletions .kokoro/presubmit/prerelease-deps-3.10.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
value: "prerelease_deps-3.10"
}
7 changes: 1 addition & 6 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ def default(session, install_extras=True):
install_target = "."
session.install("-e", install_target, "-c", constraints_path)

session.install("ipython", "-c", constraints_path)

# Run py.test against the unit tests.
session.run(
"py.test",
Expand Down Expand Up @@ -119,7 +117,6 @@ def unit_noextras(session):
def mypy(session):
"""Run type checks with mypy."""
session.install("-e", ".[all]")
session.install("ipython")
session.install(MYPY_VERSION)

# Just install the dependencies' type info directly, since "mypy --install-types"
Expand All @@ -138,7 +135,6 @@ def pytype(session):
# 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)
session.run("pytype")

Expand Down Expand Up @@ -180,7 +176,6 @@ def system(session):
else:
extras = "[all]"
session.install("-e", f".{extras}", "-c", constraints_path)
session.install("ipython", "-c", constraints_path)

# Run py.test against the system tests.
session.run("py.test", "--quiet", os.path.join("tests", "system"), *session.posargs)
Expand Down Expand Up @@ -355,7 +350,7 @@ def blacken(session):
def docs(session):
"""Build the docs."""

session.install("ipython", "recommonmark", "sphinx==4.0.1", "sphinx_rtd_theme")
session.install("recommonmark", "sphinx==4.0.1", "sphinx_rtd_theme")
session.install("google-cloud-storage")
session.install("-e", ".[all]")

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"geopandas": ["geopandas>=0.9.0, <1.0dev", "Shapely>=1.6.0, <2.0dev"],
"pandas": ["pandas>=0.24.2"] + pyarrow_dep,
"bignumeric_type": pyarrow_dep,
"ipython": ["ipython>=7.0.1,!=8.1.0"],
"tqdm": ["tqdm >= 4.7.4, <5.0.0dev"],
"opentelemetry": [
"opentelemetry-api >= 1.1.0",
Expand Down
1 change: 1 addition & 0 deletions testing/constraints-3.6.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ google-cloud-bigquery-storage==2.0.0
google-cloud-core==1.4.1
google-resumable-media==0.6.0
grpcio==1.38.1
ipython==7.0.1
opentelemetry-api==1.1.0
opentelemetry-instrumentation==0.20b0
opentelemetry-sdk==1.1.0
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/line_arg_parser/test_lexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

import pytest

IPython = pytest.importorskip("IPython")


@pytest.fixture(scope="session")
def lexer_class():
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/line_arg_parser/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

import pytest

IPython = pytest.importorskip("IPython")


@pytest.fixture(scope="session")
def parser_class():
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/line_arg_parser/test_visitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

import pytest

IPython = pytest.importorskip("IPython")


@pytest.fixture
def base_visitor():
Expand Down
27 changes: 13 additions & 14 deletions tests/unit/test_magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,30 @@
from concurrent import futures
import warnings

import mock
import pytest

try:
import pandas
except ImportError: # pragma: NO COVER
pandas = None

from google.api_core import exceptions
import google.auth.credentials
import mock
import pytest
from tests.unit.helpers import make_connection
from test_utils.imports import maybe_fail_import

from google.cloud import bigquery
from google.cloud.bigquery import job
from google.cloud.bigquery import table
from google.cloud.bigquery.magics import magics
from google.cloud.bigquery.retry import DEFAULT_TIMEOUT
from tests.unit.helpers import make_connection
from test_utils.imports import maybe_fail_import


try:
from google.cloud.bigquery.magics import magics
except ImportError:
magics = None

bigquery_storage = pytest.importorskip("google.cloud.bigquery_storage")
IPython = pytest.importorskip("IPython")
io = pytest.importorskip("IPython.utils.io")
tools = pytest.importorskip("IPython.testing.tools")
interactiveshell = pytest.importorskip("IPython.terminal.interactiveshell")
bigquery_storage = pytest.importorskip("google.cloud.bigquery_storage")
tools = pytest.importorskip("IPython.testing.tools")
io = pytest.importorskip("IPython.utils.io")
pandas = pytest.importorskip("pandas")


@pytest.fixture(scope="session")
Expand Down