Bug#898022: diffoscope: Traceback when comparing paths with invalid unicode characters

2018-05-10 Thread Mattia Rizzolo
Control: clone -1 -2 Control: tag -2 - patch Control: severity -2 wishlist Control: retitle -2 diffoscope: should handle the filenames as bytes On Thu, May 10, 2018 at 06:01:50PM +0200, Mattia Rizzolo wrote: > I believe that, like that bug is showing, we should just specify > type=os.fsencode

Bug#898022: diffoscope: Traceback when comparing paths with invalid unicode characters

2018-05-10 Thread Chris Lamb
Hi Mattia, > That was my initial idea as well, but apparently the Python developers > are of different opinion. Check out the PEP I linked in my previous > email: https://www.python.org/dev/peps/pep-0383/ Ah, thanks I merely skimmed this one and not the the issue. Hey, the Python developers coul

Bug#898022: diffoscope: Traceback when comparing paths with invalid unicode characters

2018-05-10 Thread Mattia Rizzolo
On Thu, May 10, 2018 at 04:43:37PM +0100, Chris Lamb wrote: > > Do you think this would be fine? > > Whilst this works, would it not be better if we could use bytes for > filenames throughout? I mean, AIUI there is no assumption that > filesystems need to have any form of valid encoding whatsoever

Bug#898022: diffoscope: Traceback when comparing paths with invalid unicode characters

2018-05-10 Thread Chris Lamb
Hi Mattia, > That's because argparse decodes the arguments Ahh! Nice spot. > Do you think this would be fine? Whilst this works, would it not be better if we could use bytes for filenames throughout? I mean, AIUI there is no assumption that filesystems need to have any form of valid encoding wh

Bug#898022: diffoscope: Traceback when comparing paths with invalid unicode characters

2018-05-10 Thread Mattia Rizzolo
Control: tag -1 patch On Sun, May 06, 2018 at 01:38:58AM +0100, Chris Lamb wrote: > This is via , but I > think the bug is in diffoscope itself. It is, although one could say it's a bug in argparse. > However, I can't seem to minimally reproduce

Bug#898022: diffoscope: Traceback when comparing paths with invalid unicode characters

2018-05-05 Thread Chris Lamb
Package: diffoscope Version: 93 Severity: important Hi, This is via , but I think the bug is in diffoscope itself. So, given the following test: import os import pytest import subprocess def test_invalid_filename(capsys, tmpdir):