-
Notifications
You must be signed in to change notification settings - Fork 242
Description
Description:
Hi there,
If 2.6 supported? The thing is CentOS features this one python version out-of-box.
We make an installable software for Linux. We use it to communicate with azure prior installing anything on the server.
At the moment, a run of our code produces whenever we do 'import azure.storage':
File "/usr/lib/python2.6/site-packages/azure/storage/init.py", line 1197
name.lower() : value for name, value in request.headers if value
SyntaxError: invalid syntax
Is there any means to fix that one incompatibility?
Thanks,
Vlad
Original Issue: Azure/azure-sdk-for-python#395
Comments (1):
@crwilcox commented on 2015-06-24 00:18:12:
The issue is that Python 2.6 does not support dictionary comprehensions.
We don't officially support 2.6 and don't make changes to address issues in 2.6. That being said, this one is rather simple. I would have little issue taking a pull request that addresses this
The way to fix this is to remove the dict comp and replace it with dict().
{
name.lower() : value for name, value in request.headers if value
}to
dict((name.lower(), value) for name, value in request.headers if value)Again, you are welcome to patch this on your own or submit a pull request for us to take.
Thanks!