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

Refactor preview_images to use thread instead of subprocess #2167

Closed
wants to merge 1 commit into from

Conversation

oscarlevin
Copy link
Member

This fixes the issue of interactive preview images being unable to be generated on Windows.

Instead of starting http.server in a subprocess, this now starts it in a thread. GET messages from the server are sent immediately to log.debug.

Also fixed a trailing semicolon and a unneeded use of os.path.join when creating the URL.

@oscarlevin
Copy link
Member Author

I should say, it would be good to also test this on linux/mac in addition to the testing I've done on Windows.

@rbeezer
Copy link
Collaborator

rbeezer commented Jun 6, 2024

Thanks, @oscarlevin! I will test on Linux here shortly. Perhaps @Alex-Jordan could do a test on a Mac?

@rbeezer
Copy link
Collaborator

rbeezer commented Jun 7, 2024

OK, testing on Linux with sample article. Short answer: looks good.

Messages all look informative and rational (at full verbosity). Correct files generated, and visually look good. File sizes look to be within epsilon of "old" versions in repository.

I'm going to ping @Alex-Jordan off-list.

@rbeezer
Copy link
Collaborator

rbeezer commented Jun 7, 2024

Forgot the caveat. Using pretext/pretext script, and I did not check how current (old?) my Playwright is.

Which prompts me to create: #2168

@oscarlevin
Copy link
Member Author

Accidentally pushed and accidental merge of Master, so force-pushed a reversion.

@rbeezer
Copy link
Collaborator

rbeezer commented Jun 19, 2024

Merged without any Mac testing. Fingers crossed.

Removed extraneous whitespace. Isolated unrelated small fixes from the real changes.

Thanks for backing up our cross-platform guarantees.

@rbeezer rbeezer closed this Jun 19, 2024
@oscarlevin oscarlevin deleted the previews branch June 28, 2024 23:53
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.

2 participants