Closed oscargus closed 2 years ago
That looks like a great solution! The replace
will have some effect on the search/suggest behavior for any objects where a decode error occurs, but I can't imagine it'll noticeably affect user experience.
I would like to add a smoke test for this inventory -- please download a copy of the misbehaving fonttools objects.inv
, rename to objects_fonttools.inv
, and place in the tests/resource
directory. It'll get picked up by the CI.
(Clearly I didn't look much into adding a test, more thinking about the options.)
Very nice test setup!
Whoa, well that blew up. Not sure why.
OH. Because it does a comparison against the inventory housed on the main
branch of this repo.
And, that file doesn't exist yet. One sec.
Oh, interesting -- this issue has revealed a gap in my test suite: I don't have a suggest
test that touches all of the inventories in tests/resource
.
Well, it is waiting here for when that is ready. :-) Just let me know if I should do anything on my side.
Ok! I think main
is now ready to accommodate this PR.
Please rebase your working branch for the PR onto my upstream main
and push back up to Github. (If you're not sure how to do this, let me know and I can provide steps.)
At this point, the test suite should FAIL.
Then, if you remove the special case for fonttools
here, it should 🤞 then make the test suite pass.
I used a separate commit for the second stage as I wasn't sure if I was doing the right thing (and maybe the error messages from the previous one can be useful?). Let me know if I should squash the commits.
Excellent -- yeah, you did what I had intended, keeping it as a second commit. It could be squashed, but since this project is single-maintainer and fairly low-velocity, I usually leave the commit history fairly verbose.
Thank you for the issue report and the fix -- I really appreciate it! I'll get v2.2.2 out as soon as I can.
Great! Happy to be able to assist!
Is the PR a fix or a feature?
Reduces (removes?) the risk of getting UnicodeDecodeErrors. Unknown consequences for the actual search functionality...
Describe the changes in the PR
This may not be the correct way to actually solve it, but it does remove the error and makes suggest work on the objects.inv in question.
Not sure if I should have added a test (the only way I could think of was a smoke test for that particular URL, which I thought didn't really make sense, as it will require a download and the issue may go away from there).
I hope the CHANGELOG entry is close to acceptable.
Does this PR close any issues?
Closes #225
Does the PR change/update the following, if relevant?