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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airbyte CDK: update pydantic version to 1.10 #24520

Conversation

mattotodd
Copy link

What

The airbyte cdk models throws an exception when trying to import in python 3.11

    from airbyte_protocol.models.airbyte_protocol import *
  File "/Users/mattotodd/Library/Caches/pypoetry/virtualenvs/proj-zOVad83R-py3.11/lib/python3.11/site-packages/airbyte_protocol/models/__init__.py", line 3, in <module>
    from .airbyte_protocol import *
  File "/Users/mattotodd/Library/Caches/pypoetry/virtualenvs/proj-zOVad83R-py3.11/lib/python3.11/site-packages/airbyte_protocol/models/airbyte_protocol.py", line 374, in <module>
    class AirbyteStateMessage(BaseModel):
  File "/Users/mattotodd/Library/Caches/pypoetry/virtualenvs/proj-zOVad83R-py3.11/lib/python3.11/site-packages/pydantic/main.py", line 292, in __new__
    cls.__signature__ = ClassAttribute('__signature__', generate_model_signature(cls.__init__, fields, config))
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mattotodd/Library/Caches/pypoetry/virtualenvs/proj-zOVad83R-py3.11/lib/python3.11/site-packages/pydantic/utils.py", line 258, in generate_model_signature
    merged_params[param_name] = Parameter(
                                ^^^^^^^^^^
  File "/Users/mattotodd/.pyenv/versions/3.11.2/lib/python3.11/inspect.py", line 2722, in __init__
    raise ValueError('{!r} is not a valid parameter name'.format(name))
ValueError: 'global' is not a valid parameter name

How

Update pydantic dependency to 1.10. The issue is resolved here

馃毃 User Impact 馃毃

Breaking changes described here:

  • The compiled boolean (whether pydantic is compiled with cython) has been moved from main.py to version.py
  • Now that Config.extra is supported, dataclass ignores by default extra arguments (like BaseModel)

@mattotodd mattotodd requested a review from a team as a code owner March 24, 2023 18:22
@CLAassistant
Copy link

CLAassistant commented Mar 24, 2023

CLA assistant check
All committers have signed the CLA.

@octavia-squidington-iii octavia-squidington-iii added CDK Connector Development Kit community labels Mar 24, 2023
@marcosmarxm
Copy link
Member

@mattotodd can you sign the CLA?

Copy link
Contributor

@sherifnada sherifnada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattotodd the build is currently failing. FWIW the CDK only supports 3.8 and 3.9, so while I'm happy to make this change in dep versions, it needs to work on those versions of python

@marcosmarxm marcosmarxm changed the title update pydantic version to 1.10 Airbyte CDK: update pydantic version to 1.10 Mar 29, 2023
@marcosmarxm
Copy link
Member

Close due inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CDK Connector Development Kit community
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

None yet

5 participants