It looks like `poetry install` will install the latest version of redis
(v5.0.4) instead of what pip installs (v2.10.6). Unfortunately this
means that the old version of fakeredis that is pinned in the
requirements.txt will not work properly.
Fixes#903
The prepended semicolon breaks code (such as jQuery) that looks like:
foo = foo ? foo :
this.location;
I think the reason we started inserting the semicolon was because in situations like:
x = 1 + 2
this.location = "foo"
we used to rewrite to:
x = 1 + 2
(this && this._WB_wombat_obj_proxy || this).location = "foo"
which the browser would interpret as a bogus function call like `2(this && ... )`.
But nowadays prepending the semicolon should be unnecessary as we currently rewrite to:
x = 2 + 3
_____WB$wombat$check$this$function_____(this).location = "foo"
which will trigger JavaScript's automatic semicolon insertion rules like the original code does.
- Update and pin dependencies to specific versions that support Python 3.7-3.11
- Replace deprecated werkzeug.pop_path_info with wsgiref.shift_path_info
- Use the latest httpbin from psf/httpbin
- Remove unused flask test dependency
- Drop Python 2 and Python <3.7 support
- Ensure greenlet 2 is used for now, as psf/httpbin doesn't yet work with greenlet 3
---------
Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
If default_locale was set, and a web page was visited that doesn't have a langauge code in the path in the URL, the URL path parts returned by get_locale_prefixes() was wrong (e.g. /hrst/ instead of /hr/test/).
If the default_locale was set and the URL path didn't contain a language code, it was behaving as if there was a language code in the URL. In that case, it was moving part of the PATH_INFO to SCRIPT_NAME, but as there wasn't any language code in the URL, it moved something else. This fixes that.
If the two letter language code was missing in the URI, switch_locale(locale) didn't add it (it worked fine if it was present). That means that it produced the same URL for all locales, each missing the two letter language code in the URL.
Add WACZ support for `wb-manager add` by unpacking WACZ files with --uncompress-wacz.
A future commit will add pywb support for WACZ files without requiring them to be unpacked.
substituion functionality already exists on a global level for matched
rules but this causes issues when rule sets conflict in the desired
outcome. This change enables setting regex substitution at the rule
level to avoid these conflicts.