Make HF_HUB_ENABLE_HF_TRANSFER deprecation warning visible to users (#4220)
* Make HF_HUB_ENABLE_HF_TRANSFER deprecation warning visible to users
- constants.py: always warn when the legacy env var is set (not only when
HF_XET_HIGH_PERFORMANCE is also set), and use FutureWarning instead of
DeprecationWarning so the message reaches end users (DeprecationWarning is
silenced by default under standard `python` execution).
- upload.md: add an explicit TIP under "Upload from the CLI" pointing users
to HF_XET_HIGH_PERFORMANCE=1 for max throughput, and noting that the
legacy HF_HUB_ENABLE_HF_TRANSFER=1 flag is no longer effective.
Closes #4219
* Restore HF_XET_HIGH_PERFORMANCE guard (Bugbot caught logic inversion)
Cursor Bugbot correctly flagged that the previous commit's guard removal
was based on inverted boolean reading. The original
`and not HF_XET_HIGH_PERFORMANCE` already fires the warning in the common
case (legacy flag set, new flag not set) and correctly suppresses it for
users who have already migrated to HF_XET_HIGH_PERFORMANCE=1 but still
have the legacy var lingering in their environment.
The real visibility fix is the DeprecationWarning -> FutureWarning change,
which is preserved. Restoring the guard avoids unnecessary warning noise
for already-migrated users.
---------
Co-authored-by: célina <hanouticelina@gmail.com>