Collection fails when running acceptance tests in python 3.10 env of low-code configuration source #17855
Labels
area/connectors
Connector related issues
community
team/extensibility
type/bug
Something isn't working
Environment
source-exchange-rates
Current Behavior
When I running acceptance tests by command
docker build . -t airbyte/source-clickup-api:dev; python -m pytest integration_tests -p integration_tests.acceptance
in my low-code configured source. TheTypeError: DegenerateFiles.Path.open() got an unexpected keyword argument 'encoding'
occured in each testcase. But it is okay when I running the same command in Python 3.9.13. It probably related to this issue, but I'm unsure if it is the root reason of the error.Expected Behavior
The testing should be runable like using 3.9.13 venv, as follows.
Logs
Testing Logs
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them Test session starts (platform: darwin, Python 3.10.0, pytest 6.2.5, pytest-sugar 0.9.5) cachedir: .pytest_cache hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/Users/wilson/wilson/sideproject/airbyte/airbyte-integrations/connectors/source-clickup-api/.hypothesis/examples') rootdir: /Users/wilson/wilson/sideproject/airbyte, configfile: pytest.ini plugins: hypothesis-6.54.6, sugar-0.9.5, requests-mock-1.9.3, mock-3.6.1, timeout-1.4.2, cov-3.0.0 collecting ... ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ERROR collecting airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_core.py ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ../../bases/source-acceptance-test/source_acceptance_test/tests/test_core.py:32: in <module> from source_acceptance_test.utils.backward_compatibility import CatalogDiffChecker, SpecDiffChecker, validate_previous_configs ../../bases/source-acceptance-test/source_acceptance_test/utils/backward_compatibility.py:12: in <module> from hypothesis_jsonschema import from_schema .3.10.venv/lib/python3.10/site-packages/hypothesis_jsonschema/__init__.py:9: in <module> from ._from_schema import from_schema .3.10.venv/lib/python3.10/site-packages/hypothesis_jsonschema/_from_schema.py:13: in <module> from hypothesis import assume, provisional as prov, strategies as st <frozen importlib._bootstrap>:1027: in _find_and_load ??? <frozen importlib._bootstrap>:1006: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:688: in _load_unlocked ??? .3.10.venv/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:170: in exec_module exec(co, module.__dict__) .3.10.venv/lib/python3.10/site-packages/hypothesis/provisional.py:37: in <module> _tlds = traversable.read_text().splitlines() /Users/wilson/.pyenv/versions/3.10.0/lib/python3.10/importlib/abc.py:378: in read_text with self.open(encoding=encoding) as strm: E TypeError: DegenerateFiles.Path.open() got an unexpected keyword argument 'encoding' ――――――――――――――――――――――――――――――――――――――――――――――――――――― ERROR collecting airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_full_refresh.py ―――――――――――――――――――――――――――――――――――――――――――――――――――――― /Users/wilson/.pyenv/versions/3.10.0/lib/python3.10/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) <frozen importlib._bootstrap>:1050: in _gcd_import ??? <frozen importlib._bootstrap>:1027: in _find_and_load ??? <frozen importlib._bootstrap>:992: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:241: in _call_with_frames_removed ??? <frozen importlib._bootstrap>:1050: in _gcd_import ??? <frozen importlib._bootstrap>:1027: in _find_and_load ??? <frozen importlib._bootstrap>:1006: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:688: in _load_unlocked ??? <frozen importlib._bootstrap_external>:883: in exec_module ??? <frozen importlib._bootstrap>:241: in _call_with_frames_removed ??? ../../bases/source-acceptance-test/source_acceptance_test/tests/__init__.py:5: in <module> from .test_core import TestBasicRead, TestConnection, TestDiscovery, TestSpec <frozen importlib._bootstrap>:1027: in _find_and_load ??? <frozen importlib._bootstrap>:1006: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:688: in _load_unlocked ??? .3.10.venv/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:170: in exec_module exec(co, module.__dict__) ../../bases/source-acceptance-test/source_acceptance_test/tests/test_core.py:32: in <module> from source_acceptance_test.utils.backward_compatibility import CatalogDiffChecker, SpecDiffChecker, validate_previous_configs ../../bases/source-acceptance-test/source_acceptance_test/utils/backward_compatibility.py:12: in <module> from hypothesis_jsonschema import from_schema .3.10.venv/lib/python3.10/site-packages/hypothesis_jsonschema/__init__.py:9: in <module> from ._from_schema import from_schema .3.10.venv/lib/python3.10/site-packages/hypothesis_jsonschema/_from_schema.py:13: in <module> from hypothesis import assume, provisional as prov, strategies as st <frozen importlib._bootstrap>:1027: in _find_and_load ??? <frozen importlib._bootstrap>:1006: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:688: in _load_unlocked ??? .3.10.venv/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:170: in exec_module exec(co, module.__dict__) .3.10.venv/lib/python3.10/site-packages/hypothesis/provisional.py:37: in <module> _tlds = traversable.read_text().splitlines() /Users/wilson/.pyenv/versions/3.10.0/lib/python3.10/importlib/abc.py:378: in read_text with self.open(encoding=encoding) as strm: E TypeError: DegenerateFiles.Path.open() got an unexpected keyword argument 'encoding' ―――――――――――――――――――――――――――――――――――――――――――――――――――――― ERROR collecting airbyte-integrations/bases/source-acceptance-test/source_acceptance_test/tests/test_incremental.py ―――――――――――――――――――――――――――――――――――――――――――――――――――――― /Users/wilson/.pyenv/versions/3.10.0/lib/python3.10/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) <frozen importlib._bootstrap>:1050: in _gcd_import ??? <frozen importlib._bootstrap>:1027: in _find_and_load ??? <frozen importlib._bootstrap>:992: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:241: in _call_with_frames_removed ??? <frozen importlib._bootstrap>:1050: in _gcd_import ??? <frozen importlib._bootstrap>:1027: in _find_and_load ??? <frozen importlib._bootstrap>:1006: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:688: in _load_unlocked ??? <frozen importlib._bootstrap_external>:883: in exec_module ??? <frozen importlib._bootstrap>:241: in _call_with_frames_removed ??? ../../bases/source-acceptance-test/source_acceptance_test/tests/__init__.py:5: in <module> from .test_core import TestBasicRead, TestConnection, TestDiscovery, TestSpec <frozen importlib._bootstrap>:1027: in _find_and_load ??? <frozen importlib._bootstrap>:1006: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:688: in _load_unlocked ??? .3.10.venv/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:170: in exec_module exec(co, module.__dict__) ../../bases/source-acceptance-test/source_acceptance_test/tests/test_core.py:32: in <module> from source_acceptance_test.utils.backward_compatibility import CatalogDiffChecker, SpecDiffChecker, validate_previous_configs ../../bases/source-acceptance-test/source_acceptance_test/utils/backward_compatibility.py:12: in <module> from hypothesis_jsonschema import from_schema .3.10.venv/lib/python3.10/site-packages/hypothesis_jsonschema/__init__.py:9: in <module> from ._from_schema import from_schema .3.10.venv/lib/python3.10/site-packages/hypothesis_jsonschema/_from_schema.py:13: in <module> from hypothesis import assume, provisional as prov, strategies as st <frozen importlib._bootstrap>:1027: in _find_and_load ??? <frozen importlib._bootstrap>:1006: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:688: in _load_unlocked ??? .3.10.venv/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:170: in exec_module exec(co, module.__dict__) .3.10.venv/lib/python3.10/site-packages/hypothesis/provisional.py:37: in <module> _tlds = traversable.read_text().splitlines() /Users/wilson/.pyenv/versions/3.10.0/lib/python3.10/importlib/abc.py:378: in read_text with self.open(encoding=encoding) as strm: E TypeError: DegenerateFiles.Path.open() got an unexpected keyword argument 'encoding' {"type": "LOG", "log": {"level": "INFO", "message": "/Users/wilson/wilson/sideproject/airbyte/airbyte-integrations/connectors/source-clickup-api - SAT run - e01b314284ace98cba122d7460f173f3fdaafc31 - FAILED"}} ==================================================================================================== short test summary info ==================================================================================================== FAILED ../../bases/source-acceptance-test/source_acceptance_test/tests/test_core.py - TypeError: DegenerateFiles.Path.open() got an unexpected keyword argument 'encoding' FAILED ../../bases/source-acceptance-test/source_acceptance_test/tests/test_full_refresh.py - TypeError: DegenerateFiles.Path.open() got an unexpected keyword argument 'encoding' FAILED ../../bases/source-acceptance-test/source_acceptance_test/tests/test_incremental.py - TypeError: DegenerateFiles.Path.open() got an unexpected keyword argument 'encoding' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Results (0.50s):
Steps to Reproduce
source-exchange-rates
airbyte/airbyte-integrations/connectors/source-clickup-api
and setup virtualenv withpython3.10 -m venv .venv
docker build . -t airbyte/source-clickup-api:dev; python -m pytest integration_tests -p integration_tests.acceptance
Are you willing to submit a PR?
yes
The text was updated successfully, but these errors were encountered: