Skip to content

Commit 5e2114b

Browse files
authored
Fix SyntaxError on Python 3.14 in connection handler registration. (#260)
- Remove no-op `finally: continue` that violates PEP 765. - Loop naturally continues; bare `except:` already catches all. - Fixes #252
1 parent ed5ef48 commit 5e2114b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Fixed
1111

12+
- Fix `SyntaxError` on Python 3.14 in `Connection._register_handlers`. PEP 765 makes `continue`/`break`/`return` that exits a `finally` block a `SyntaxError` (was a `SyntaxWarning` in 3.13), so `zendriver/core/connection.py` failed to import under 3.14. Removed the no-op `finally: continue` (the loop already falls through to the next iteration, and the enclosing bare `except:` catches everything, so nothing changed behaviorally). Fixes #252
13+
1214
### Added
1315

1416
### Changed

zendriver/core/connection.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,6 @@ async def _register_handlers(self) -> None:
632632
except: # noqa
633633
logger.debug("NOT GOOD", exc_info=True)
634634
continue
635-
finally:
636-
continue
637635
for ed in enabled_domains:
638636
# we started with a copy of self.enabled_domains and removed a domain from this
639637
# temp variable when we registered it or saw handlers for it.

0 commit comments

Comments
 (0)