Anurag-S1ngh opened a new pull request, #77089:
URL: https://github.com/apache/airflow/pull/77089

   ## Summary
   Adds native async variants of the Hub metadata calls to the Hugging Face 
hook, so they can be used from async tasks and triggers without blocking the 
event loop.
   
   ## Changes
   - New `async def aget_dataset_info()` and `async def 
afind_commit_by_marker()` mirroring the sync methods, returning the same types 
(`DatasetInfo`, `GitCommitInfo`)
   - Token resolution for async contexts via `get_async_connection` from 
common.compat; ambient fallback and explicit-connection error semantics match 
`get_token()`
   - Shared `_marker_matches()` helper used by both sync and async 
`find_commit_by_marker()`
   - Only Hub REST calls are used (`dataset_info`, `refs`, `commits`); 
`load_dataset`/`push_to_hub` stay sync
   
   ## Testing
   - `uv run --project providers/huggingface pytest 
providers/huggingface/tests/unit/huggingface/hooks/test_huggingface.py -q` (23 
passed)
   - `prek run ruff --files ...` and `prek run ruff-format --files ...` pass
   
   Closes #76470


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to