Skip to content
New issue

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

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

Already on GitHub? # to your account

Support python=3.10 #786

Closed
adrinjalali opened this issue Mar 22, 2022 · 6 comments · Fixed by #790
Closed

Support python=3.10 #786

adrinjalali opened this issue Mar 22, 2022 · 6 comments · Fixed by #790

Comments

@adrinjalali
Copy link
Contributor

Python 3.10 has been out for a while but we seem to not test for it. What are the roadblocks for us to support 3.10 and maybe deprecate 3.6? (Many packages now support 3.8-3.10 and older versions are not supported anymore).

Ping @LysandreJik @osanseviero maybe?

@muellerzr
Copy link
Contributor

muellerzr commented Mar 22, 2022

It should just be as simple as changing python-tests.yml matrix to be 3.7 and 3.10 for the python versions, rather than 3.6 and 3.9.

Not sure if anything would break, but that'd be the spot for the CI

@osanseviero
Copy link
Contributor

If we deprecate python 3.6, things can probably simplify in some places as well cc @omarespejel and @merveenoyan

@LysandreJik
Copy link
Member

Python 3.10: Definitely, let's update the CI to use 3.10 instead.


Python 3.6: As this package is a dependency for a lot of libraries, we ought to check with the downstream libraries to see if they don't still support 3.6:

  • transformers: 3.6+, will likely drop 3.6 support over the coming weeks
  • datasets: 3.6+, @lhoestq could you comment on the upcoming support?
  • adapter-transformers: 3.6+
  • allennlp: 3.7+ ✔️
  • asteroid: 3.6+
  • espnet: 3.7+ ✔️
  • fairseq: 3.6+
  • flair: 3.6+
  • keras: 3.7+ ✔️
  • pyannote: 3.7+
  • sentence-transformers: 3.6+
  • spacy: 3.6+
  • speechbrain: 3.7+ ✔️
  • tensorflowtts: 3.7+ ✔️
  • timm: 3.6+
  • fastai: 3.6+
  • stanza: 3.6+
  • fasttext: 2.7/3.4+
  • stable-baselines3: 3.7+ ✔️
  • doctr: 3.6+

@osanseviero let me know if I have missed some!

Given that a lot of these still support 3.6, I would advocate to wait for at least 1-2 months before dropping support so as to not be the vector of change.

We also have a significant number of users (~10%) still using huggingface_hub on version 3.6:

https://pypistats.org/packages/huggingface-hub

(from https://pypistats.org/packages/huggingface-hub)

Of course, for security concerns and for simplicity we'll switch to 3.7 sooner rather than later.

@osanseviero
Copy link
Contributor

The list seems complete! Just to add, most (hopefully all) of those have a pinned huggingface_hub version, so removing 3.6 support would not be a breaking issue unless they want to upgrade.

@adrinjalali
Copy link
Contributor Author

adrinjalali commented Mar 23, 2022

I think a more relevant question would be if there is any package having dependencies on huggingface_hub which does not support 3.7, and there doesn't seem to be any?

But also as @osanseviero mentions, this doesn't change older versions and users can still install the older ones if the need py=3.6 support. They usually don't even notice the issue since pip would do that for them.

@lhoestq
Copy link
Member

lhoestq commented Mar 23, 2022

For datasets we can consider dropping support for 3.6 soon as well, since its main dependency PyArrow already stopped supporting 3.6. ~10% of datasets users have 3.6, pretty much like transformers.

(though last week we got 100k+ pip installs from 3.6 but it looks like an outlier)

image

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

Successfully merging a pull request may close this issue.

5 participants