Avoid premailer 3.9.0 due to API breakage

https://github.com/peterbe/premailer/pull/255 introduced a new, for our
use case mandatory, argument to the constructor. Since this argument
wasn't part of the constructor in 3.8, we need to runtime-detect if
we're running premailer 3.9+ and then set the option.

Let's avoid this version for now and hope upstream sorts it out in a
more backwards-compat way -- or we wait a bit longer and force our users
to use premailer 3.9+.

Fixes #6768

Signed-off-by: Philipp Wagner <phw@lowrisc.org>
diff --git a/python-requirements.txt b/python-requirements.txt
index 12f8f08..e46bc76 100644
--- a/python-requirements.txt
+++ b/python-requirements.txt
@@ -16,7 +16,11 @@
 meson >= 0.53.0, <= 0.56 # minimum matches version in meson.build
 mistletoe>=0.7.2
 mypy
-premailer
+# Premailer 3.9.0 broke the API by introducing an allow_loading_external_files
+# argument that is now mandatory, but didn't exist in previous versions.
+# To relax the constraint we either need to do a runtime detection, or switch all
+# users to a newer version.
+premailer < 3.9.0
 pyelftools
 pyftdi
 pyserial
@@ -44,4 +48,4 @@
 # Development version with OT-specific changes
 # TODO(#6694): this is temporary and should be replaced with the standard package release,
 # once the cSHAKE patches have landed upstream.
-git+https://github.com/lowRISC/pycryptodome.git@master#egg=pycryptodome >= 3.10.1
\ No newline at end of file
+git+https://github.com/lowRISC/pycryptodome.git@master#egg=pycryptodome >= 3.10.1