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

Remove dependency on future #9

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Conversation

apmorton
Copy link
Contributor

from past.builtins import basestring causes DeprecationWarning
PythonCharmers/python-future#551

I believe this alternative using six should behave identically.

On python3 past.builtins.basestring is equivalent to (bytes, str):
https://github.com/PythonCharmers/python-future/blob/80523f383fbba1c6de0551e19d0277e73e69573c/src/past/types/basestring.py#L26

On python2, it is the built in basestring:
https://github.com/PythonCharmers/python-future/blob/80523f383fbba1c6de0551e19d0277e73e69573c/src/past/builtins/__init__.py#L52

six.string_types is either (basestring, ) or (str, ):
https://six.readthedocs.io/#six.string_types

six.binary_type is either str or bytes:
https://six.readthedocs.io/#six.binary_type

@apmorton
Copy link
Contributor Author

apmorton commented Aug 8, 2023

@dariosky can anyone look at this please?

@dariosky
Copy link
Contributor

Hi @apmorton, thank you for your patience.
The team will check and let you know as soon as possible.

@apmorton
Copy link
Contributor Author

Anybody? It's been a year now...

@joserc87 @dariosky

@joserc87
Copy link
Contributor

Hi @apmorton, sorry for the delay. I've had a look and the changes seem ok, except for one example where we still require "future" (from concurrent.futures.thread import ThreadPoolExecutor in ravenpack_annotations_batch.py). I added a note in that example saying that we require either python 3.2+, or if someone is still using 2.7, they can install the futures package to run the example.
Merging

@joserc87 joserc87 merged commit 1fc8594 into RavenPack:master Oct 30, 2023
@apmorton
Copy link
Contributor Author

apmorton commented Nov 1, 2023

Great, thanks!

Any ETA on publishing a new version with these fixes to pypi?

@joserc87
Copy link
Contributor

joserc87 commented Nov 2, 2023

Most likely, in a few days

@joserc87
Copy link
Contributor

joserc87 commented Nov 3, 2023

It's now part of release https://github.com/RavenPack/python-api/releases/tag/v1.1.1. Feel free to do a pip install --upgrade ravenpackapi or poetry or however you manage the dependencies :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants