socket documentation should mention AF_UNSPEC in the section on constants and getaddrinfo() docs
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 36k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
Documentation
In the socket module documentation
There should be a mention of AF_UNSPEC alongside AF_INET, AF_INET6 and AF_UNIX in the constants section.
Also e.g. in the getaddrinfo() entry, it should be mentioned you can pass socket.AF_UNSPEC instead of 0.
The difference matters if automated testing is checking type annotations (at least I had this issue submitting
a pull request for pythonosc).
The default family argument for getaddrinfo is 0.
This has type int, not type socket.AddressFamily, whereas socket.AF_UNSPEC,
has the type socket.AddressFamily, but corresponds to the integer 0.
This makes a difference when type annotations are being checked
and the argument to family is expected to be of type socket.AddressFamily.
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 la documentación del módulo socket, concretamente en la sección de constantes y en la entrada de getaddrinfo(). Menciona AF_UNSPEC junto con AF_INET, AF_INET6 y AF_UNIX, y documenta que se puede pasar en lugar de 0 para el argumento family. Se considera terminado cuando ambas referencias solicitadas explican la diferencia relevante para el tipo.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- documentation, networking
- Tipo de issue
- Documentación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 48/100