Skip to content
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

Assorted fixes for code rot #6

Merged
merged 9 commits into from
Aug 10, 2023
Merged

Assorted fixes for code rot #6

merged 9 commits into from
Aug 10, 2023

Conversation

mgorny
Copy link

@mgorny mgorny commented Aug 1, 2023

Here's a combined effort to update the package after all the code rot. So far I've focused on fixing running the test suite via tox and now I'm working on fixing compatibility with newer versions of packages. It's partially my work and partially stuff taken from existing PRs.

Technically it's a work-in-progress but I'm doing things atomically, so it's fine to merge it at any point, and I'll just rebase.

Fix the tox.ini commands to use the correct test suite path, and run
it via unittest since executing the file does not do anything.
Relax the dependency bounds in `setup.py` to permit the newest versions
that are compatible with the current httpbin code, that is permit
the test suite to pass.
Remove the check for `Content-Length` header that is not provided
by default anymore with werkzeug 0.15.x.

See: pallets/werkzeug#2347

Taken from postmanlabs#684
Since the newer dependency versions and the code itself are now
compatible with newer Python versions, we can test the package up
to 3.12.  Add pypy3 to the test matrix while at it.
Update the code for werkzeug 2.1.x where `BaseResponse` class was
replaced by `Response`.

See: pallets/werkzeug#2276

Taken from postmanlabs#684
Fix passing bytes instead of str as the URL to .get() function.  This
fixes one of the test failures with werkzeug 2.3.x.
Remove the dependency on raven, as the code using it has been removed
in e543380.
The brotlipy package has been renamed to brotlicffi.  Update the imports
and dependencies accordingly.  The major advanage of the new package
is that it no longer collides with the Python bindings provided
by brotli itself.
Fix digest tests to check for `stale=True` case-insensitively, in order
to maintain compatibility with werkzeug < 2.3 (that used `stale=TRUE`)
and >= 2.3 (that uses `stale=True`).
@mgorny
Copy link
Author

mgorny commented Aug 1, 2023

Ok, that accounts for all the patches we've had in Gentoo, and gives me a clean test pass with newest versions of Flask, werkzeug and the bunch, and up to Python 3.12.

@kevin1024 kevin1024 merged commit 8a9a5ee into psf:main Aug 10, 2023
26 of 27 checks passed
@kevin1024
Copy link

Thanks for your work on this @mgorny.

Could you take a look at the test failure on windows? Not sure what that's all about.

@mgorny mgorny deleted the combined-fixes branch August 11, 2023 05:40
@mgorny
Copy link
Author

mgorny commented Aug 11, 2023

Thanks. I'll try to take a look in a few minutes, just when I'm done with my immediate TODO.

@mgorny
Copy link
Author

mgorny commented Aug 11, 2023

Could you take a look at the test failure on windows? Not sure what that's all about.

It seems that the problem is that rpds-py fails to build on PyPy3.9 on Windows, apparently with some "cancelled" error. I don't really know what it's about, it could be a problem with PyO3 or the GitHub environment. Unfortunately, I'm not a Rust expert, so I don't really know what to do about it. I'd suggest just excluding that test environment from the test matrix.

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.

2 participants