Bug 1810313 - python-cherrypy: FTBFS in Fedora 32
Summary: python-cherrypy: FTBFS in Fedora 32
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-cherrypy
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Runge
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
: 1841688 (view as bug list)
Depends On: 1813181 1813182
Blocks: F32FTBFS F33FTBFS F33FailsToInstall PYTHON39 1841665 1842157
TreeView+ depends on / blocked
 
Reported: 2020-03-04 23:02 UTC by Elliott Sales de Andrade
Modified: 2020-06-16 01:26 UTC (History)
4 users (show)

Fixed In Version: python-cherrypy-18.4.0-4.fc33 python-cherrypy-18.4.0-4.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-05 06:24:57 UTC
Type: Bug


Attachments (Terms of Use)

Description Elliott Sales de Andrade 2020-03-04 23:02:44 UTC
Description of problem:
Package python-cherrypy fails to build from source in Fedora 32.

Version-Release number of selected component (if applicable):
18.4.0-2.fc32

Steps to Reproduce:
koji build --scratch f32 python-cherrypy-18.4.0-2.fc32.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/python-cherrypy

=================================== FAILURES ===================================
_________________________ ToolTests.testCombinedTools __________________________
self = <cherrypy.test.test_tools.ToolTests testMethod=testCombinedTools>
    def testCombinedTools(self):
        expectedResult = (ntou('Hello,world') +
                          europoundUnicode).encode('utf-8')
        zbuf = io.BytesIO()
        zfile = gzip.GzipFile(mode='wb', fileobj=zbuf, compresslevel=9)
        zfile.write(expectedResult)
        zfile.close()
    
        self.getPage('/euro',
                     headers=[
                         ('Accept-Encoding', 'gzip'),
                         ('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7')])
        self.assertInBody(zbuf.getvalue()[:3])
    
        zbuf = io.BytesIO()
        zfile = gzip.GzipFile(mode='wb', fileobj=zbuf, compresslevel=6)
        zfile.write(expectedResult)
        zfile.close()
    
        self.getPage('/decorated_euro', headers=[('Accept-Encoding', 'gzip')])
        self.assertInBody(zbuf.getvalue()[:3])
    
        # This returns a different value because gzip's priority was
        # lowered in conf, allowing the rotator to run after gzip.
        # Of course, we don't want breakage in production apps,
        # but it proves the priority was changed.
        self.getPage('/decorated_euro/subpath',
                     headers=[('Accept-Encoding', 'gzip')])
>       self.assertInBody(bytes([(x + 3) % 256 for x in zbuf.getvalue()]))
expectedResult = b'Hello,world\xc2\x80\xc2\xa3'
self       = <cherrypy.test.test_tools.ToolTests testMethod=testCombinedTools>
zbuf       = <_io.BytesIO object at 0xf59a36e0>
zfile      = <gzip on 0xf58d4b08>
cherrypy/test/test_tools.py:374: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.8/site-packages/cheroot/test/webtest.py:401: in assertInBody
    self._handlewebError(msg)
/usr/lib/python3.8/site-packages/cheroot/test/webtest.py:254: in _handlewebError
    if not self.interactive:
/usr/lib/python3.8/site-packages/cheroot/test/webtest.py:98: in __get__
    return self.fget(obj)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <cherrypy.test.test_tools.ToolTests testMethod=testCombinedTools>
    @NonDataProperty
    def interactive(self):
        """Determine whether tests are run in interactive mode.
    
        Load interactivity setting from environment, where
        the value can be numeric or a string like true or
        False or 1 or 0.
        """
        env_str = os.environ.get('WEBTEST_INTERACTIVE', 'True')
        is_interactive = bool(json.loads(env_str.lower()))
        if is_interactive:
>           warnings.warn(
                'Interactive test failure interceptor support via '
                'WEBTEST_INTERACTIVE environment variable is deprecated.',
                DeprecationWarning,
            )
E           DeprecationWarning: Interactive test failure interceptor support via WEBTEST_INTERACTIVE environment variable is deprecated.
env_str    = 'True'
is_interactive = True
self       = <cherrypy.test.test_tools.ToolTests testMethod=testCombinedTools>
/usr/lib/python3.8/site-packages/cheroot/test/webtest.py:241: DeprecationWarning
----------------------------- Captured stdout call -----------------------------
    ERROR: b'"\x8e\x0b\x03\x8c\xdeUa\x03\x02\xf6K\xd0\xcc\xcc\xda,\xd22\xcdL<\xd7sk4\x03\xe62\x9e\x8e\x12\x03\x03\x03' not in body: b'"\x8e\x0b\x03\x8c\xdeUa\x05\x02\xf6K\xd0\xcc\xcc\xda,\xd22\xcdL<\xd7sk4\x03\xe62\x9e\x8e\x12\x03\x03\x03'
------------------------------ Captured log call -------------------------------
INFO     cherrypy.access.4120167064:_cplogging.py:283 127.0.0.1 - - [23/Feb/2020:20:07:37] "GET /euro HTTP/1.1" 200 33 "" ""
INFO     cherrypy.access.4120167064:_cplogging.py:283 127.0.0.1 - - [23/Feb/2020:20:07:37] "GET /decorated_euro HTTP/1.1" 200 35 "" ""
INFO     cherrypy.access.4120167064:_cplogging.py:283 127.0.0.1 - - [23/Feb/2020:20:07:37] "GET /decorated_euro/subpath HTTP/1.1" 200 35 "" ""

Comment 1 Fedora Release Engineering 2020-03-08 04:22:20 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 32.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (that's on 2020-04-29).

A week before the mass branching of Fedora 33 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 31 will be
retired regardless of the status of this bug.

[1] https://fedoraproject.org/wiki/Updates_Policy
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-33/f-33-key-tasks.html

Comment 2 Matthias Runge 2020-03-13 07:24:12 UTC
This is missing jaraco.collections, which requires jaraco.text.

Comment 3 Miro Hrončok 2020-06-03 10:25:23 UTC
*** Bug 1841688 has been marked as a duplicate of this bug. ***

Comment 4 Miro Hrončok 2020-06-04 17:38:19 UTC
This is a DeprecationWarning treated as error. Why is it blocked on extra packages?

Comment 5 Miro Hrončok 2020-06-04 17:50:16 UTC
Ok, my bad, the deprecation warning is just a symptom.

With this:

 %check
+# https://github.com/cherrypy/cherrypy/commit/5d3c86eb36dfdf972a1d3c8d69cf8be2050eb99c
+export WEBTEST_INTERACTIVE=false
 LANG=C.utf-8 %{__python3} -m pytest --ignore=build


The failure is:

=================================== FAILURES ===================================
_________________________ ToolTests.testCombinedTools __________________________

self = <cherrypy.test.test_tools.ToolTests testMethod=testCombinedTools>

    def testCombinedTools(self):
        expectedResult = (ntou('Hello,world') +
                          europoundUnicode).encode('utf-8')
        zbuf = io.BytesIO()
        zfile = gzip.GzipFile(mode='wb', fileobj=zbuf, compresslevel=9)
        zfile.write(expectedResult)
        zfile.close()
    
        self.getPage('/euro',
                     headers=[
                         ('Accept-Encoding', 'gzip'),
                         ('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7')])
        self.assertInBody(zbuf.getvalue()[:3])
    
        zbuf = io.BytesIO()
        zfile = gzip.GzipFile(mode='wb', fileobj=zbuf, compresslevel=6)
        zfile.write(expectedResult)
        zfile.close()
    
        self.getPage('/decorated_euro', headers=[('Accept-Encoding', 'gzip')])
        self.assertInBody(zbuf.getvalue()[:3])
    
        # This returns a different value because gzip's priority was
        # lowered in conf, allowing the rotator to run after gzip.
        # Of course, we don't want breakage in production apps,
        # but it proves the priority was changed.
        self.getPage('/decorated_euro/subpath',
                     headers=[('Accept-Encoding', 'gzip')])
>       self.assertInBody(bytes([(x + 3) % 256 for x in zbuf.getvalue()]))

expectedResult = b'Hello,world\xc2\x80\xc2\xa3'
self       = <cherrypy.test.test_tools.ToolTests testMethod=testCombinedTools>
zbuf       = <_io.BytesIO object at 0x7f4291933130>
zfile      = <gzip on 0x7f429192f0a0>

cherrypy/test/test_tools.py:374: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.9/site-packages/cheroot/test/webtest.py:401: in assertInBody
    self._handlewebError(msg)
        msg        = 'b\'"\\x8e\\x0b\\x03\\x166\\xdca\\x03\\x02\\xf6K\\xd0\\xcc\\xcc\\xda,\\xd22\\xcdL<\\xd7sk4\\x03\\xe62\\x9e\\x8e\\x12\\...\\x03\\x166\\xdca\\x05\\x02\\xf6K\\xd0\\xcc\\xcc\\xda,\\xd22\\xcdL<\\xd7sk4\\x03\\xe62\\x9e\\x8e\\x12\\x03\\x03\\x03\''
        self       = <cherrypy.test.test_tools.ToolTests testMethod=testCombinedTools>
        value      = b'"\x8e\x0b\x03\x166\xdca\x03\x02\xf6K\xd0\xcc\xcc\xda,\xd22\xcdL<\xd7sk4\x03\xe62\x9e\x8e\x12\x03\x03\x03'
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cherrypy.test.test_tools.ToolTests testMethod=testCombinedTools>
msg = 'b\'"\\x8e\\x0b\\x03\\x166\\xdca\\x03\\x02\\xf6K\\xd0\\xcc\\xcc\\xda,\\xd22\\xcdL<\\xd7sk4\\x03\\xe62\\x9e\\x8e\\x12\\...\\x03\\x166\\xdca\\x05\\x02\\xf6K\\xd0\\xcc\\xcc\\xda,\\xd22\\xcdL<\\xd7sk4\\x03\\xe62\\x9e\\x8e\\x12\\x03\\x03\\x03\''

    def _handlewebError(self, msg):
        print('')
        print('    ERROR: %s' % msg)
    
        if not self.interactive:
>           raise self.failureException(msg)
E           AssertionError: b'"\x8e\x0b\x03\x166\xdca\x03\x02\xf6K\xd0\xcc\xcc\xda,\xd22\xcdL<\xd7sk4\x03\xe62\x9e\x8e\x12\x03\x03\x03' not in body: b'"\x8e\x0b\x03\x166\xdca\x05\x02\xf6K\xd0\xcc\xcc\xda,\xd22\xcdL<\xd7sk4\x03\xe62\x9e\x8e\x12\x03\x03\x03'

msg        = 'b\'"\\x8e\\x0b\\x03\\x166\\xdca\\x03\\x02\\xf6K\\xd0\\xcc\\xcc\\xda,\\xd22\\xcdL<\\xd7sk4\\x03\\xe62\\x9e\\x8e\\x12\\...\\x03\\x166\\xdca\\x05\\x02\\xf6K\\xd0\\xcc\\xcc\\xda,\\xd22\\xcdL<\\xd7sk4\\x03\\xe62\\x9e\\x8e\\x12\\x03\\x03\\x03\''
self       = <cherrypy.test.test_tools.ToolTests testMethod=testCombinedTools>

/usr/lib/python3.9/site-packages/cheroot/test/webtest.py:255: AssertionError
----------------------------- Captured stdout call -----------------------------

    ERROR: b'"\x8e\x0b\x03\x166\xdca\x03\x02\xf6K\xd0\xcc\xcc\xda,\xd22\xcdL<\xd7sk4\x03\xe62\x9e\x8e\x12\x03\x03\x03' not in body: b'"\x8e\x0b\x03\x166\xdca\x05\x02\xf6K\xd0\xcc\xcc\xda,\xd22\xcdL<\xd7sk4\x03\xe62\x9e\x8e\x12\x03\x03\x03'
------------------------------ Captured log call -------------------------------
INFO     cherrypy.access.139923886819936:_cplogging.py:283 127.0.0.1 - - [04/Jun/2020:19:44:51] "GET /euro HTTP/1.1" 200 33 "" ""
INFO     cherrypy.access.139923886819936:_cplogging.py:283 127.0.0.1 - - [04/Jun/2020:19:44:51] "GET /decorated_euro HTTP/1.1" 200 35 "" ""
INFO     cherrypy.access.139923886819936:_cplogging.py:283 127.0.0.1 - - [04/Jun/2020:19:44:51] "GET /decorated_euro/subpath HTTP/1.1" 200 35 "" ""


This was already mentioned in https://github.com/cherrypy/cherrypy/pull/1668 and it went away... no idea why.

Maybe we should skip the test for now?

Comment 6 Matthias Runge 2020-06-05 06:24:57 UTC
I was briefly looking into updating the package for f33, but that requires additional packages (linked as dependencies here). Meanwhile skipping the tests makes sense to me. I've already rebuilt rawhide, f32 is rebuilding right now.

Comment 7 Fedora Update System 2020-06-05 06:47:33 UTC
FEDORA-2020-0bbfa8b0dd has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-0bbfa8b0dd

Comment 8 Miro Hrončok 2020-06-05 08:36:25 UTC
(In reply to Matthias Runge from comment #6)
> I was briefly looking into updating the package for f33, but that requires
> additional packages (linked as dependencies here).

Ah, makes sense. I've moved the deps to bz1777494.

> Meanwhile skipping the
> tests makes sense to me. I've already rebuilt rawhide, f32 is rebuilding
> right now.

Thanks!

Comment 9 Fedora Update System 2020-06-08 01:45:46 UTC
FEDORA-2020-0bbfa8b0dd has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-0bbfa8b0dd`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-0bbfa8b0dd

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2020-06-16 01:26:13 UTC
python-cherrypy-18.4.0-4.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.


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