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 - backintime fails to build with Python 3.8
Summary: backintime fails to build with Python 3.8
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: backintime
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: hannes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-05-29 12:22 UTC by Miro Hrončok
Modified: 2019-07-10 12:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-10 12:16:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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