`tkinter.ttk.Progressbar` stubs are outdated for Tk 9.0
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 75/100
- Tipo de issue
- Funcionalidade
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- python
- Domínio
- developer-experience
Direção de pesquisa
Comece em stdlib/tkinter/ttk.pyi por volta das linhas 803-836 onde a assinatura explícita Progressbar.__init__ está. Compare com a página manual Tk 9.0 ttk_progressbar linkada na issue, adicione parâmetros somente keyword para as novas opções de texto (text, anchor, font, foreground, justify, wraplength) e remova as opções que o Tk 9.0 eliminou. Verifique como os stubs vizinhos fazem version-gate de opções específicas do Tk, já que sys.version_info pode não refletir a versão do Tk linkada, e execute o typeshed check script no arquivo quando terminar.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 5.1k
- Forks
- 2.1k
- Merge médio
- 1d 14h
- PRs com merge (30d)
- 78
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de python/typeshed
-
`networkx.set_edge_attributes` should support scalar value + nameTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
Mantenedores costumam responder em até 1 dia
-
false alarm on decode callTalvez já em andamento @jw9829 assumiu há 29 dias. Abertahelp wanted stubs: false positive
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
python/typeshed#16441 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Add stubs for stdlib `_colorize` moduleTalvez já em andamento @anistark assumiu há 46 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
python/typeshed#16361 · 2 comentários · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
[rasterio] `transform.rowcol` return typing possibly incorrect?Talvez já em andamento @ryux1 assumiu há 50 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
python/typeshed#16331 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de python/typeshed
Issues semelhantes
-
request-theme
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 66/100
LizardByte/ThemerrDB#9575 ·
Mantenedores costumam responder em até 1 dia
-
Author Page: noshin-nawalAbertaauthor-page correction
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
acl-org/acl-anthology#10599 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
zilliztech/memsearch#818 ·
Mantenedores costumam responder em até 1 dia
-
[FAQ] Commit ID for ProjectsTalvez já em andamento @github-actions assumiu hoje. Abertafaq-proposal
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 84/100
DataTalksClub/faq#503 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
README.zh-CN/ja/es still hard-code 501 test counts after README.md went count-freeTalvez já em andamento @Aaqibhafeezkhan assumiu hoje. Abertabeginner documentation good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
BistaDinesh03/critique#164 · 1 comentário ·
Mantenedores costumam responder em até 1 dia