-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Upgrade dependencies #839
Upgrade dependencies #839
Conversation
Add aaronhmiller/httpbin fork which has had https://github.com/aaronhmiller/httpbin.git applied so it can work with latest werkzeug.
Hi, thank you for this draft MR. I am trying to get this project into the gentoo user repository so it would be very valuable to have python 3.10+ support. For this reason I tried to add two small modifications in order to fix the tests:
|
Overall there are only 5 tests failing on my branch but they are all related to path rewriting. I need help fixing those because I have no experience with that part of the codebase
|
@FraMecca I see 4 tests failing in my Python 3.11 dev environment:
I'm pretty sure these are related to me switching to a fork of httpbin. I need to get these tests problems resolved now since I'm having trouble installing greenlet v1 on the latest debian Docker images, which ship with Python 3.11. |
@edsu so we have the same failures on our branches. I don't understand how you are able to pull that without switching to a py3 version of pyamf. What do you plan to do for httpbin? |
This was removed in werkzeug 2.3 and exists as shift_pop_info in wsgiref: pallets/werkzeug#2415
@FraMecca I'm currently using a fork of httpbin that has been updated: https://github.com/webrecorder/pywb/blob/upgrade-dependencies/test_requirements.txt#L9 I updated this PR to replace It looks like py3AMF is being installed conditionally in the setup.py. Is that not working for you? |
It seems like JSON in responses is now minimized without spaces? I'm not sure what changed in the stack to do that.
I think that perhaps these length tests are failing because spaces are now being removed from JSON responses somewhere in the stack, maybe by the httpbin fork? Here are a bunch of space related changes I needed to make to get some tests to pass: 5b72d96 |
@edsu I get 400 instead of 200 on some tests that use httbin, so it might be a different issue |
It's needed, for the tests, right? In any case porting the library to py3 wasn't a big effort so I would be glad if it can be of help to you |
@FraMecca there is already a Python3 port of pyamf at https://github.com/StdCarrot/Py3AMF. Does that not work for you? |
It looks like https://github.com/psf/httpbin is being actively maintained by the Python Software Foundation so I'm going to switch to using that. Sadly, I see it still has the same set of HTTP 400 instead of HTTP 200 errors:
But at least if a change in httbin is needed it is feasible to get it applied. The original repository is abandoned. |
Sadly it appears that httpbin is no longer able to return invalid
This is what appears in the docker console when run against the psf/httpbin:
Maybe the older version of httpbin wasn't so strict? |
Use the latest httpbin from psf/httpbin and adjust some json responses since the formatting has changed slightly.
Any news on this? We would like to upgrade our old Debian 11 servers to 12 :) |
7ff970f
to
f4ccdfc
Compare
Hi, thanks for your patience and to @edsu for starting this branch! Apologies for the long delay on taking this up, we've been very focused on Browsertrix of late and are a small team. I'm planning to merge this into main soon with some other fixes/features and we should put out a new release shortly! |
Pinning |
dc510e4
to
2e3342c
Compare
Note that werkzeug 2.3.0 dropped support for Python 3.7; if we want to continue to support Python < 3.8, we'd need to pin to |
a242ce6
to
d69bffd
Compare
It's also worth noting that |
59b3f5e
to
930c901
Compare
We decided to support Python 3.7-3.11 in the next release, and will drop Python 3.7, add Python 3.12, and upgrade dependencies further in the following release. I will make an issue to document what will be needed at that point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! This is an important step in moving pywb forward!
Great work @tw4l ! |
This is a draft since 4 tests are failing after the upgrades...
Description
Upgrade various dependencies (gevent, werkzeug, markupsafe, jinja2, flask and httpbin) with the goal of fixing builds with Python v3.11 and higher.
Motivation and Context
I spent a bit of time trying to let gevent float to 3.1.2 and working through the effects of running pip install -r requirements.txt.
The good news is gevent v22.10.2 installs under Python3.11 now. But installing the latest werkzeug (which is currently unpinned) brings along the need to upgrade markupsafe and jinja2. I worked through the minimal changes to get that working, which mostly involved using pass_context instead of contextfunction.
The bad news is that the tests installed an old version of flask, which pulled in an old version of werkzeug which breaks things again. The reason why flask < v2 is installed is to get the old werkzeug which is needed by httpbin, which appears to be dead?
I think we could pin back werkzeug in our requirements.txt to solve this. But it seems like we would just be forestalling the inevitable need to upgrade? The approach taken here is to install a fork of httpbin for testing which has been updated to work with the latest werkzeug.
Fixes #835
Types of changes
Checklist: