ovh / python-ovh

Thin wrapper around OVH's APIs. Handles all the hard work including credential creation and requests signing.
https://pypi.org/project/ovh/
Other
278 stars 76 forks source link

fix python 3.10 compatibility #108

Closed lalmeras closed 2 years ago

lalmeras commented 2 years ago

This is an alternate proposal to handle python 3.10 compatibility. It implements my proposal done on #106 to drop vendored requests as it seems to me that an updated requests library is a better way to fix an pyopenssl pooling issue.

Fix the python 3.10 issue:

envs/py3/lib/python3.10/site-packages/ovh/client.py:49: in <module>
    from .vendor.requests import request, Session
envs/py3/lib/python3.10/site-packages/ovh/vendor/requests/__init__.py:58: in <module>
    from . import utils
envs/py3/lib/python3.10/site-packages/ovh/vendor/requests/utils.py:30: in <module>
    from .cookies import RequestsCookieJar, cookiejar_from_dict
envs/py3/lib/python3.10/site-packages/ovh/vendor/requests/cookies.py:164: in <module>
    class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
E   AttributeError: module 'collections' has no attribute 'MutableMapping'
BastianZim commented 2 years ago

Hi @rbeuque74 apologies for pinging you directly but since you're one of the maintainers here, I wanted to ask if there is any progress with this PR?

I'm currently in the progress of adding ovh to conda-forge and the vendored requests is making this quite difficult. Additionally, it is missing some bug fixes that are available in newer versions so it would be great if this could be merged?

BastianZim commented 2 years ago

@rbeuque74 @geoffreybauduin Gentle ping again

BastianZim commented 2 years ago

Thanks @geoffreybauduin If you have the necessary rights, would you mind merging this and making a new release?

geoffreybauduin commented 2 years ago

@BastianZim while I would be happy to move forward and help you fix this issue, you are now in the hands of @rbeuque74 to move forward. I'll contact him and see how we can set this up in the near future.

BastianZim commented 2 years ago

Great, thank you!

geoffreybauduin commented 2 years ago

We are currently adapting our CI pipeline, since this repository was still using travis-ci.org, in order to be able to push a new version to pypi.

Once it is setup we will move forward. Sorry for the delay

rbeuque74 commented 2 years ago

Setup of the CI pipeline took longer as expected, as we stumble upon a lot of incompatibilities due to build libraries not compatible anymore with Python 2.7, 3.4 and 3.5. Therefore, I released a v0.6.0 version, that doesn't include Python 3.10 compatibility. Python 3.10 will come with v1.0.0 that will drop compatibility to Python 2.7, 3.4, 3.5.

rbeuque74 commented 2 years ago

Thanks for your contribution btw :1st_place_medal: