Skip to content

chore: Add werkzeug package to setup file #1098

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 5 commits into
base: main
Choose a base branch
from

Conversation

gopidesupavan
Copy link

werkzeug package is using https://github.com/sendgrid/sendgrid-python/blob/main/sendgrid/helpers/inbound/parse.py#L6. I think its mandatory package here.

In recently at airflow our CI is failing due to werkzeug package missing.

https://github.com/apache/airflow/actions/runs/14342959080/job/40206921048?pr=48819#step:6:2431

Fixes

A short description of what this PR does.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket.

@gopidesupavan gopidesupavan changed the title Add werkzeug package to setup file [chore] Add werkzeug package to setup file Apr 10, 2025
@gopidesupavan gopidesupavan changed the title [chore] Add werkzeug package to setup file chore: Add werkzeug package to setup file Apr 10, 2025
@eladkal
Copy link

eladkal commented Apr 10, 2025

@thinkingserious @tiwarishubham635 any chance to have a release with this fix?

@tiwarishubham635
Copy link
Contributor

Hi! I have raised #1099 to fix the failing tests. Will get them merged and then we can review your PR too.

@gopidesupavan
Copy link
Author

Thanks @tiwarishubham635 :)

@tiwarishubham635
Copy link
Contributor

HI @gopidesupavan @eladkal
Can you check the failing tests?

@gopidesupavan
Copy link
Author

HI @gopidesupavan @eladkal Can you check the failing tests?

Sure let me have a look

@eladkal
Copy link

eladkal commented Apr 11, 2025

@tiwarishubham635 thank you for the assistance.
By the way official support for Python 3.12 and 3.13 would be much valued. I see a PR was raised for it #1087

@gopidesupavan
Copy link
Author

@tiwarishubham635 it looks like python 2.7 is not compatible with latest werkzeug. Just checking 2.7 is way old is it still a requirement to support?

@eladkal
Copy link

eladkal commented Apr 11, 2025

@tiwarishubham635 it looks like python 2.7 is not compatible with latest werkzeug. Just checking 2.7 is way old is it still a requirement to support?

You can do

'werkzeug>=X; python_version < "3.7.0"',
'werkzeug>=Y; python_version >= "3.7.0"'

you just need to find the compatible library versions to match the python versions

@tiwarishubham635
Copy link
Contributor

@tiwarishubham635 thank you for the assistance. By the way official support for Python 3.12 and 3.13 would be much valued. I see a PR was raised for it #1087

I can check into this and support for latest python versions. However, removing old versions is a tricky part since some of our customers might still be using it. I can check with my team about this decision

@eladkal
Copy link

eladkal commented Apr 11, 2025

I think

install_requires=[
    "werkzeug>=0.11.15,<1.0.0 ; python_version < '3.0'",
    "werkzeug>=0.15.0,<2.0.0 ; python_version >= '3.0' and python_version < '3.6'",
    "werkzeug>=2.0.0,<3.0.0 ; python_version >= '3.6' and python_version < '3.11'",
    "werkzeug>=3.0.0 ; python_version >= '3.11'"
]

should do the trick @gopidesupavan can you try it?

@gopidesupavan
Copy link
Author

"werkzeug>=0.11.15,<1.0.0 ; python_version < '3.0'",
"werkzeug>=0.15.0,<2.0.0 ; python_version >= '3.0' and python_version < '3.6'",
"werkzeug>=2.0.0,<3.0.0 ; python_version >= '3.6' and python_version < '3.11'",
"werkzeug>=3.0.0 ; python_version >= '3.11'"

Thanks elad for sending this, i was side tracked to another issue.

@eladkal
Copy link

eladkal commented Apr 14, 2025

@tiwarishubham635 can you assist with the tests? I am not sure what is the issue

@gopidesupavan
Copy link
Author

Looks like MarkupSafe not available in werkzeug. https://github.com/sendgrid/sendgrid-python/actions/runs/14403086591/job/40399477680?pr=1098#step:5:744 mark

@eladkal
Copy link

eladkal commented Apr 17, 2025

Looks like MarkupSafe not available in werkzeug.

I'm not sure why.
@tiwarishubham635 is it really required to support Python 2.7-3.8 ? These are EOL versions.
Also, the CI doesn't really explain if the issue is with specific python version as it doesn't seem to run on all the versions. Is there a way to trigger a run on all versions?

@tiwarishubham635
Copy link
Contributor

Looks like MarkupSafe not available in werkzeug.

I'm not sure why. @tiwarishubham635 is it really required to support Python 2.7-3.8 ? These are EOL versions. Also, the CI doesn't really explain if the issue is with specific python version as it doesn't seem to run on all the versions. Is there a way to trigger a run on all versions?

Just to check the issue exists due to the eol versions, can yo try removing them from here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants