New submission from Michał Górny <mgo...@gentoo.org>:

xz-utils has four options to configure codecs supported by liblzma:

  --enable-encoders
  --enable-decoders
  --enable-match-finders
  --enable-checks

In Gentoo, we're using those options to optionally provide smaller footprint 
liblzma builds that include only the standard set of codecs used by .xz 
archives (i.e. that work with any archive created by xz/lzma without expert 
options used).  However, it seems that the CPython test suite wrongly presumes 
that all codecs are always available and it fails on LZMAErrors when those are 
not present.

I'm attaching the verbose output of test_lzma.

I think the best solution here would be to catch LZMAError and skipTest() if 
it's LZMA_OPTIONS_ERROR.  I think this would be best done by exposing the 
underlying error code in LZMAError exception (rather than string-matching, 
though the latter would also work).

----------
components: Tests
files: lzma-test.txt
messages: 326960
nosy: mgorny
priority: normal
severity: normal
status: open
title: test_lzma: Multiple test failures when liblzma is built without complete 
codec set
type: enhancement
versions: Python 3.8
Added file: https://bugs.python.org/file47845/lzma-test.txt

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34883>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to