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

Improve support for requests in pyodide #3973

Merged
merged 5 commits into from Oct 10, 2022
Merged

Improve support for requests in pyodide #3973

merged 5 commits into from Oct 10, 2022

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Oct 9, 2022

  • Adds pyodide-http as a dependency for converted pyodide apps ensuring that requests and urllib3 work (even for binary files if using the pyodide-worker target)
  • Additionally we enable synchronous queries on the Image pane.

@philippjfr philippjfr added this to the Version 0.14.1 milestone Oct 9, 2022
@codecov
Copy link

codecov bot commented Oct 9, 2022

Codecov Report

Merging #3973 (7e143f0) into master (08e436b) will decrease coverage by 0.24%.
The diff coverage is 48.38%.

@@            Coverage Diff             @@
##           master    #3973      +/-   ##
==========================================
- Coverage   83.71%   83.46%   -0.25%     
==========================================
  Files         223      223              
  Lines       33008    33039      +31     
==========================================
- Hits        27631    27576      -55     
- Misses       5377     5463      +86     
Flag Coverage Δ
ui-tests 37.44% <48.38%> (+0.15%) ⬆️
unitexamples-tests 74.56% <0.00%> (-0.33%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
panel/command/convert.py 31.42% <ø> (ø)
panel/io/pyodide.py 0.00% <0.00%> (ø)
panel/pane/image.py 79.53% <0.00%> (-0.66%) ⬇️
panel/io/convert.py 72.22% <100.00%> (+4.25%) ⬆️
panel/tests/ui/io/test_convert.py 95.37% <100.00%> (+0.08%) ⬆️
panel/tests/widgets/test_terminal.py 36.44% <0.00%> (-22.43%) ⬇️
panel/widgets/terminal.py 50.47% <0.00%> (-20.48%) ⬇️
panel/tests/command/test_serve.py 82.92% <0.00%> (-2.44%) ⬇️
panel/tests/util.py 87.37% <0.00%> (-1.95%) ⬇️
panel/io/state.py 69.58% <0.00%> (-0.31%) ⬇️
... and 4 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@koenvo
Copy link

koenvo commented Oct 9, 2022

thank you for using pyodide-http!

Pyodide-http patches urllib. Under the hood urllib is used by pandas to read remote data. All read_* function should work out of the box after applying the patch.

@philippjfr
Copy link
Member Author

Nice, thanks! Was going to do some experimenting, particularly in regard to fsspec. I guess that also uses urllib under the hood in which case this is even more exciting than I'd dared to hope.

@MarcSkovMadsen
Copy link
Collaborator

Wow. I've been dreaming about this. Thought it was not possible.

@philippjfr philippjfr merged commit 0decd94 into master Oct 10, 2022
@philippjfr philippjfr deleted the binary_pyodide branch October 10, 2022 13:11
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

3 participants