Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Python 3.14: compatibility issue with default lazy annotations

Aperta
#153 6 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api

Direzione di ricerca

Inizia da PR #154 e dai moduli di test interessati, quindi esamina le principali classi di esportazione degli schemi dell’SDK menzionate nell’issue. Verifica come si comportano i formati di risposta strutturati in Python 3.14 e confrontali con il workaround esistente per le annotazioni sotto forma di stringa. Il lavoro è completato quando il requisito di compatibilità è coperto in modo coerente per questi formati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Highlighting the Python 3.14 compatibility requirements:

  • base any data model classes passed to the SDK on Pydantic rather than lmstudio.BaseModel; or
  • specify from __future__ import annotations to use string annotations instead of lazy ones (since msgspec handles those)

lmstudio-python is affected by https://github.com/jcrist/msgspec/issues/847, so running on Python 3.14+ currently requires the use of from __future__ import annotations when defining structured response formats based on lmstudio.BaseModel.

The main SDK schema export classes already used string annotations to avoid forward referencing problems, so the PR adding 3.14 to CI (https://github.com/lmstudio-ai/lmstudio-python/pull/154) works around the issue by also adding from __future__ import annotations to the affected test modules.

Client applications relying on Pydantic for their data model classes won't be affected (beyond needing to update to Pydantic 2.12.0a1 or later), but those relying on lmstudio.BaseModel to define their structured response formats will currently also need to use from __future__ import annotations for their struct fields to actually get defined.

Lingua principale
Python
Stelle
881
Fork
166
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lmstudio-ai/lmstudio-python

Tutte le issue di lmstudio-ai/lmstudio-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.