Skip to content
Snippets Groups Projects
  1. Nov 01, 2019
  2. Oct 31, 2019
  3. Oct 30, 2019
  4. Oct 23, 2019
  5. Oct 29, 2019
  6. Oct 27, 2019
  7. Oct 30, 2019
  8. Oct 25, 2019
  9. Oct 27, 2019
  10. Oct 25, 2019
    • Denis Laxalde's avatar
      packaging: remove version info from Breaks+Replaces in Debian package · 8fda98a6
      Denis Laxalde authored
      The versioned Breaks: and Replaces: cause problem when trying to install
      our package over the one in Debian.
      
        $ sudo apt install ./packages/debian-buster/mercurial_5.2~rc0+15-buster-a2ff3aff81d2_amd64.deb
        Reading package lists... Done
        Building dependency tree
        Reading state information... Done
        Note, selecting 'mercurial' instead of './packages/debian-buster/mercurial_5.2~rc0+15-buster-a2ff3aff81d2_amd64.deb'
        Some packages could not be installed. This may mean that you have
        requested an impossible situation or if you are using the unstable
        distribution that some required packages have not yet been created
        or been moved out of Incoming.
        The following information may help to resolve the situation:
      
        The following packages have unmet dependencies:
         mercurial : Breaks: mercurial-common (< 5.2~rc0+15-buster-a2ff3aff81d2) but 5.2~rc0-1 is to be installed
        E: Unable to correct problems, you have held broken packages.
      
      Removing version information resolves the situation.
      8fda98a6
  11. Oct 24, 2019
    • Denis Laxalde's avatar
      py3: fix generated non-ascii message in test-notify.t · 90ee1f61
      Denis Laxalde authored
      The resulting "Subject:" header contains an encoded word in Python 3 so
      we have to add distinct outputs for Python 3 but underlying values are
      the same:
      
          >>> from email.header import decode_header
          >>> decode_header('=?utf-8?b?w6AuLi4=?=')
          [(b'\xc3\xa0...', 'utf-8')]
      90ee1f61
    • Denis Laxalde's avatar
      py3: decode encoding literal before passing to .decode() · 910827a2
      Denis Laxalde authored
      bytes.decode(<encoding>) wants an str as "encoding" parameter,
      it raises a TypeError if given a bytestring. encoding.encoding and
      encoding.fallbackencoding are bytes values.
      910827a2
    • Denis Laxalde's avatar
      py3: decode payload of notify email · 33506cb4
      Denis Laxalde authored
      This fixes one UnicodeEncodeError in test-notify.t:422 when testing the
      notify hook with non-ascii content (there are more later). We only
      decode on Python 3, since it's not safe for sure on Python 2.
      33506cb4
    • Denis Laxalde's avatar
    • Denis Laxalde's avatar
      py3: use stdlib's parseaddr() to get sender header in notify extension · ac33550f
      Denis Laxalde authored
      In Python 3, email headers are unicode string so using
      stringutil.email() will not work as it compares with bytestring. So
      let's use email.utils.parseaddr() from the stdlib which has a consistent
      behavior across Python versions. The same is done in patchbomb
      extension already.
      ac33550f
    • Denis Laxalde's avatar
      py3: use a BytesParser in notify extension · ef81de93
      Denis Laxalde authored
      This is the first step to make the "long line" case in test-notify.t
      pass by fixing a UnicodeDecodeError on Python 3.
      
      We alias a parsebytes() in mail module, similarly as we already have a
      parse() function for Python 2 and Python 3 compatibility.
      ef81de93
    • Denis Laxalde's avatar
      py3: fix headencode() with display=False · 7d4f2e48
      Denis Laxalde authored
      We previously called str() on a email.header.Header object. On Python 2,
      this returns a bytestring and the __str__ method is actually an alias to
      .encode() method. On Python 3, __str__ does not perform encoding (and
      returns a unicode string). To keep a consistent behavior across Python
      versions, we explicitly use .encode() and we wrap the result with
      encoding.strtolocal() to get a bytestring in all cases. As a side effect
      of forcing bytes conversion, we need to decode back in _addressencode().
      
      This is to make test-notify.t pass on Python 3.
      
      Also note that headers are now encoded in some patchbomb tests; this is
      because the charset is not always "us-ascii" ("iso-8859-1" otherwise) on
      Python 3.
      7d4f2e48
    • Denis Laxalde's avatar
      mail: catch LookupError in headdecode() · 866bd2cf
      Denis Laxalde authored
      We already catch this exception in _encode() (called by headencode()).
      It gets raised when running test-notify.t with Python 3.
      866bd2cf
    • Denis Laxalde's avatar
      py3: account for extra line break in email headers in test-notify.t · 84c15836
      Denis Laxalde authored
      Long headers appears to be wrapped with new lines. In test-notify.t, we
      have a "filter.py" that replaces "\n" by " ", so we get an extra space
      in a Message-Id with a long value.
      84c15836
Loading