Py_DEPRECATED should account for Py_Limited_API
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PRs
- Métricas de PR pendentes
Descrição
Feature or enhancement
Proposal:
Take the example of Py_SetPythonHome().
It has been deprecated in 3.11, and we should now do things with PyConfig (added in 3.8).
But it is also part of the limited API. So it should not actually disappear, and someone building with Py_Limited_API<3.8 does not have the available symbols to use the non deprecated variant.
So every developer building with the limited API that cares about the warning will have to study each deprecated function, and if the non deprecated vairant is not in the stable API, add local deprecation warning disable code.
The proposal:
When Py_LimitedAPI is defined, Py_Deprecated should not trigger a warning if The deprecation version is greater than the limited API version selected by the macro (3.2 if the macro is empty, otherwise, the version value in Py_Limited_API), since we are really compiling for a lower version of python
I can probably do the PR myself if it is accepted
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
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 localizando as definições e os usos de Py_DEPRECATED e Py_Limited_API nos headers do CPython e, em seguida, acompanhe a declaração de Py_SetPythonHome como um exemplo concreto. Verifique como a versão selecionada da limited-API afeta os avisos de depreciação e confirme que os avisos são suprimidos somente quando a substituição não está disponível nessa versão da API.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- api
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 38/100