Enable Python 3.14 and use it by default #1188
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Python 3.14 has been released a few weeks ago — it is time to enable it (and fix the issues/deprecations).
Related:
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: