google / google/adk-python

Make ADK Free Threaded Compatible

Aperta
#4,269 1 commento 0 reazioni 1 assegnatario Rivendicata da @wyf7107 Vedi su GitHub
core needs review
Lingua principale
Python
Stelle
21.5k
Fork
4k
Merge medio
1g 14h
PR unite (30g)
37

Descrizione

## 🔴 Required Information
*Please ensure all items in this section are completed to allow for efficient
triaging. Requests without complete information may be rejected / deprioritized.
If an item is not applicable to you - please mark it as N/A*

### Is your feature request related to a specific problem?

It's not about a specific problem but about an improvement coming from the newer Python versions (3.14+).

### Describe the Solution You'd Like

As of Python version 3.14 the _Free GIL_ is considered stable but not enforced, we still have 3.14 with GIL. People will tend to use the Free GIL given the benefits of not having one thread running at once and it's important to support that behavior, as __maybe__ ADK itself does not handle anything than `asyncio` is still required to check if there's a potential area of lacking support for when the user uses threads.

An clear example is people serving ADK flows through FastAPI/Uvicorn that might be supporting Free GIL but as this library does not is fully compatible they won't be able to extract the benefits upstream.

### Impact on your work

_How does this feature impact your work and what are you trying to achieve?
If this is critical for you, tell us if there is a timeline by when you need
this feature._

It's not impacting my work right now but it could impact in the near future regarding developer experience as it'll "lock" developers choices.

### Willingness to contribute
Are you interested in implementing this feature yourself or submitting a PR?
(Yes/No)

Yes

---

## 🟡 Recommended Information

### Describe Alternatives You've Considered
_A clear and concise description of any alternative solutions or workarounds
you've considered and why they didn't work for you._

N/A

### Proposed API / Implementation
_If you have ideas on how this should look in code, please share a
pseudo-code example._

N/A

### Additional Context

- [Python support for free threading](https://docs.python.org/3/howto/free-threading-python.html)
- [Python Free-Threading Guide](https://py-free-threading.github.io)
- [Understanding the Global Interpreter Lock (GIL) and its Impact on Multithreaded Python Programs](https://github.com/facebookincubator/ft_utils/blob/main/docs/ft_worked_examples.md)

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.