[ovs-build] Passed: ovsrobot/ovs#205 (series_86195 - 132a222)

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


Build Update for ovsrobot/ovs
-------------------------------------

Build: #205
Status: Passed

Duration: 58 mins and 1 sec
Commit: 132a222 (series_86195)
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: 0-day Robot <robot at bytheb.org>

View the changeset: https://github.com/ovsrobot/ovs/commit/132a22287138

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

--

You can unsubscribe from build emails from the ovsrobot/ovs repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=22285853&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/286bc1bd/attachment-0001.html>


More information about the build mailing list