From c6156a4233bd265d89c5dc54600d09bdd37f20f9 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Wed, 22 Oct 2025 14:00:50 +0200 Subject: [PATCH 1/3] feat: Add support for Python 3.14 --- .github/workflows/build_and_deploy_docs.yaml | 2 +- .github/workflows/pre_release.yaml | 6 +++--- .github/workflows/release.yaml | 6 +++--- .github/workflows/run_code_checks.yaml | 6 +++--- pyproject.toml | 3 ++- uv.lock | 2 +- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build_and_deploy_docs.yaml b/.github/workflows/build_and_deploy_docs.yaml index acbc2963..4e8761a2 100644 --- a/.github/workflows/build_and_deploy_docs.yaml +++ b/.github/workflows/build_and_deploy_docs.yaml @@ -8,7 +8,7 @@ on: env: NODE_VERSION: 22 - PYTHON_VERSION: 3.13 + PYTHON_VERSION: 3.14 jobs: build_and_deploy_docs: diff --git a/.github/workflows/pre_release.yaml b/.github/workflows/pre_release.yaml index 4b680bbf..99d2af98 100644 --- a/.github/workflows/pre_release.yaml +++ b/.github/workflows/pre_release.yaml @@ -36,19 +36,19 @@ jobs: name: Lint check uses: apify/workflows/.github/workflows/python_lint_check.yaml@main with: - python-versions: '["3.10", "3.11", "3.12", "3.13"]' + python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' type_check: name: Type check uses: apify/workflows/.github/workflows/python_type_check.yaml@main with: - python-versions: '["3.10", "3.11", "3.12", "3.13"]' + python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' unit_tests: name: Unit tests uses: apify/workflows/.github/workflows/python_unit_tests.yaml@main with: - python-versions: '["3.10", "3.11", "3.12", "3.13"]' + python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' integration_tests: name: Integration tests diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index be0f2d39..32d85fa4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -47,19 +47,19 @@ jobs: name: Lint check uses: apify/workflows/.github/workflows/python_lint_check.yaml@main with: - python-versions: '["3.10", "3.11", "3.12", "3.13"]' + python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' type_check: name: Type check uses: apify/workflows/.github/workflows/python_type_check.yaml@main with: - python-versions: '["3.10", "3.11", "3.12", "3.13"]' + python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' unit_tests: name: Unit tests uses: apify/workflows/.github/workflows/python_unit_tests.yaml@main with: - python-versions: '["3.10", "3.11", "3.12", "3.13"]' + python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' update_changelog: name: Update changelog diff --git a/.github/workflows/run_code_checks.yaml b/.github/workflows/run_code_checks.yaml index 4323b479..d4123b4a 100644 --- a/.github/workflows/run_code_checks.yaml +++ b/.github/workflows/run_code_checks.yaml @@ -16,19 +16,19 @@ jobs: name: Lint check uses: apify/workflows/.github/workflows/python_lint_check.yaml@main with: - python-versions: '["3.10", "3.11", "3.12", "3.13"]' + python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' type_check: name: Type check uses: apify/workflows/.github/workflows/python_type_check.yaml@main with: - python-versions: '["3.10", "3.11", "3.12", "3.13"]' + python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' unit_tests: name: Unit tests uses: apify/workflows/.github/workflows/python_unit_tests.yaml@main with: - python-versions: '["3.10", "3.11", "3.12", "3.13"]' + python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]' docs_check: name: Docs check diff --git a/pyproject.toml b/pyproject.toml index bf99711a..42cd993f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Software Development :: Libraries", ] keywords = [ @@ -39,7 +40,7 @@ dependencies = [ "crawlee>=1.0.4,<2.0.0", "cachetools>=5.5.0", "cryptography>=42.0.0", - "impit>=0.6.1", + "impit>=0.8.0", "lazy-object-proxy>=1.11.0", "more_itertools>=10.2.0", "typing-extensions>=4.1.0", diff --git a/uv.lock b/uv.lock index 66470017..2d21bf76 100644 --- a/uv.lock +++ b/uv.lock @@ -78,7 +78,7 @@ requires-dist = [ { name = "cachetools", specifier = ">=5.5.0" }, { name = "crawlee", specifier = ">=1.0.4,<2.0.0" }, { name = "cryptography", specifier = ">=42.0.0" }, - { name = "impit", specifier = ">=0.6.1" }, + { name = "impit", specifier = ">=0.8.0" }, { name = "lazy-object-proxy", specifier = ">=1.11.0" }, { name = "more-itertools", specifier = ">=10.2.0" }, { name = "scrapy", marker = "extra == 'scrapy'", specifier = ">=2.11.0" }, From 805428af0bcc206c3c7ba37c6165c799b4df289c Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Wed, 22 Oct 2025 14:02:57 +0200 Subject: [PATCH 2/3] integration tests 3.10 and 3.14 --- .github/workflows/run_code_checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_code_checks.yaml b/.github/workflows/run_code_checks.yaml index d4123b4a..a5fca837 100644 --- a/.github/workflows/run_code_checks.yaml +++ b/.github/workflows/run_code_checks.yaml @@ -39,4 +39,4 @@ jobs: uses: apify/workflows/.github/workflows/python_integration_tests.yaml@main secrets: inherit with: - python-versions: '["3.10", "3.13"]' + python-versions: '["3.10", "3.14"]' From 9a17de6fd145b477f8f6a11394d49ac47ec6457e Mon Sep 17 00:00:00 2001 From: Max Bohomolov Date: Thu, 13 Nov 2025 03:54:55 +0000 Subject: [PATCH 3/3] get/create event loop --- tests/unit/conftest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index bd041b50..d46a1569 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -158,7 +158,12 @@ async def replacement_method(*args: Any, **kwargs: Any) -> Any: return original_replacement_method(*args, **kwargs) else: original_return_value = return_value - return_value = asyncio.Future() + try: + loop = asyncio.get_running_loop() + except RuntimeError: + # No event loop is running, create a new one + loop = asyncio.new_event_loop() + return_value = loop.create_future() return_value.set_result(original_return_value) if not replacement_method: