`tkinter.ttk.Progressbar` stubs are outdated for Tk 9.0
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 75/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- developer-experience
Línea de trabajo
Empieza en stdlib/tkinter/ttk.pyi alrededor de las líneas 803-836 donde vive la firma explícita Progressbar.__init__. Compárala con la página manual de Tk 9.0 ttk_progressbar enlazada en el issue, añade parámetros solo por palabra clave para las nuevas opciones de texto (text, anchor, font, foreground, justify, wraplength) y elimina las opciones que Tk 9.0 eliminó. Comprueba cómo las stubs vecinas limitan por versión las opciones específicas de Tk, ya que sys.version_info puede no reflejar la versión de Tk enlazada, y ejecuta el typeshed check script en el archivo cuando termines.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
NOTE: The detail of the issue is raised and verified by human, but these text are drafted with the assistance of AI, since my English is poor.
Description
Tk 9.0 added native text display support to ttk::progressbar, but the current
typeshed stub for tkinter.ttk.Progressbar does not reflect the Tk 9.0 option
set.
According to the Tk 9.0 ttk_progressbar manual page:
https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_progressbar.html
Tk 9.0 ttk::progressbar supports text-related options such as:
-anchor-font-foreground-justify-text-wraplength
These options did not exist in Tk 8.6 and earlier. Tk 9.0 also removes support
for some options that were accepted by earlier versions, so the stub currently
does not match either the new or the removed parts of the Tk 9.0 option set.
The relevant typeshed file is:
https://github.com/python/typeshed/blob/main/stdlib/tkinter/ttk.pyi#L803-L836
Example
With Python 3.14.9 and Tk 9.0.4, the following is valid:
from tkinter import ttk
bar = ttk.Progressbar(
text="Loading",
anchor="center",
font=("TkDefaultFont", 10),
) # make a progressbar with a text of "Loading" packed in the center of widget
bar.configure(text="Done")
However, the explicit Progressbar.__init__ signature in typeshed does not
include text, anchor, font, foreground, justify, or wraplength.
Depending on the current fallback signature, this may be accepted through
**kw: Any, but the options are still not modeled explicitly, so IDE
completion and typed usage are outdated. If some options are no longer valid
in Tk 9.0, the stub may also continue to advertise options that now fail at
runtime.
Requested change
Please update tkinter.ttk.Progressbar to match the Tk 9.0 option set, at
least by adding explicit keyword-only parameters for the new text-related
options to Progressbar.__init__ and, where appropriate, to
configure/config.
One open question is version gating: tkinter can be built against different
Tk versions, so keying this only on sys.version_info may not always be
correct. (See P.S. below)
Additional context
I searched the existing typeshed issues and did not find a dedicated report for
ttk.Progressbar being out of date with Tk 9.0. This seems to be a gap in the
current stubs.
P.S. : AI also generates texts as shown below, but I can't verify the detail, since I didn't find any description of major version update on bundled tcl/tk in What’s new in Python 3.14:
https://docs.python.org/3.14/whatsnew/3.14.html#tkinter
Since Python 3.14, the official binary installers have begun shipping Tcl/Tk 9.0 (e.g. the macOS installer uses Tcl/Tk 9.0.3 as of Python 3.14.5, and Windows installers also bundle Tcl/Tk 9.0). This means the Tk 9.0 Progressbar options are now relevant to users of official CPython builds, not just those who manually build against Tk 9.
- Lenguaje dominante
- Python
- Estrellas
- 5.1k
- Forks
- 2.1k
- Merge medio
- 1 d 14 h
- PR fusionados (30 d)
- 78
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de python/typeshed
-
`networkx.set_edge_attributes` should support scalar value + namePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
false alarm on decode callPosiblemente ocupada @jw9829 la tomó hace 30 días. Abiertohelp wanted stubs: false positive
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
python/typeshed#16441 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Add stubs for stdlib `_colorize` modulePosiblemente ocupada @anistark la tomó hace 47 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
python/typeshed#16361 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
[rasterio] `transform.rowcol` return typing possibly incorrect?Posiblemente ocupada @ryux1 la tomó hace 51 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
python/typeshed#16331 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de python/typeshed
Issues similares
-
Web transport: small test gapsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
scikit-learn-contrib/category_encoders#553 ·
Los mantenedores suelen responder en 1 día
-
tests/strategies_test.py:174 goes uncovered on about 1 run in 100, failing the coverage ratchetAbiertoflaky-watch
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
btclib-org/btclib#2839 ·
Los mantenedores suelen responder en 1 día
-
BarrelList constructor drops false-valued iterable contentsPosiblemente ocupada @Gambit-Checkmate la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 19 días
-
[Performance]: Redundant object-storage pull when model and tokenizer share the same RunAI URIAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
vllm-project/vllm#63863 ·
Los mantenedores suelen responder en 1 día