-
Notifications
You must be signed in to change notification settings - Fork 31.4k
🚨 Bump to Python 3.10 and rework how we check 3rd-party libraries existence #41268
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
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
ydshieh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
Let's wait python 3.9 reaches EOL and merge.
(or if v5 is released before that date, we can also drop the support of 3.9 at the same day)
|
Yeah, the exact date was not super clear to me @ydshieh 🥲, do you have more infos from experience? Official website only says October, without a given day, so I guess it's already EOL? Or at the end of the month? (but very unlikely they would have a last release in the last month anyway I guess) |
No. From previous python versions, it is definitely not something predictable (i.e. not always the end of the month): |
ArthurZucker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure lru cache is required no?
|
Not strictly required, but as the output of those functions cannot change anyway, it's an easy and nice way to cache the result without having to define 10k global variables as was done previously. About one third/half of them had it previously already |
|
Merging as we released last v4 version already! |
|
(note that |
|
Indeed, I forgot it! It was fixed in #41410 already, thanks for checking-in! |
…stence (huggingface#41268) * cleanup * add check * fix * remove all global variables * fix * add lru caches everywhere * fix * fix * style * improve * reorder all functions * fix order * improve * fix * fix * fix
What does this PR do?
Python 3.9 is officially EOL starting this month, so let's bump it! Took the opportunity of the new features available in 3.10 to simplify quite a bit our library checks
Note that it is breaking BC a bit as I removed some old and unused library checks that were public members