Skip to content

chore(deps): bump google-cloud-firestore - #989

Open
lahirumaramba wants to merge 3 commits into
mainfrom
gemini-update-firestore-dep
Open

lahirumaramba wants to merge 3 commits into
mainfrom
gemini-update-firestore-dep

Conversation

@lahirumaramba

Copy link
Copy Markdown
Member

Update google-cloud-firestore requirement in requirements.txt from >= 2.27.0 to >= 2.28.0 for Python >= 3.10 environments, while preserving >= 2.27.0 for Python < 3.10 environments. This prevents dependency resolution errors on Python 3.9 where google-cloud-firestore 2.28.0 dropped support.

Update google-cloud-firestore requirement to >=2.28.0 for Python >=3.10 and keep >=2.27.0 for Python <3.10 because google-cloud-firestore 2.28.0 dropped support for Python 3.9.
@lahirumaramba
lahirumaramba requested review from a team and yvonnep165 September 23, 2026 19:33
@lahirumaramba lahirumaramba added the release:stage Stage a release candidate label Sep 23, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

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 updates the google-cloud-firestore dependency in requirements.txt to apply different version constraints based on the Python version. The reviewer identifies a potential issue with using lexicographical string comparisons for Python version markers, which could cause incorrect dependency resolution in some environments. They suggest using specific equality checks (python_version != '3.9' and python_version == '3.9') to ensure robust behavior across all dependency parsers.

Comment thread requirements.txt Outdated
Comment on lines +12 to +13
google-cloud-firestore >= 2.28.0; platform.python_implementation != 'PyPy' and python_version >= '3.10'
google-cloud-firestore >= 2.27.0; platform.python_implementation != 'PyPy' and python_version < '3.10'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using python_version >= '3.10' and python_version < '3.10' can lead to unexpected behavior with older or alternative package managers, dependency parsers, and security scanners that incorrectly perform lexicographical string comparison instead of PEP 440 version comparison.

Specifically, under lexicographical comparison:

  • '3.9' >= '3.10' evaluates to True (since '9' > '1'), which would incorrectly select the >= 2.28.0 requirement on Python 3.9.
  • '3.9' < '3.10' evaluates to False, failing to select the >= 2.27.0 requirement on Python 3.9.

Since the minimum supported Python version for this project is 3.9 (as specified in setup.py), you can safely use python_version != '3.9' and python_version == '3.9' respectively. This is completely robust against any lexicographical string comparison bugs.

google-cloud-firestore >= 2.28.0; platform.python_implementation != 'PyPy' and python_version != '3.9'
google-cloud-firestore >= 2.27.0; platform.python_implementation != 'PyPy' and python_version == '3.9'

This branch has not been deployed

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

Labels

release:stage Stage a release candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants