Fix gunicorn upgrade compatibility issue in test imports #80
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.
This PR fixes the failing Dependabot PR #65 that attempted to upgrade gunicorn from 22.0.0 to 23.0.0 but failed CI due to a breaking API change.
Problem
The test file
src/gunicorn_test.py
was using a deprecated import pattern that was removed in gunicorn 23.x:This direct function import was deprecated in favor of using the proper application class pattern.
Solution
Updated the import and test implementation to use the new API:
Changes
gunicorn==22.0.0
togunicorn==23.0.0
insrc/requirements.txt
src/gunicorn_test.py
to useWSGIApplication
classThe new pattern maintains the same test behavior while using the supported gunicorn 23.x API. All existing functionality remains unchanged - the test still validates that gunicorn can successfully parse the application configuration.
Verification
To verify the fix works:
python3 -m venv .venv source .venv/bin/activate pip install -r requirements-dev.txt python -m pytest
Fixes #79.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.