diff --git a/.github/workflows/github-actions-tests.yml b/.github/workflows/github-actions-tests.yml index cf79387a..25cab9c6 100644 --- a/.github/workflows/github-actions-tests.yml +++ b/.github/workflows/github-actions-tests.yml @@ -6,20 +6,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.12 - uses: pre-commit/action@v3.0.1 run-tests: strategy: fail-fast: false matrix: - python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12.3" ] - mongodb-version: [ 4.4, 5.0, 6.0, 7.0, 8.0 ] - pydantic-version: [ "1.10.15", "2.7" ] - exclude: - - python-version: "3.7" - pydantic-version: "2.7" + python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] + mongodb-version: [4.4, 5.0, 6.0, 7.0, 8.0 ] + pydantic-version: [ "1.10.18", "2.9.2" ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index d485217c..7d0b317b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "beanie" version = "1.27.0" description = "Asynchronous Python ODM for MongoDB" readme = "README.md" -requires-python = ">=3.7,<4.0" +requires-python = ">=3.8,<4.0" license = { file="LICENSE" } authors = [ {name = "Roman Right", email = "roman-right@protonmail.com"} @@ -23,7 +23,8 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "pydantic>=1.10,<3.0", + "pydantic>=1.10.18,<3.0; python_version <= '3.12.3'", + "pydantic>=1.10,<=2.0,>2.7.4,<3.0; python_version > '3.12.3'",#after 3.12.3 pydantic <2.7.4 is incompatible https://github.com/pydantic/pydantic/pull/9615 "motor>=2.5.0,<4.0.0", "click>=7", "toml", @@ -33,12 +34,11 @@ dependencies = [ [project.optional-dependencies] test = [ - "pre-commit>=2.3.0", - "pytest>=6.0.0", - "pytest-asyncio>=0.21.0", - "pytest-cov>=2.8.1", + "pre-commit>=3.5.0", + "pytest>=8.3.3", + "pytest-asyncio>=0.24.0", + "pytest-cov>=5.0.0", "dnspython>=2.1.0", - "flake8>=3", "pyright>=0", "asgi-lifespan>=1.0.1", "httpx>=0.23.0", @@ -78,7 +78,7 @@ beanie = "beanie.executors.migrate:migrations" # TOOLS [tool.pytest.ini_options] -minversion = "6.0" +minversion = "8.0" addopts = "--cov-report term-missing --cov=beanie --cov-branch --cov-fail-under=80" testpaths = [ "tests", @@ -89,6 +89,7 @@ filterwarnings = [ "ignore::UserWarning", ] asyncio_mode = "auto" +asyncio_default_fixture_loop_scope = "function" [tool.beanie.migrations] path = "beanie/example_migration"