Skip to content

Python 3.14 emits SyntaxWarning for return in finally block #72

Description

@frf12

Summary

Importing pyobvector on Python 3.14 emits a SyntaxWarning because ob_vec_json_table_client.py returns from a finally block.

Reproduction

Environment:

  • Python 3.14.x
  • pyobvector 0.2.28

Running a CLI that imports the package (for example, a PowerContext server/configuration command) produces:

.../site-packages/pyobvector/client/ob_vec_json_table_client.py:799: SyntaxWarning: 'return' in a 'finally' block
  return n_new_records

Impact

This is non-fatal on the normal path, but Python warns that a return in finally can suppress an exception raised by the try block. It also makes every importing CLI appear to have failed or misconfigured on Python 3.14.

Suggested fix

Move the return after the try/finally cleanup (or otherwise avoid returning from finally) so exceptions are not masked. Please consider adding Python 3.14 to the compatibility test matrix.

Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions