Skip to content

Fix SyntaxError on Python 3.14 - #260

Merged
stephanlensky merged 1 commit into
cdpdriver:mainfrom
jvdillon:fix/py314-finally-continue
Jul 15, 2026
Merged

Fix SyntaxError on Python 3.14#260
stephanlensky merged 1 commit into
cdpdriver:mainfrom
jvdillon:fix/py314-finally-continue

Conversation

@jvdillon

@jvdillon jvdillon commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

PEP 765 makes control flow that exits a 'finally' block a SyntaxError in Python 3.14 (was SyntaxWarning in 3.13).

Fixes #252.

(If this PR lgty please auto-merge it.)

Description

Pre-merge Checklist

  • I have described my change in the section above.
  • I have ran the ./scripts/format.sh and ./scripts/lint.sh scripts. My code is properly formatted and has no linting errors.
  • I have ran uv run pytest and ensured all tests pass.
  • I have added my change to CHANGELOG.md under the [Unreleased] section.

@jvdillon
jvdillon requested a review from a team as a code owner July 15, 2026 04:04
- Remove no-op `finally: continue` that violates PEP 765.
- Loop naturally continues; bare `except:` already catches all.
- Fixes cdpdriver#252
@jvdillon
jvdillon force-pushed the fix/py314-finally-continue branch from 9ed4ec9 to 245e7f5 Compare July 15, 2026 04:06
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@stephanlensky
stephanlensky merged commit 5e2114b into cdpdriver:main Jul 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unnecessary continue in finally block causing SyntaxWarning

2 participants