Use BytesIO wrapped font instead of passing path to avoid "Cannot open resource" error in Windows#837
Merged
jaimergp merged 2 commits intoconda:mainfrom Aug 9, 2024
Merged
Conversation
…n resource" in Windows
3 tasks
jezdez
reviewed
Aug 9, 2024
Comment on lines
+15
to
+16
| with open(ttf_path, "rb") as f: | ||
| ttf_bytes = f.read() |
Member
There was a problem hiding this comment.
Would be worthwhile to use https://docs.python.org/3/library/importlib.resources.html for this?
Contributor
Author
There was a problem hiding this comment.
One day, yes. That path has worked for a long time so I just want to unblock this issue to release 3.9.1.
marcoesters
approved these changes
Aug 9, 2024
Contributor
marcoesters
left a comment
There was a problem hiding this comment.
I think this is an acceptable workaround for now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
CI erroring out in Azure at conda-forge/constructor-feedstock#78. Not sure why we didn't see this on GHA, but I can reproduce locally and this is the recommended fix in the Pillow docstring.
This is the error:
Checklist - did you ...
newsdirectory (using the template) for the next release's release notes?