GeezerVison is showing github.com — feat(core): warn when importing on Python 3.10. by lahirumaramba · Pull Request #998 · firebase/firebase-admin-python
Conversation
Importing firebase_admin on Python 3.10 now emits a FutureWarning recommending Python 3.11 or higher. We check against a fixed version tuple per SDK release rather than comparing the current date against an EoL calendar at runtime, so an already-released SDK version never starts printing new warnings on a future calendar date.
Technical Details
- Package initialization (
firebase_admin/__init__.py) calls check_python_version() (firebase_admin/_python_version_support.py) once at import time and compares sys.version_info against _MIN_NON_DEPRECATED_VERSION = (3, 11).
- Emits
FutureWarning (stacklevel=2) rather than DeprecationWarning because Python hides DeprecationWarning outside __main__ by default, so application logs would otherwise miss it.
- Rollout: emit
FutureWarning on Python 3.10 in this minor release, drop Python 3.10 in a subsequent minor release, and bump _MIN_NON_DEPRECATED_VERSION in future minor releases ahead of dropping older Python versions.
- Testing: Added unit tests in
tests/test_python_version_support.py and verified ./lint.sh all locally.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
gemini-code-assist[bot] reacted with eyes emoji
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a Python version support checking mechanism for the Firebase Admin Python SDK. It adds a new module _python_version_support.py that checks the running Python version against a list of tracked versions and issues deprecation, end-of-life, or unsupported warnings accordingly. The README.md is updated to reflect that Python 3.9 and 3.10 support is deprecated, and comprehensive tests are added in tests/test_python_version_support.py. The review feedback suggests improving the warning attribution by adding stacklevel=2 to the warnings.warn calls, and refactoring the min_python helper function to avoid grammatically awkward fallback messages.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
lahirumaramba
changed the title
feat(core): add runtime Python version support warning for EoL versions
feat(core): warn when importing on Python 3.9 or 3.10.
Nov 3, 2026
lahirumaramba
changed the title
feat(core): warn when importing on Python 3.9 or 3.10.
feat(core): warn when importing on Python 3.10.
Nov 5, 2026
Emit a FutureWarning at import time when running on Python < 3.11 using
a fixed per-release version tuple rather than a runtime calendar check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
+1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|