-
Notifications
You must be signed in to change notification settings - Fork 613
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
Replace use_auth_token
arg by token
everywhere
#1122
Conversation
The documentation is not available anymore as the PR was closed or merged. |
Codecov ReportBase: 84.46% // Head: 84.54% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1122 +/- ##
==========================================
+ Coverage 84.46% 84.54% +0.08%
==========================================
Files 41 41
Lines 4074 4089 +15
==========================================
+ Hits 3441 3457 +16
+ Misses 633 632 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
use_auth_token
arg by token
everywhereuse_auth_token
arg by token
everywhere
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 thanks ! :)
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.
Very much like this one!
Fix #1094 (see discussion there).
This is step 1 on the long-term plan to have a single
token
argument (eitherOptional[str]
orOptional[Union[bool, str]]
) instead of eithertoken
oruse_auth_token
depending on the use case. Sinceuse_auth_token
is still widely used, we are only smoothly deprecating it by accepting it without warning while havingtoken
as the preferred (and documented) argument. After a few months and adaptations in downstream libraries, we will start a proper deprecation cycle foruse_auth_token
. At the moment, all the magic is implemented invalidate_hf_hub_args
. I hope this will not be too misleading for users.I have written the step by step plan in the
smoothly_deprecate_use_auth_token
method. I would be good to have a look at the generated documentation so that we are all aligned.This should finally be the last piece of work on tokens in
hugginface_hub
after #1064 (always send token when logged in), #1084 (send token on LFS upload), #1111 (unifiedlogin()
method) and #1116 (add token toHfApi(token=...)
. Hope that authentication will now be as smooth as possible for all users. (EDIT: I forgot #1051 about git credential store to change...).cc @adrinjalali @lhoestq @sgugger @julien-c @LysandreJik @osanseviero who contributed to the discussion on this topic.