8000 chore(deps): update dependency flask-cors to v6 by renovate-bot · Pull Request #13378 · GoogleCloudPlatform/python-docs-samples · GitHub
[go: up one dir, main page]

Skip to content

chore(deps): update dependency flask-cors to v6 #13378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate-bot
Copy link
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
flask-cors ==5.0.0 -> ==6.0.0 age adoption passing confidence

Release Notes

corydolphin/flask-cors (flask-cors)

v6.0.0

Compare Source

Breaking

Path specificity ordering has changed to improve specificity. This may break users who expected the previous incorrect ordering.

What's Changed

Full Changelog: corydolphin/flask-cors@5.0.1...6.0.0

v5.0.1

Compare Source

What's Changed

This primarily changes packaging to use uv and a new release pipeline, along with some small documentation improvements

New Contributors

Full Changelog: corydolphin/flask-cors@5.0.0...5.0.01


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate-bot renovate-bot requested review from a team as code owners May 18, 2025 21:03
@trusted-contributions-gcf trusted-contributions-gcf bot added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels May 18, 2025
@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: endpoints Issues related to the Cloud Endpoints API. labels May 18, 2025
Copy link
Contributor
@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @renovate-bot, 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!

Summary of Changes

Hello team, gemini-code-assist here with a summary of this pull request. This PR, automatically generated by renovate-bot, focuses on updating the flask-cors dependency. Based on the title and description, the intent is to upgrade flask-cors from version 5.0.0 to 6.0.0. The release notes for v6.0.0 highlight that this is a major version update that includes breaking changes related to path specificity ordering and also incorporates security fixes addressing several CVEs. The actual change in the patch specifically targets the version constraint for Python 3.8 environments.

Highlights

  • Dependency Update: Updates the flask-cors library from version 5.0.0 to 6.0.0.
  • Python 3.8 Specific: The change in the requirements.txt file specifically updates the flask-cors version for environments running Python 3.8.
  • Breaking Changes & Security Fixes: Version 6.0.0 of flask-cors includes breaking changes regarding path specificity ordering and addresses multiple security vulnerabilities (CVEs).

Changelog

  • endpoints/getting-started/requirements.txt
    • Updated the version constraint for flask-cors from ==5.0.0 to ==6.0.0 specifically for python_version == "3.8".
Using Gemini Code Assist

The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and 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 to provide feedback.

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.


Dependency update,
Version six for Python three eight,
Check for breaking change.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 18, 2025
Copy link
Contributor
@gemini-code-assist gemini-code-assist bot left a 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 updates the flask-cors dependency from v5.0.0 to v6.0.0 for Python 3.8 environments, aligning it with the version used for Python 3.9+. This is a positive change for consistency and incorporates security fixes from flask-cors v6.0.0.

However, flask-cors v6.0.0 introduces breaking changes, as detailed in its release notes. It's important to consider their potential impact on this application, particularly concerning CORS behavior for the /auth/info/firebase endpoint.

Summary of Findings

  • Potential Impact of Breaking Changes in flask-cors v6.0.0: The update to flask-cors v6.0.0 introduces breaking changes, notably: path specificity ordering and case-sensitive request path matching. These could affect CORS behavior, especially for the /auth/info/firebase endpoint if clients relied on previous, potentially case-insensitive, matching. Verification is recommended.
  • Dependency Consistency and Security: Aligning flask-cors to v6.0.0 for Python 3.8 improves consistency with Python 3.9+ environments and incorporates important security fixes from the new version.

Merge Readiness

This PR is a beneficial dependency update for consistency and security. However, due to the breaking changes introduced in flask-cors v6.0.0 (particularly around path matching for CORS), I recommend that these changes are carefully reviewed in the context of this application's usage of flask-cors. Specifically, ensure that the /auth/info/firebase endpoint's CORS behavior is not adversely affected, especially concerning case sensitivity of paths.

Given these considerations, I suggest addressing the points raised in the review comment before merging. As an AI reviewer, I am not authorized to approve pull requests; please ensure further human review and approval.

@@ -1,6 +1,6 @@
Flask==3.0.3
flask-cors==6.0.0; python_version >= "3.9"
flask-cors==5.0.0; python_version == "3.8"
flask-cors==6.0.0; python_version == "3.8"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Updating flask-cors to v6.0.0 for Python 3.8 aligns it with newer Python versions and brings in security updates, which is good.

However, please be aware of the breaking changes introduced in flask-cors v6.0.0, as noted in their release notes:

  1. Path Specificity Ordering Changed: "Path specificity ordering has changed to improve specificity. This may break users who expected the previous incorrect ordering."

    • While the routes in main.py (/echo, /auth/info/googlejwt, etc.) are distinct, it's worth ensuring that this change doesn't inadvertently affect how CORS is applied if there were any subtle reliance on the old ordering (though unlikely with the current simple paths).
  2. Case Sensitive Request Path Matching (CVE-2024-6866): "Case Sensitive Request Path Matching."

    • This is a key change. The /auth/info/firebase endpoint uses @cross_origin. If clients were previously accessing this path with different casings (e.g., /auth/info/Firebase) and relying on case-insensitive matching for CORS headers, this will no longer work. CORS rules will now strictly match the defined path's case.
    • The existing test test_cors in main_test.py correctly uses the lowercase path /auth/info/firebase. This is good, but ensure that real-world usage or documentation for this sample emphasizes case-sensitive URLs for CORS-enabled endpoints.
  3. Security Fixes (CVE-2024-6839, CVE-2024-6844): These are beneficial security improvements.

Could you please confirm that these breaking changes, particularly the case-sensitive path matching for /auth/info/firebase, have been considered and that the application's behavior (and any associated client expectations for this sample) remains correct after this update? Ensuring tests cover these aspects, especially if case-insensitivity was implicitly relied upon, would be beneficial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: endpoints Issues related to the Cloud Endpoints API. owlbot:run Add this label to trigger the Owlbot post processor. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0