FYI: Small breaking changes are coming to some (non-schema author related) APIs
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
Línea de trabajo
Comienza con las pruebas referenciadas en #74 y los puntos de entrada de recuperación nombrados aquí: Resolver.lookup, las callbacks de recuperación de Registry y Retriever. Usa la normalización de URL anunciada, el tipo de callback de URL y el comportamiento de la URL base después de la recuperación como criterios de finalización.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
This is an FYI to anyone who sees it that an upcoming release (possibly v0.35) will likely contain breaking changes to the retrieval API.
referencing of course is in pre-1.0 / stable status (for slightly more details there see #38). I still of course don't wish to unnecessarily cause churn for people who've begun to adopt it, but it's clear there's at least one, possibly two, things in need of fixing.
Specifically, though I knew it would happen at some point, referencing needs to use a URL implementation in order to properly perform URL normalization -- in other words, as a simple example, knowing that HTTP://example.com is the same as http://example.com. Of course the full gamut is more complicated.
This means it needs to internally use a library (which will be url.py) which properly implements RFC3986 (though technically that one implements WHATWG URLs). Some functions then will need to take URLs rather than strs. Yes it is possible to sprinkle isinstance checks everywhere and convert always between str and URL but this will leave a small performance penalty everywhere, and also just generally seems unwise to leave in place before referencing continues to mature.
In particular:
Expect retrieve callbacks to likely receive URL objects rather than strs in an upcoming release.
I still expect this to affect only a small number of users ultimately, because the relevant APIs do not relate to Resource + Registry assembly, they relate to "internal" (but public) APIs like Resolver.lookup and Registry retrieval but I'm putting this here anyways.
Further details to come shortly, I'm still working on a set of changes to support this. If you wish to follow along, #74 contains the tests I have added (upstream to the test suite) which "tease out" the underlying issue the above references.
(And as a second example, which I again am unsure how easy I can fix but which I suspect should happen before #38 -- see #65. Ideally I'll find a way to do both of these changes at the same time.)
As a third example (and a slight reminder to myself), we also may not have precisely the right behavior vis a vis re-setting the base URL after retrieval, which should likely take precedence over the initial base URL for a Retriever (i.e. the object you get back should have a new base URI using the retrieval URL)
- Lenguaje dominante
- Python
- Estrellas
- 53
- Forks
- 27
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 8
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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.
Más de python-jsonschema/referencing
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
python-jsonschema/referencing#366 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
python-jsonschema/referencing#257 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
python-jsonschema/referencing#226 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
python-jsonschema/referencing#178 · 6 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
python-jsonschema/referencing#160 · 3 comentarios · 2 reacciones ·
Todos los issues de python-jsonschema/referencing
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
stephrobert/dsoxlab#238 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
sublimehq/package_control#1780 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
nwg-piotr/nwg-displays#145 ·