MAINT Drop Python 3.10 support - #2620
Open
Roman Lutz (romanlutz) wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 09c903b7-7852-4394-bee2-cbdd34dbe878
| @@ -696,20 +182,37 @@ async def cancel_run_async(self, *, scenario_result_id: str) -> ScenarioRunSumma | |||
| active = self._active_tasks.get(scenario_result_id) | |||
| if active is not None and active.task is not None and not active.task.done(): | |||
| active.task.cancel() | |||
| with contextlib.suppress(asyncio.CancelledError, asyncio.TimeoutError): | |||
| with contextlib.suppress(asyncio.CancelledError, TimeoutError): | |||
Contributor
There was a problem hiding this comment.
I think there is a lone asyncio.TimeoutError left in _server_launcher.py
Contributor
There was a problem hiding this comment.
think because this branch isn't up to date with latest main, can see a bunch of merge conflicts :D
| @@ -407,6 +389,7 @@ ignore = [ | |||
| "DOC502", # Raised exception is not explicitly raised | |||
| "PERF203", # try-except-in-loop (intentional per-item error handling) | |||
| "SIM117", # multiple-with-statements (combining often exceeds line length) | |||
| "UP042", # Replacing public str Enums with StrEnum changes their str() behavior | |||
Contributor
There was a problem hiding this comment.
curious why this is necessary?
Justin Song (jsong468)
approved these changes
Sep 10, 2026
Justin Song (jsong468)
left a comment
Contributor
There was a problem hiding this comment.
merge conflicts to deal with but lgtm!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
uv.lockfor the new supported-version rangeMotivation
Python 3.10 reaches end of life on October 31, 2026. In addition, recent LiteLLM releases no longer support Python 3.10, which prevents PyRIT from consuming the latest supported LiteLLM versions while retaining the old runtime floor. Moving to Python 3.11 keeps PyRIT on a maintained Python release and removes compatibility code that is no longer needed.
Testing
uv run -m pytest -n 4 --dist=loadfile tests/unit(14,966 passed, 6 skipped)