Project

General

Profile

Actions

Bug #5694

closed

test_cli uses python 2.7+ constructs

Added by Pauline Middelink almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
ceph-deploy
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The earlier bugs on this subject, although marked Resolved, did not fix the issue. When I build an rpm under RHEL6/C6, I still get the dreaded ===
python setup.py bdist_rpm
[...]
byte-compiling /root/ceph-deploy/build/bdist.linux-x86_64/rpm/BUILDROOT/ceph-deploy-1.1-1.x86_64/usr/lib/python2.6/site-packages/ceph_deploy/forgetkeys.py to forgetkeys.pyc
writing byte-compilation script '/tmp/tmpFZJ9nq.py'
/usr/bin/python -O /tmp/tmpFZJ9nq.py
SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/ceph_deploy/tests/test_cli.py', 26, 26, ' assert {p.basename for p in tmpdir.listdir()} set()\n'))
=
A possible fix would be to replace the set comphrension with the list comphrension, as the result is just tested against the empty set/list. (C6 uses python 2.6.6, set comprehensions were introduced in python 2.7+)

Also mentioned in one of the earlier bugreports, the intend was to not distribute the tests at all. Attached is a diff which fixes both issues.


Files

t.diff (1.14 KB) t.diff Pauline Middelink, 07/20/2013 03:13 AM
Actions

Also available in: Atom PDF