Replace codecs.open with a simplified reimplementation
python 3.14 doesn't like codecs.open: tests/test_readers.py: 1 warning /builddir/build/BUILD/diffoscope-303-build/diffoscope-303/diffoscope/comparators/text.py:44: DeprecationWarning: codecs.open() is deprecated. Use open() instead. ) as my_content, codecs.open( ... In most scenarios, codecs.open and builtins.open are equivalent. Unfortunately, the case where the file is opened for reading, 'b' is not used in the mode, and an encoding is specified, results in a difference in behaviour: whitespace is handled differently. To avoid the warning, add a trivial reimplementation.
Loading
Please register or sign in to comment