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 pywwt on notebook >=5.7.6 #192

Merged
merged 1 commit into from
Apr 9, 2019
Merged

Conversation

pkgw
Copy link
Contributor

@pkgw pkgw commented Mar 28, 2019

Version 5.7.6 of the Jupyter notebook module adds a new security feature related to the HTTP content types (jupyter/notebook#4467 (comment)). It breaks pywwt because pywwt has not been returning valid MIME types (AKA content types) from its internal Jupyter server.

From looking at the main notebook implementation, it seems that the correct approach is to use the mimetypes module to get the right value to put in the Content-Type header, so let's go ahead and do that.

Closes #191.

@pkgw pkgw mentioned this pull request Mar 28, 2019
@pkgw
Copy link
Contributor Author

pkgw commented Mar 31, 2019

The CI is failing here in the same way as #149. Importantly, the failure mode is actually not the same as what I showed in my first related comment on that issue. Here, and for the latest CI runs on #149, the "actual" image is all black. I can't reproduce on my Linux machine locally, so I'm not sure what's gone wrong ... any thoughts @astrofrog?

@astrofrog
Copy link
Member

@pkgw - can you rebase to include the latest fixes to the CI? (#196)

Version 5.7.6 of the Jupyter notebook module adds a new security feature
related to the HTTP content types
(jupyter/notebook#4467 (comment)). It
breaks pywwt because pywwt has not been returning valid MIME types (AKA
content types) from its internal Jupyter server.

From looking at the main `notebook` implementation, it seems that the correct
approach is to use the `mimetypes` module to get the right value to put in the
Content-Type header, so let's go ahead and do that.

Closes WorldWideTelescope#191.
@codecov
Copy link

codecov bot commented Apr 9, 2019

Codecov Report

Merging #192 into master will decrease coverage by 0.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #192      +/-   ##
==========================================
- Coverage   58.67%   58.66%   -0.02%     
==========================================
  Files          24       24              
  Lines        1631     1633       +2     
==========================================
+ Hits          957      958       +1     
- Misses        674      675       +1
Impacted Files Coverage Δ
pywwt/jupyter_server.py 30.43% <50%> (+0.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bea8b0c...d1b9f42. Read the comment docs.

@pkgw pkgw merged commit 9e39419 into WorldWideTelescope:master Apr 9, 2019
@pkgw pkgw deleted the fix-mimetypes branch April 9, 2019 09:42
@jsub1 jsub1 mentioned this pull request May 15, 2019
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.

None yet

2 participants