Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix SpooledTemporaryFile has no seekable method #3053

Merged
merged 3 commits into from
Mar 22, 2023

Conversation

anthrotype
Copy link
Member

Intended to fix #3052

I first push a reproducer which I expect to fail on Python < 3.11

the SFNTReader expects the input file to be seekable, and it already rewinds the file with file.seek(0) to get to the sfnt table directory. Thus, if TTFont is loaded with an unseekable file object and lazy=True, we raise a TTLibError requiring one to either pass a seekable input file, or to not set lazy=True (in which case the input is loaded in a seekable BytesIO)

Fixes #3052
@anthrotype anthrotype merged commit e73a098 into main Mar 22, 2023
@anthrotype anthrotype deleted the fix-spool-temp-seekable branch March 22, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: 'SpooledTemporaryFile' object has no attribute 'seekable'
1 participant