sysconfig values for `platstdlib` do not appear to be accurate
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 77.2k
- Forks
- 36k
- Métricas de merge de PRs
- Métricas de PR pendentes
Descrição
Bug report
Bug description:
The values set for platstdlib in the sysconfig scheme paths are not consistent with the way sys.path is configured in getpath.py
sysconfig: https://github.com/python/cpython/blob/main/Lib/sysconfig/__init__.py#L28
getpath: https://github.com/python/cpython/blob/main/Modules/getpath.py#L182
Given this appears to have been wrong essentially forever, it appears nobody is using platstdlib for anything important (even I only noticed because running -m sysconfig inside a venv reports a platstdlib path inside the venv, which is definitely not right).
Still, it should be possible to make them at least a bit more consistent with the way sys.path is actually initialised (appending lib-dynload to the stdlib path looks to be sufficient for non-Windows system, but I'm less sure on Windows)
CPython versions tested on:
3.12
Operating systems tested on:
Linux, Windows
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
Compare Lib/sysconfig/init.py#L28 com Modules/getpath.py#L182, começando por como platstdlib é formado no Linux e no Windows. Verifique os caminhos resultantes com sys.path e python -m sysconfig dentro e fora de um ambiente virtual; considera-se concluído quando platstdlib refletir a inicialização real em ambas as plataformas.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- operating-systems
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100