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

should specify the compatible version of 'requests' package #889

Closed
gossion opened this issue Nov 17, 2016 · 5 comments
Closed

should specify the compatible version of 'requests' package #889

gossion opened this issue Nov 17, 2016 · 5 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Packaging

Comments

@gossion
Copy link
Member

gossion commented Nov 17, 2016

pip package of 'reqeusts' has latest verion 2.12.1 released, which will be installed by pip install azure, but I got an error in my environment like this:

Traceback (most recent call last):
  File "setup_env.py", line 197, in <module>
    main()
  File "setup_env.py", line 188, in main
    prepare_storage(settings)
  File "setup_env.py", line 23, in prepare_storage
    blob_service.create_container('bosh')
  File "/usr/local/lib/python2.7/dist-packages/azure/storage/blob/baseblobservice.py", line 543, in create_container
    self._perform_request(request)
  File "/usr/local/lib/python2.7/dist-packages/azure/storage/storageclient.py", line 137, in _perform_request
    raise AzureException('{}: {}'.format(ex.__class__.__name__, ex.args[0]))
azure.common.AzureException: AttributeError: 'X509' object has no attribute '_x509'  

By changing to 'reqeuests' v2.11.1, the error is gone. So my conclusion is that requests v2.12.1 is not compatible with azure sdk.
From requirements.txt, it requires 'requests' but it should also specified a compatible version of it there.

@lmazuel
Copy link
Member

lmazuel commented Nov 17, 2016

Hi @gossion
Thanks for your feedback! You stacktrace is from the azure-storage package, which is managed by the Storage team directly (not the general Python team). Could you create your issue on the storage tracker here? https://github.com/Azure/azure-storage-python. Only them can fix their part. Please cite this issue as well.

I will check all the SDK hosted here, and keep your issue opened till I confirm (or not) that everything is working for the packages we manage.

@lmazuel lmazuel added bug This issue requires a change to an existing behavior in the product in order to be resolved. Packaging labels Nov 17, 2016
@lmazuel
Copy link
Member

lmazuel commented Nov 17, 2016

Seems to be a requests problem: https://github.com/kennethreitz/requests/issues/3701

@gossion
Copy link
Member Author

gossion commented Nov 18, 2016

Hi @lmazuel
Thanks for reply. Yes, the traceback is from azure-storage, but requests and azure-storage packages are installed by pip install azure.

From this requirements.txt file, I do see that requests does not have a compatible version defined. I am not sure if this requirements.txt is used for dependency check when installing azure sdk, or it it just a document file for user review? if it is used for dependency check, I think it is better to restrict a compatible version here, like:

futures
python-dateutil
requests>=VERSION1, <2.12.1
vcrpy
coverage
pyopenssl
msrest>=0.4.0,<0.5.0
msrestazure>=0.4.0,<0.5.0

@lmazuel
Copy link
Member

lmazuel commented Nov 18, 2016

Hi @gossion
Actually, the requirements.txt at the root is using for general testing only. We started to rename these files to dev_requirements.txt. The azure meta-package itself does not requires external dependencies. In your situation, you use the install_requires from storage. To be fair, the install_requires of the first real package installed by the azure, this will depends on the platform, python version and so on.
That being said, there is no compatibility issue with requests (we still use the same major version number). It's a bug introduced in requests that will be fixed soon for sure. You can freeze, in your application, requests in the meantime, like the Azure CLI did.
Hope this helps,
Thanks,

@gossion
Copy link
Member Author

gossion commented Nov 21, 2016

Thans @lmazuel for clarification. I already have a workaround in my application.
Since there is no need to change for this SDK, I will close this issue.

@gossion gossion closed this as completed Nov 21, 2016
@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
bug This issue requires a change to an existing behavior in the product in order to be resolved. Packaging
Projects
None yet
Development

No branches or pull requests

2 participants