[ovs-build] Errored: openvswitch/ovs#7582 (branch-2.6 - de36604)

Travis CI builds at travis-ci.org
Tue Jan 15 22:59:59 UTC 2019


Build Update for openvswitch/ovs
-------------------------------------

Build: #7582
Status: Errored

Duration: 1 hr, 38 mins, and 32 secs
Commit: de36604 (branch-2.6)
Author: Ilya Maximets
Message: python: Escape backslashes while formatting logs.

Since python version 3.7 (and some 3.6+ versions) regexp engine
changed to treat the wrong escape sequences as errors. Previously,
if the replace string had something like '\u0000', '\u' was
qualified as a bad escape sequence and treated just as a sequence
of characters '\' and 'u'. But know this triggers an error:

  Traceback (most recent call last):
    File "/usr/lib/python3.7/sre_parse.py", line 1021, in parse_template
      this = chr(ESCAPES[this][1])
  KeyError: '\\u'

>From the documentation [1]:

  Unknown escapes consisting of '\' and an ASCII letter in replacement
  templates for re.sub() were deprecated in Python 3.5, and will now
  cause an error.

[1] https://docs.python.org/3/whatsnew/3.7.html#api-and-feature-removals

We need to escape the backslash by another one to keep regexp engine
from errors. In case of '\\u000', '\\' is a valid escape sequence
and the 'u' is a simple character.

To be 100% safe we need to use 're.escape(replace)', but it escapes
too many characters making the logs hard to read.

This change fixes Python 3 tests on systems with python 3.7.
Should be backward compatible.

Reported-by: Ben Pfaff <blp at ovn.org>
Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>

View the changeset: https://github.com/openvswitch/ovs/compare/5ec144799830...de36604ccf1e

View the full build log and details: https://travis-ci.org/openvswitch/ovs/builds/479993028?utm_medium=notification&utm_source=email

--

You can unsubscribe from build emails from the openvswitch/ovs repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=2143550&utm_medium=notification&utm_source=email.
Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email.
Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-build/attachments/20190115/7811aaed/attachment-0001.html>


More information about the build mailing list