Document the workflow for deprecating something in CPython.
Ninguém assumiu esta issue ainda.
- #1469 de @Lincoln-developer — fechado sem integrar
- Linguagem predominante
- Python
- Estrelas
- 2.1k
- Forks
- 1k
- Merge médio
- 2d 12h
- PRs com merge (30d)
- 12
Descrição
Describe the enhancement or feature you'd like
Document the workflow on how to deprecate something in CPython.
Deprecating something in Python involves raising deprecation warning and then actually removing the code some time later (at least 2 release cycles). We don't have this process documented clearly.
Describe alternatives you've considered
Currently this is undocumented process, and each of us has to just figure it out somehow.
Additional context
Discussed on Discord core-workflow-and-bots channel, and now opening a ticket based on the discussions.
Basic process:
- An issue was opened calling for deprecation of something
- We deprecate the code by adding warnings.deprecated (or warnings._deprecated)
- Document the deprecation. Needs a Porting doc (how?)
- The issue can be closed after the code for adding deprecation has been merged. It doesn't need to stay open for 2+ more years.
- Add the deprecation to the
pending-removal-in....rstfile - At the scheduled removal year, open a new issue for the removal
- Finally remove the code
Other info:
- Some deprecations don't have set removal date.
- There are also deprecated-removed Sphinx role to help advertise the removal dates.
- How to decide whether Removal/Deprecation is the right solution?
- search the usage, search on GitHub, grep, check PyPI projects to get an idea of the widespread usage
- when searching, look not just if people are using it, but how they're using it. Document the use case for the porting notes
- Is there a template for deprecation warning message?
- Should have documentation about how to port/replace it (porting notes)
- Users are encouraged to give feedback about deprecation by filing an issue
Note there is an open proposal for extending the removal of deprecated code to 5 years instead of 2.
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.
Direção de pesquisa
Comece revisando o workflow proposto nesta issue, a documentação de Porting e o arquivo pending-removal-in....rst, incluindo a role deprecated-removed do Sphinx. O trabalho concluído deve documentar a decisão de depreciação, os avisos e as orientações de portabilidade, o momento da remoção, o processo de feedback e o tratamento de depreciações sem uma data de remoção definida.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- documentation
- Tipo de issue
- Documentação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100