With removal of distutils in python3.12 from setuptools._distutils.dep_util import newer_group does not seem to work in pegen
Abierto
Nadie ha tomado este issue todavía.
build
topic-parser
type-bug
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
Bug report
Bug description:
# Add a code block here, if required
def compile_c_extension(
generated_source_path: str,
build_dir: Optional[str] = None,
verbose: bool = False,
keep_asserts: bool = True,
disable_optimization: bool = False,
library_dir: Optional[str] = None,
) -> pathlib.Path:
"""Compile the generated source for a parser generator into an extension module.
The extension module will be generated in the same directory as the provided path
for the generated source, with the same basename (in addition to extension module
metadata). For example, for the source mydir/parser.c the generated extension
in a darwin system with python 3.8 will be mydir/parser.cpython-38-darwin.so.
If *build_dir* is provided, that path will be used as the temporary build directory
of distutils (this is useful in case you want to use a temporary directory).
If *library_dir* is provided, that path will be used as the directory for a
static library of the common parser sources (this is useful in case you are
creating multiple extensions).
"""
import setuptools.command.build_ext
import setuptools.logging
from setuptools import Distribution, Extension
from setuptools._distutils.ccompiler import new_compiler
from setuptools._distutils.dep_util import newer_group
from setuptools._distutils.sysconfig import customize_compiler
CPython versions tested on:
3.12
3.14
Operating systems tested on:
macOS
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.
Línea de trabajo
Comienza en el punto de entrada compile_c_extension mostrado en el informe e inspecciona la importación de newer_group por parte de setuptools._distutils.dep_util en Python 3.12 y 3.14. Reproduce el fallo de macOS en pegen e identifica el problema de compatibilidad; se considera terminado cuando la compilación de la extensión del generador de analizadores funcione en las versiones de Python probadas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- build-system
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100