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 1715027

Summary: backintime fails to build with Python 3.8
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: backintimeAssignee: hannes <johannes.lips>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: johannes.lips, projects.rg, rosset.filipe
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-10 12:16:59 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: 1686977    

Description Miro Hrončok 2019-05-29 12:22:20 UTC
backintime 1.2.0-5.fc31 fails to build with Python 3.8.0a4+:


=================================== FAILURES ===================================
________________________ TestBackInTime.test_quiet_mode ________________________

self = <test.test_backintime.TestBackInTime testMethod=test_quiet_mode>

    def test_quiet_mode(self):
>       self.assertEquals("", subprocess.getoutput("python3 backintime.py --quiet"))
E       AssertionError: '' != '/usr/lib64/python3.8/site-packages/dbus/c[301 chars]gnal'
E       + /usr/lib64/python3.8/site-packages/dbus/connection.py:335: SyntaxWarning: invalid escape sequence \ 
E       +   """Arrange for the given function to be called when a signal matching
E       + /usr/lib64/python3.8/site-packages/dbus/proxies.py:305: SyntaxWarning: invalid escape sequence \ 
E       +   """Arrange for the given function to be called when the given signal

test/test_backintime.py:33: AssertionError

Full logs in https://copr.fedorainfracloud.org/coprs/g/python/python3.8/build/914372/

Comment 1 Raphael Groner 2019-05-29 20:48:30 UTC
Obviously, another issue with the changed API of the subprocess module.

There's also a deprecation warning:
>   /builddir/build/BUILD/backintime-1.2.0/common/test/test_backintime.py:33: DeprecationWarning: Please use assertEqual instead.

Comment 2 Miro Hrončok 2019-05-29 23:10:24 UTC
The tests use subprocess to check something. And the test expect empty output, however there are SyntaxWarnings. This has nothing to do with the API of the subprocess module. 


There are 2 ways to fix this:

 1) fix the SyntaxWarnings in dbus/connection.py (out of scope of this package, requires coordination)

 2) change the test to call self.assertEqual("", subprocess.getoutput("python3 -W ignore::SyntaxWarning backintime.py --quiet")) (self contained)

Comment 3 Raphael Groner 2019-05-30 10:55:11 UTC
Thanks for the analysis. We should head for both proposed fixes, because:

1) the warnings can be expected to be printed also to the user while a real backup runs.

2) could be a good workaround for the test at least and can get filed as a patch to upstream.