Signature email requires ASCII on Python 2 but requires Unicode only "str" on Python 3
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 1.7k
- Forks
- 408
- Merge medio
- 2 d 57 min
- PR fusionados (30 d)
- 7
Descripción
Signature_init in signature.c currently uses the s format string for parsing the email argument. This is inconsistent between Python 2 and 3. On Python 2, it accepts either text (unicode) or bytes (str) and implicitly encodes text using the default system encoding, which is ascii by default (and it seems like changing it is kind of weird and not really recommended by most people). Python 3, it only accepts text (str), and it's implicitly encodes it using UTF-8.
The name argument for Signature_init just uses O and accepts either text or bytes. It appears to implicitly encode text using UTF-8 and leaves bytes as-is. I would expect the email argument to work the same way.
So there's currently no way to pass in bytes on Python 3 and no way to pass in non-ASCII text on Python 2.
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 signature.c, en Signature_init, e inspecciona cómo se analiza el argumento email en comparación con el argumento name. Verifica el comportamiento en Python 2 y Python 3; se considera terminado cuando email acepta bytes en Python 3 y texto no ASCII en Python 2 de forma coherente con name.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- c, python
- Área
- api
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 48/100