Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure.Storage Python 2.6 compatibility #395

Closed
feoff3 opened this issue Jun 23, 2015 · 2 comments
Closed

Azure.Storage Python 2.6 compatibility #395

feoff3 opened this issue Jun 23, 2015 · 2 comments
Labels
Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@feoff3
Copy link

feoff3 commented Jun 23, 2015

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

@feoff3 feoff3 changed the title Python 2.6 compatibility Azure.Storage Python 2.6 compatibility Jun 23, 2015
@crwilcox crwilcox self-assigned this Jun 23, 2015
@crwilcox
Copy link
Contributor

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!

@crwilcox
Copy link
Contributor

Issue Migrated to Azure/azure-storage-python#2

@bsiegel bsiegel added the Service Attention Workflow: This issue is responsible by Azure service team. label Sep 26, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

3 participants