Conversation
Prevents swallowing exceptions and fixes SyntaxWarning in Python 3.14.
- Replaces deprecated datetime.utcnow() with timezone-aware datetime.now(timezone.utc). - Renames MockCredentials and MockClass to avoid pytest/unittest collection warnings.
Silently drops metrics missing instance_id to prevent 400 InvalidArgument errors from Cloud Monitoring for project-level operations.
- Fix missing imports in metrics_exporter.py - Fix shadow datetime import in test_pool.py - Fix exception handling in cursor.py that broke dbapi tests
… to 3.14 - Fixes 'Python interpreter 3.10 not found' error in GitHub Actions lint job. - Fixes 'system' nox session failing because GitHub Actions only provisions Python 3.14 for it.
…by using run_in_transaction
…directly to avoid empty transaction ValueError
…hile keeping it out of CI matrices
…iet CI output logs
…reamedResultSet variants since Pytest >=8 unhandled thread exceptions explicitly bubble up from lazy evaluation races
…rrent request race
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request primarily focuses on resolving a race condition within streamed result sets, ensuring transaction IDs are correctly handled during concurrent operations. It also includes a significant update to deprecate Python 3.9 support across the project's testing and configuration. Additionally, the changes modernize datetime usage to be timezone-aware, enhance the robustness of metrics exports, and improve the reliability of backup operations and associated test cleanup routines. Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a critical fix for a race condition in streamed result sets by ensuring the transaction ID is populated before releasing the lock. It also includes several valuable improvements across the codebase, such as replacing the deprecated datetime.utcnow() with the timezone-aware datetime.now(timezone.utc), enhancing the robustness of samples and tests with timeouts and better cleanup logic, and fixing bugs in the metrics exporter. Additionally, support for Python 3.9 has been removed. The changes are well-implemented and improve the overall quality and stability of the library.
Note: Security Review did not run due to the size of the PR.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕