Bug 1320685

Summary: RHEL 6.8 runs with python26 -- This breaks swift clients.
Product: Red Hat Ceph Storage Reporter: Warren <wusui>
Component: RGWAssignee: Yehuda Sadeh <yehuda>
Status: CLOSED NOTABUG QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.2.3CC: cbodley, ceph-eng-bugs, kbader, mbenjamin, owasserm, sweil
Target Milestone: rc   
Target Release: 2.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Warren 2016-03-23 17:42:08 UTC
Description of problem:
   On RHEL 6.8, Swift runs python26.  A dictionary comprehension reports a syntax
error that does not occur on python 2.7


Version-Release number of selected component (if applicable):
RHEL 6.8

How reproducible:
100% of the time.

Steps to Reproduce:
swift -A http://10.8.128.76/auth/1.0 -u testuser:swift -K 'N/wGw1h7SY5EdTrIH4P4V4DeeDyW36yJ7NCI6HLH'  list



Actual results:
Traceback (most recent call last):
   .
   .
   .
  File "/usr/lib/python2.6/site-packages/swiftclient/client.py", line 136
    return {key: safe_value(key, val) for (key, val) in headers}
                                        ^
SyntaxError: invalid syntax

Expected results:
a list of buckets

Additional info:
I changed the dictionary comprehension to an external for loop and the problem went away.   I think that the best thing here is for swift to run python 2.7

Comment 2 Warren 2016-03-23 17:44:21 UTC
This is also true for RHEL 6.6 and 6.7

Comment 3 Warren 2016-03-23 18:06:14 UTC
Whoops. entered this twice.

Comment 4 Warren 2016-03-23 18:06:14 UTC
Whoops. entered this twice.

Comment 5 Warren 2016-03-23 18:06:29 UTC
Whoops. entered this twice.