diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..7955ca4 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,22 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# We recommend specifying your dependencies to enable reproducible builds: +# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: requirements.txt \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 934fd30..4d50445 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,13 @@ black invoke mypy -pydantic ~= 1.10.4 +pydantic==2.0.3 pylama pytest pytest-cov requests semver -sphinx ~= 6.1.3 +sphinx sphinx-rtd-theme tox twine diff --git a/setup.py b/setup.py index d31f7ac..eba5108 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ package_dir={"": "src"}, packages=find_packages(where="src"), install_requires=[], - extras_require={"pydantic": ["pydantic >= 1.8.2,< 2.0"]}, + extras_require={"pydantic": ["pydantic >= 1.8.2,< 3.0"]}, package_data={"": ["VERSION"], "event_processor": ["py.typed"]}, # Other configurations diff --git a/src/event_processor/dependencies.py b/src/event_processor/dependencies.py index caca8bb..5d3ad5f 100644 --- a/src/event_processor/dependencies.py +++ b/src/event_processor/dependencies.py @@ -15,7 +15,7 @@ try: from typing import get_args, get_origin # type: ignore except ImportError: # pragma: no cover - from src.event_processor.util import py37_get_origin as get_origin + from src.event_processor.util import py37_get_origin as get_origin # type: ignore from src.event_processor.util import py37_get_args as get_args diff --git a/src/tests/test_event_processor.py b/src/tests/test_event_processor.py index 03b1df3..ef0c08e 100644 --- a/src/tests/test_event_processor.py +++ b/src/tests/test_event_processor.py @@ -107,7 +107,6 @@ def b_test(): def test_processor_raises_exception_when_the_processor_takes_invalid_params(event_processor): - with pytest.raises(FilterError): @event_processor.processor(Accept()) @@ -152,7 +151,6 @@ def b_test(): def test_invoke_raises_for_no_matching_processors(event_processor): - with pytest.raises(InvocationError): event_processor.invoke({"a": 0})