Closed scottbarnes closed 8 months ago
I submitted a PR over at webpy/webpy#784 to fix this.
Scott fixed this one! 🥳
The problem has been patched, but I don't think there's been a new release of web.py
yet. Once a release is made, the dependencies here will need to be updated with the new web.py
version.
I had updated requirements.txt
here to point to the commit with the patch, which I would like to declare was very much a team effort with @tfmorris: https://github.com/internetarchive/openlibrary/blob/4043d671afe60105063fdcd12f59ffe36b087cbc/requirements.txt#L11
Except for any errors. Those were all mine.
Currently there are a few errors when running tests (and indeed, loading... any page on the site) when using Python 3.12.
Edit: this appears to be a
web.py
problem that will likely prevent Open Library from using Python 3.12 until the issue inweb.py
is fixed. An issue has been opened forweb.py
at webpy/webpy#784.I am not sure what change in 3.12 is responsible. Perhaps PEP 701: Syntactic formalization of f-strings, though at first glace the code that's causing the errors has no f-strings, but it is at least related to string parsing.
Evidence / Screenshot (if possible)
pytest
error:Similarly, visiting any page that should load a template shows something like the following in the Docker console (note the multiple template parsing failures):
Relevant url?
Steps to Reproduce
Internal Server Error
, and the Docker console shows an error ending with something like:tokenize.TokenError: ('unterminated string literal (detected at line 1)', (1, 4))
.Proposal & Constraints
I propose we fix the bug. Likely by making a change to
web.py
. But it will require more investigation to find the root of the error.Related files
Stakeholders
@cdrini