airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
15.4k stars 3.97k forks source link

airbyte-ci doesn't seem to work with python 3.11 #28785

Open marcosnils opened 1 year ago

marcosnils commented 1 year ago

Topic

CI

Revelant information

:wave: following the instructions here https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md and trying to make airbyte-ci work with python 3.11.2 and getting the following error:

Traceback (most recent call last):                                                             
  File "/home/marcos/.local/bin/airbyte-ci", line 5, in <module>
    from pipelines.commands.airbyte_ci import airbyte_ci
  File "/home/marcos/.local/pipx/venvs/pipelines/lib/python3.11/site-packages/pipelines/commands/airbyte_ci.py", line 22, in <module>
    from .groups.connectors import connectors
  File "/home/marcos/.local/pipx/venvs/pipelines/lib/python3.11/site-packages/pipelines/commands/groups/connectors.py", line 20, in <module>
    from pipelines.publish import reorder_contexts, run_connector_publish_pipeline
  File "/home/marcos/.local/pipx/venvs/pipelines/lib/python3.11/site-packages/pipelines/publish.py", line 9, in <module>
    from airbyte_protocol.models.airbyte_protocol import ConnectorSpecification
  File "/home/marcos/.local/pipx/venvs/pipelines/lib/python3.11/site-packages/airbyte_protocol/models/__init__.py", line 3, in <module>
    from .airbyte_protocol import *    
  File "/home/marcos/.local/pipx/venvs/pipelines/lib/python3.11/site-packages/airbyte_protocol/models/airbyte_protocol.py", line 374, in <module>
    class AirbyteStateMessage(BaseModel):
  File "/home/marcos/.local/pipx/venvs/pipelines/lib/python3.11/site-packages/pydantic/main.py", line 292, in __new__
    cls.__signature__ = ClassAttribute('__signature__', generate_model_signature(cls.__init__, fields, config))
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/marcos/.local/pipx/venvs/pipelines/lib/python3.11/site-packages/pydantic/utils.py", line 258, in generate_model_signature
    merged_params[param_name] = Parameter(
                                ^^^^^^^^^^
  File "/usr/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

Just opening this since the README states that apparently python versions >=3.10 are supported :pray:

cc @helder

samber commented 1 year ago

I'm having the same issue and just successfully ran a connector with python3.10 instead.

MaxSPG commented 9 months ago

Same problem here. Even with pipx installed and using the command exactly as stated in the docs here it does not work for me.

Commands used:

I am getting the following error: "Unable to parse package spec: airbyte-ci/connectors/pipelines"