Support for lzma in python
Summary
lzma
module support not compiled into python runtime
Steps to reproduce
import lzma
in your python file or
$ docker run --rm -it registry1.dso.mil/ironbank/opensource/python/python39 python -c 'import lzma'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.9/lzma.py", line 27, in <module>
from _lzma import *
ModuleNotFoundError: No module named '_lzma'
What is the current bug behavior?
Throws ModuleNotFoundError
What is the expected correct behavior?
module should be imported
Relevant logs and/or screenshots
First discovered it when running my app and saw this in the logs:
/app/.venv/lib/python3.9/site-packages/pandas/compat/__init__.py:97: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
Possible fixes
I tried to fork so I could create a pull request, but I don't seem to have permissions to even fork the project. Here is a diff that will resolve the problem.
diff --git a/Dockerfile b/Dockerfile
index 6362cf2..3dde792 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,7 +13,8 @@ RUN dnf upgrade -y --nodocs && \
libuuid-devel \
make \
openssl-devel \
- sqlite-devel && \
+ sqlite-devel \
+ xz-devel && \
dnf clean all && \
rm -rf /var/cache/dnf
Defintion of Done
-
Bug has been identified and corrected within the container
Edited by sean.melissari