fix(imp): add compatibility module for imp deprecation

This commit is contained in:
Luke Tainton 2024-11-28 21:56:59 +00:00
parent ddb81a203a
commit 43366e3c77
2 changed files with 7 additions and 1 deletions

View File

@ -3,9 +3,11 @@ LABEL maintainer="Luke Tainton <luke@tainton.uk>"
LABEL org.opencontainers.image.source="https://github.com/luketainton/webexmemebot" LABEL org.opencontainers.image.source="https://github.com/luketainton/webexmemebot"
USER root USER root
ENV PYTHONPATH="/run:/usr/local/lib/python3.11/lib-dynload:/usr/local/lib/python3.11/site-packages:/usr/local/lib/python3.11" ENV PYTHONPATH="/run:/usr/local/lib/python3.13/lib-dynload:/usr/local/lib/python3.13/site-packages:/usr/local/lib/python3.13"
WORKDIR /run WORKDIR /run
COPY imp.py /run/imp.py
RUN mkdir -p /.local && \ RUN mkdir -p /.local && \
chmod -R 777 /.local && \ chmod -R 777 /.local && \
pip install -U pip poetry pip install -U pip poetry

4
imp.py Normal file
View File

@ -0,0 +1,4 @@
"""Compatibility module that imports all symbols from the importlib module.
and exposes them as imp."""
from importlib import *