FYI: Small breaking changes are coming to some (non-schema author related) APIs
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
Hướng nghiên cứu
Bắt đầu với các bài kiểm thử được tham chiếu trong #74 và các điểm vào truy xuất được nêu ở đây: Resolver.lookup, các callback truy xuất của Registry và Retriever. Sử dụng việc chuẩn hóa URL đã được công bố, kiểu callback URL và hành vi của URL cơ sở sau khi truy xuất làm tiêu chí hoàn thành.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- Python
- Star
- 53
- Fork
- 27
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 8
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của python-jsonschema/referencing
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
python-jsonschema/referencing#366 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
python-jsonschema/referencing#257 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
python-jsonschema/referencing#226 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
python-jsonschema/referencing#178 · 6 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
python-jsonschema/referencing#160 · 3 bình luận · 2 reaction ·
Tất cả issue của python-jsonschema/referencing
Issue tương tự
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Đang mởarea: harness bug status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Human-Agent-Society/reef#625 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
learningequality/kolibri#15351 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Name consistency Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eellak/triplestore#65 · 1 bình luận ·