Skip to content

Commit

Permalink
Update all of Pydantic to 1.6.2 per Dependabot. (#3408)
Browse files Browse the repository at this point in the history
* Update all to 1.6.2.

* Publish new airbyte-cdk version.

* Use repr instead of str for exceptions.

* Use rc.

* Edit test.

* Bump for SAT.

* Format.
  • Loading branch information
davinchia committed May 14, 2021
1 parent a819f38 commit 9460cb4
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions airbyte-cdk/python/airbyte_cdk/sources/abstract_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ def check(self, logger: AirbyteLogger, config: Mapping[str, Any]) -> AirbyteConn
try:
check_succeeded, error = self.check_connection(logger, config)
if not check_succeeded:
return AirbyteConnectionStatus(status=Status.FAILED, message=str(error))
return AirbyteConnectionStatus(status=Status.FAILED, message=repr(error))
except Exception as e:
return AirbyteConnectionStatus(status=Status.FAILED, message=str(e))
return AirbyteConnectionStatus(status=Status.FAILED, message=repr(e))

return AirbyteConnectionStatus(status=Status.SUCCEEDED)

Expand Down
4 changes: 2 additions & 2 deletions airbyte-cdk/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

setup(
name="airbyte-cdk",
version="0.1.2",
version="0.1.3",
description="A framework for writing Airbyte Connectors.",
long_description=README,
long_description_content_type="text/markdown",
Expand Down Expand Up @@ -68,7 +68,7 @@
"backoff",
"jsonschema==2.6.0",
"pendulum",
"pydantic==1.6.1",
"pydantic==1.6.2",
"PyYAML==5.4",
"requests",
],
Expand Down
4 changes: 2 additions & 2 deletions airbyte-cdk/python/unit_tests/sources/test_abstract_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ def test_successful_check():

def test_failed_check():
""" Tests that if a source returns FALSE for the connection check the appropriate connectionStatus failure message is returned """
expected = AirbyteConnectionStatus(status=Status.FAILED, message="womp womp")
expected = AirbyteConnectionStatus(status=Status.FAILED, message="'womp womp'")
assert expected == MockSource(check_lambda=lambda: (False, "womp womp")).check(logger, {})


def test_raising_check():
""" Tests that if a source raises an unexpected exception the connection check the appropriate connectionStatus failure message is returned """
expected = AirbyteConnectionStatus(status=Status.FAILED, message=f"{Exception('this should fail')}")
expected = AirbyteConnectionStatus(status=Status.FAILED, message="Exception('this should fail')")
assert expected == MockSource(check_lambda=lambda: exec('raise Exception("this should fail")')).check(logger, {})


Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/bases/airbyte-protocol/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
url="https://github.com/airbytehq/airbyte",
packages=setuptools.find_packages(),
package_data={"": ["models/yaml/*.yaml"]},
install_requires=["PyYAML==5.4", "pydantic==1.6.1"],
install_requires=["PyYAML==5.4", "pydantic==1.6.2"],
)
2 changes: 1 addition & 1 deletion airbyte-integrations/bases/base-python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
package_data={"": ["models/yaml/*.yaml"]},
install_requires=[
"PyYAML==5.4",
"pydantic==1.6.1",
"pydantic==1.6.2",
"airbyte-protocol",
"jsonschema==2.6.0",
"requests",
Expand Down
4 changes: 2 additions & 2 deletions airbyte-integrations/bases/source-acceptance-test/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
import setuptools

MAIN_REQUIREMENTS = [
"airbyte-cdk==0.1.2",
"airbyte-cdk==0.1.3",
"docker==4.4.4",
"PyYAML==5.4.0",
"inflection==0.5.1",
"icdiff==1.9.1",
"pendulum==1.2.0",
"pydantic==1.6.1",
"pydantic==1.6.2",
"pytest==6.1.2",
"pytest-sugar==0.9.4",
"pytest-timeout==1.4.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"google-auth-httplib2",
"google-api-python-client",
"PyYAML==5.4",
"pydantic==1.6.1",
"pydantic==1.6.2",
"pytest==6.1.2",
],
package_data={"": ["*.json"]},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
author_email="contact@airbyte.io",
install_requires=[
"pipelinewise-tap-google-analytics @ https://github.com/airbytehq/pipelinewise-tap-google-analytics/tarball/master#egg=pipelinewise-tap-google-analytics-1.3.0-airbyte",
"pydantic==1.6.1",
"pydantic==1.6.2",
"base-singer",
"base-python",
"airbyte-protocol",
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-mailchimp/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
install_requires=[
"airbyte-protocol",
"base-python",
"pydantic==1.6.1",
"pydantic==1.6.2",
"mailchimp3==3.0.14",
"python-dateutil==2.8.1",
"pytest==6.1.2",
Expand Down

0 comments on commit 9460cb4

Please sign in to comment.