Skip to content

Fixup #34

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

Merged
merged 2 commits into from
May 4, 2017
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
5 changes: 5 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

0.1.5 / 2017-05-04
------------------

- All gbq errors will simply be subclasses of ``ValueError`` and no longer inherit from the deprecated ``PandasError``.

0.1.4 / 2017-03-17
------------------

Expand Down
23 changes: 11 additions & 12 deletions pandas_gbq/gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

from distutils.version import StrictVersion
from pandas import compat, DataFrame, concat
from pandas.core.common import PandasError
from pandas.compat import lzip, bytes_to_str


Expand Down Expand Up @@ -58,35 +57,35 @@ def _test_google_api_imports():
"support: {0}".format(str(e)))


class InvalidPrivateKeyFormat(PandasError, ValueError):
class InvalidPrivateKeyFormat(ValueError):
"""
Raised when provided private key has invalid format.
"""
pass


class AccessDenied(PandasError, ValueError):
class AccessDenied(ValueError):
"""
Raised when invalid credentials are provided, or tokens have expired.
"""
pass


class DatasetCreationError(PandasError, ValueError):
class DatasetCreationError(ValueError):
"""
Raised when the create dataset method fails
"""
pass


class GenericGBQException(PandasError, ValueError):
class GenericGBQException(ValueError):
"""
Raised when an unrecognized Google API Error occurs.
"""
pass


class InvalidColumnOrder(PandasError, ValueError):
class InvalidColumnOrder(ValueError):
"""
Raised when the provided column order for output
results DataFrame does not match the schema
Expand All @@ -95,7 +94,7 @@ class InvalidColumnOrder(PandasError, ValueError):
pass


class InvalidIndexColumn(PandasError, ValueError):
class InvalidIndexColumn(ValueError):
"""
Raised when the provided index column for output
results DataFrame does not match the schema
Expand All @@ -104,15 +103,15 @@ class InvalidIndexColumn(PandasError, ValueError):
pass


class InvalidPageToken(PandasError, ValueError):
class InvalidPageToken(ValueError):
"""
Raised when Google BigQuery fails to return,
or returns a duplicate page token.
"""
pass


class InvalidSchema(PandasError, ValueError):
class InvalidSchema(ValueError):
"""
Raised when the provided DataFrame does
not match the schema of the destination
Expand All @@ -121,23 +120,23 @@ class InvalidSchema(PandasError, ValueError):
pass


class NotFoundException(PandasError, ValueError):
class NotFoundException(ValueError):
"""
Raised when the project_id, table or dataset provided in the query could
not be found.
"""
pass


class StreamingInsertError(PandasError, ValueError):
class StreamingInsertError(ValueError):
"""
Raised when BigQuery reports a streaming insert error.
For more information see `Streaming Data Into BigQuery
<https://cloud.google.com/bigquery/streaming-data-into-bigquery>`__
"""


class TableCreationError(PandasError, ValueError):
class TableCreationError(ValueError):
"""
Raised when the create table method fails
"""
Expand Down
Loading