Restore PyYAML 5.4.1 to avoid TypeError in webassets 0.12.1

CKAN 2.9.9 requires webassets 0.12.1, which calls yaml.load() without a Loader. This generated a warning in pyyaml 5.4.1, but raises a TypeError in 6.x.
This commit is contained in:
Daniel Ribeiro 2023-09-26 06:01:09 +00:00 committed by GitHub
parent 766a29125a
commit 63d1126c26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -60,8 +60,9 @@ COPY ./scripts/apply_ckan_patches.sh ${SRC_DIR}/apply_ckan_patches.sh
RUN cd ${SRC_DIR} && ls -lah ${SRC_DIR} && ash ${SRC_DIR}/apply_ckan_patches.sh RUN cd ${SRC_DIR} && ls -lah ${SRC_DIR} && ash ${SRC_DIR}/apply_ckan_patches.sh
RUN rm -rf /srv/app/src/ckan/.git RUN rm -rf /srv/app/src/ckan/.git
#### PATCH SINCE CYTON UPDATED TO 3.0.0 ### # Create a constraint file that limits the Cython version to a compatible one, see https://github.com/yaml/pyyaml/issues/736
RUN sed -i 's/pyyaml==5.4.1/pyyaml>=6.0.1/g' ckan/requirements.txt RUN echo 'Cython < 3.0' > /tmp/constraint.txt
RUN PIP_CONSTRAINT=/tmp/constraint.txt pip wheel --wheel-dir=/wheels PyYAML==5.4.1
# RUN pip-compile ckan/requirements.in # RUN pip-compile ckan/requirements.in
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt