Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nolar
Copy link
Owner

@nolar nolar commented Nov 4, 2025

Python 3.14 has been released a few weeks ago — it is time to enable it (and fix the issues/deprecations).

Related:


FIXED. BLOCKED: The API tests are extremely slow in Python 3.14 (only 3.14, fast in 3.10-3.13) and fail the CI due to timeouts (5 mins). The cause is unknown.

This happens locally if the test are executed in sequence from the beginning, and does not happen if the API tests are executed selectively. Probably, some state accumulation that is not reset/cleared in Python 3.14 — likely in aresponses, likley with the monkey-patching of the dns resolver (as before) — but it is not proven yet.

To unblock, it requires either investigating & fixing the aresponses (or other causes), or finishing the kmock (99% finished since 2 years ago) and converting all tests to kmock — depending on what is easier & faster. Either way, it takes time, so Python 3.14 is currently on pause.

However, the code in this PR is fixed & prepared and should be runnable in Python 3.14 (on your own risk). If needed (in case the CI fix takes too long), it can be extracted into a separate PR and released as is.

UPD: Extracted into and released as 1.39.0:

UPD2: Fixed by suppressing the deprecation warnings from aresponses, and fixing the mock factory in Kopf. The switch to KMock was not necessary (though it is not cancelled, only postponed).

…nction)

The legacy `asyncio.iscoroutinefunction()` is deprecated and issues a warning. In strict mode, the warning raises the error and fails all the server-side processing, thus also failing all the API tests.

We can remove it from Kopf's code, including tests. But it remains in aresponses — so, suppress that warning explicitly.

This change is only relevant for tests, not for the framework itself — that was fixed earlier.

Signed-off-by: Sergey Vasilyev <[email protected]>
Meaningful only for Python 3.10, which will be gone soon anyway (≈Oct 2026).

Signed-off-by: Sergey Vasilyev <[email protected]>
@nolar nolar changed the title Enable Python 3.14 and use it by default Enable Python 3.14 and use it by default in CI Dec 19, 2025
@nolar nolar merged commit 56e2203 into main Dec 19, 2025
24 of 25 checks passed
@nolar nolar deleted the py314 branch December 19, 2025 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation CI/CD: testing, linting, releasing automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants