Bug 1589990

Summary: bodhi FTBFS on Python 3.7
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: bodhiAssignee: Randy Barlow <rbarlow>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: jeremy, lewk, rbarlow
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: bodhi-3.8.1-1.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-12 19:29:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1565020    

Description Miro Hrončok 2018-06-11 19:15:23 UTC
Description of problem: bodhi FTBFS on Python 3.7, it uses async as name (it's a keyword now)


Version-Release number of selected component (if applicable): 3.8.0-1.fc29


File "/usr/lib/python3.7/site-packages/bodhi/server/util.py", line 1003
  sync, async = [], []
            ^
SyntaxError: invalid syntax

https://docs.python.org/3.7/whatsnew/3.7.html

Please rename the thing ASAP.

Comment 1 Miro Hrončok 2018-06-11 19:21:48 UTC
https://github.com/fedora-infra/bodhi/pull/2436

Comment 2 Miro Hrončok 2018-06-11 20:19:19 UTC
Note that even with my patch, there are test failures: https://copr.fedorainfracloud.org/coprs/g/python/python3.7/build/765569/

Comment 3 Randy Barlow 2018-06-11 20:29:34 UTC
Strange, so it seems that the trailing commas in the calls to two exceptions are the cause of failure. For example,

E   AssertionError: Expected call: warn('"recipient refused" for \'lana\', SMTPRecipientsRefused(\'nooope!\',)')
E   Actual call: warn('"recipient refused" for \'lana\', SMTPRecipientsRefused(\'nooope!\')')

Comment 4 Randy Barlow 2018-06-11 20:33:24 UTC
I filed https://github.com/fedora-infra/bodhi/issues/2438 about the two other tests.

Comment 5 Miro Hrončok 2018-06-12 10:00:22 UTC
I successfully built the package with:

.test-virtualenv-3/bin/python3 /usr/bin/py.test-3 -k "not test_exception and not test_recipients_refused"

Should I send a PR or would you rather get this fixed properly before that?

Comment 6 Randy Barlow 2018-06-12 15:56:29 UTC
I'm working on a 3.8.1 release upstream that'll include both of your patches. Thanks!