Package: python-debian Severity: minor X-Debbugs-Cc: ni...@thykier.net
Found this crash while debugging an issue in `debputy`.Applying this patch causes the test suite to fail with an unexpected ValueError (it can also be triggered by any program that uses the UPLOADERS interpretation).
Filing this so it is known (I do not have a fix right now). Best regards, Niels
diff --git a/src/debian/_deb822_repro/parsing.py b/src/debian/_deb822_repro/parsing.py index 24d1c90..51829bb 100644 --- a/src/debian/_deb822_repro/parsing.py +++ b/src/debian/_deb822_repro/parsing.py @@ -879,7 +879,7 @@ def _parse_uploaders_list_value(token, buffered_iterator): # type: (Deb822Token, BufferingIterator[Deb822Token]) -> Deb822ParsedValueElement # This is similar to _parse_comma_list_value *except* that there is an extra special - # case. Namely comma only counts as a true separator if it follows ">" + # case. Namely, comma only counts as a true separator if it follows ">" value_parts = [token] comma_offset = -1 # type: Optional[int] while comma_offset is not None: diff --git a/tests/test_repro_deb822.py b/tests/test_repro_deb822.py index 00e53b5..1a2c2ec 100644 --- a/tests/test_repro_deb822.py +++ b/tests/test_repro_deb822.py @@ -1270,7 +1270,8 @@ class TestFormatPreservingDeb822Parser: , Margrete, II, Queen # We could list additional names here - <2...@margrete.dk> + <2...@margrete.dk>, + Whops I have no email, ''') deb822_file = parse_deb822_file(original.splitlines(keepends=True)) source_paragraph = next(iter(deb822_file)) @@ -1354,12 +1355,14 @@ class TestFormatPreservingDeb822Parser: "Someone <nob...@example.org>", "Margrete, I, Ruler <1...@margrete.dk>", "Margrete, II, Queen\n <2...@margrete.dk>", + "Whops I have no email", ] assert list(uploaders_list_with_comments) == [ "Someone <nob...@example.org>", "Margrete, I, Ruler <1...@margrete.dk>", "Margrete, II, Queen\n# We could list additional names here\n <2...@margrete.dk>", + "Whops I have no email", ] # Interpretation must not change the content
OpenPGP_signature.asc
Description: OpenPGP digital signature
-- https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-python-debian-maint