Bug#997857: python-debian 0.1.42 broken with Python 3.5/3.6

Stuart Prescott stuart at debian.org
Tue Nov 2 14:18:27 GMT 2021


Thanks again Evgeni.

Looking at the problem and contemplating how we might address this, it is, of 
course, quite simple to protect touching T.__doc__.

The test output for debfile.py / test_debfile.py shows there are many uses of 
pathlib.Path that don't work until Python 3.6 (in particular, builtin open and 
os.path functions). This can be addressed by sprinkling 15ish str() calls 
through the code. 

The output of shutil.make_archive also appears to not be reproducible in 
Python 3.6 meaning that another test needs tweaking to not assume a file order 
within the control.tar.gz file.

After these three sets of changes, the test suite passes with Python 3.5 from 
stretch (at least for the non-RTS parser code: 

python3 -m pytest --doctest-modules --verbose lib/ \
 --ignore lib/debian/tests/test_repro_deb822.py \
 --ignore lib/debian/_deb822_repro/

Given how simple these changes are, it is probably worth making them.

-- 
Stuart Prescott    http://www.nanonanonano.net/   stuart at nanonanonano.net
Debian Developer   http://www.debian.org/         stuart at debian.org
GPG fingerprint    90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7



More information about the pkg-python-debian-maint mailing list