Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1693029 - tornado FTBFS with Python 3.8: SyntaxError: invalid escape sequence
Summary: tornado FTBFS with Python 3.8: SyntaxError: invalid escape sequence
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-tornado
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-03-27 00:35 UTC by Miro Hrončok
Modified: 2019-04-03 12:15 UTC (History)
5 users (show)

Fixed In Version: python-tornado-5.1.1-1.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-03 12:15:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2019-03-27 00:35:53 UTC
Description of problem:
Invalid escape sequences are now SyntaxWarning in python 3.8:

$ python3.8
>>> '\d'
<stdin>:1: SyntaxWarning: invalid escape sequence \d
'\\d'

The test suite of tornado turns this into a SyntaxError:

+ /usr/bin/python3 -m tornado.test.runtests --verbose
/builddir/build/BUILD/tornado-5.0.2/tornado/util.py:255: SyntaxWarning: invalid escape sequence \d
...
SyntaxError: invalid escape sequence \.


Version-Release number: 5.0.2-5.fc31

Comment 1 Miro Hrončok 2019-03-27 00:36:49 UTC
The bytecompilation gives idea where the problem is:

+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 0
Bytecompiling .py files below /builddir/build/BUILDROOT/python-tornado-5.0.2-5.fc31.x86_64/usr/lib/debug/usr/lib64/python3.8 using /usr/bin/python3.8
Bytecompiling .py files below /builddir/build/BUILDROOT/python-tornado-5.0.2-5.fc31.x86_64/usr/lib/debug/usr/lib64/python2.7 using /usr/bin/python2.7
Bytecompiling .py files below /builddir/build/BUILDROOT/python-tornado-5.0.2-5.fc31.x86_64/usr/lib64/python2.7 using /usr/bin/python2.7
Bytecompiling .py files below /builddir/build/BUILDROOT/python-tornado-5.0.2-5.fc31.x86_64/usr/lib64/python3.8 using /usr/bin/python3.8
/usr/lib64/python3.8/web_test.py:365: SyntaxWarning: invalid escape sequence \?
/usr/lib64/python3.8/util.py:255: SyntaxWarning: invalid escape sequence \d
/usr/lib64/python3.8/web.py:1834: SyntaxWarning: invalid escape sequence \.
/usr/lib64/python3.8/web_test.py:365: SyntaxWarning: invalid escape sequence \?
/usr/lib64/python3.8/util.py:255: SyntaxWarning: invalid escape sequence \d
/usr/lib64/python3.8/web.py:1834: SyntaxWarning: invalid escape sequence \.

Comment 2 Miro Hrončok 2019-03-27 00:54:51 UTC
The fix is part of this upstream commit: https://github.com/tornadoweb/tornado/commit/6dceb64ed27c1d48af22142f2ebae946f0e85e95

Comment 3 Miro Hrončok 2019-03-27 09:43:51 UTC
Ok, that is not the only failure:

======================================================================
FAIL: test_inline_read_error (tornado.test.iostream_test.TestIOStreamSSL)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tornado/testing.py", line 124, in __call__
    result = self.orig_method(*args, **kwargs)
  File "tornado/test/iostream_test.py", line 931, in test_inline_read_error
    server.read_bytes(1, lambda data: None)
AssertionError: error not raised

======================================================================
FAIL: test_inline_read_error (tornado.test.iostream_test.TestIOStreamSSLContext)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tornado/testing.py", line 124, in __call__
    result = self.orig_method(*args, **kwargs)
  File "tornado/test/iostream_test.py", line 931, in test_inline_read_error
    server.read_bytes(1, lambda data: None)
AssertionError: error not raised

----------------------------------------------------------------------
Ran 1493 tests in 18.546s


Note You need to log in before you can comment on or make changes to this bug.