Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions airbyte_cdk/sources/utils/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

try:
from jsonschema.validators import Validator
except:
from jsonschema import Validator
except ImportError:
from jsonschema.protocols import Validator
Copy link

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

The fallback import path may be incorrect. The original code imported from jsonschema directly, but the new fallback imports from jsonschema.protocols. If jsonschema.validators is unavailable, jsonschema.protocols might also be unavailable in older versions. Consider falling back to from jsonschema import Validator to maintain backward compatibility.

Suggested change
from jsonschema.protocols import Validator
from jsonschema import Validator

Copilot uses AI. Check for mistakes.



MAX_NESTING_DEPTH = 3
Expand Down
38 changes: 37 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,43 @@ log_cli_format = %(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno
log_cli_date_format=%Y-%m-%d %H:%M:%S
addopts = --junit-xml=build/test-results/pytest-results.xml
filterwarnings =
ignore::airbyte_cdk.sources.source.ExperimentalClassWarning
# Treat python warnings as errors in pytest (following PyAirbyte pattern)
error
# Ignore these specific warnings that are expected/acceptable:

# CDK experimental features - already in use, safe to ignore
# Occurs in: airbyte_cdk/sources/declarative/resolvers/config_components_resolver.py:46
ignore:This class is experimental. Use at your own risk.

# IncrementalMixin deprecation warnings - deprecated as of CDK v0.87.0 in favor of CheckpointMixin
# Occurs in: airbyte_cdk/sources/file_based/stream/default_file_based_stream.py:43
# Occurs in: unit_tests/sources/mock_server_tests/mock_source_fixture.py:65
ignore:Deprecated as of CDK version 0.87.0. Deprecated in favor of the `CheckpointMixin`:DeprecationWarning

# jsonschema import deprecation - Validator should be imported from jsonschema.protocols instead
# Occurs in: airbyte_cdk/sources/utils/transform.py:23
ignore:Importing Validator directly from the jsonschema package is deprecated:DeprecationWarning:airbyte_cdk.sources.utils.transform

# Python logging deprecation - logger.warn() method deprecated in favor of logger.warning()
# Occurs in: unit_tests/test_logger.py:81 (test intentionally uses deprecated method)
ignore:The 'warn' method is deprecated, use 'warning' instead:DeprecationWarning

# HttpRequester field deprecation warnings - path and url_base fields deprecated in favor of url field
# Occurs during connector builder test execution
ignore:Component type.*HttpRequester.*Field.*is deprecated:DeprecationWarning

# Unknown pytest markers - markers used in tests but not declared in pytest.ini
# Occurs in: various test files using image_tests and other custom markers
ignore::pytest.PytestUnknownMarkWarning

# Pytest infrastructure warnings - test framework related, safe to ignore
# PytestUnraisableExceptionWarning occurs when tests have unclosed resources (like file handles)
# Occurs in: unit_tests/destinations/test_destination.py::TestRun::test_run_write and similar tests
ignore::pytest.PytestUnraisableExceptionWarning

# PluggyTeardownRaisedWarning occurs during pytest plugin teardown processes
# Occurs during test cleanup phases, related to pytest plugin infrastructure
ignore::pluggy.PluggyTeardownRaisedWarning
markers =
slow: mark tests as slow
asyncio: mark test as asyncio
Expand Down
Loading