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

Update to Pyscript 2024.5.2 #6

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

JeffersGlass
Copy link

This PR updates the extension to a more recent version of PyScript (not the most recent version, as there seems to be an issue with editor cells in PyScript 2024.5.1).

Changes:

  • Rename the py-repl directive to py-editor in line with the new custom elements
  • Adjust the py-editor's attributes to match the new style
  • Remove old style outputs divs and terminal
  • Update docs and tests

Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! See the review comments

.readthedocs.yml Outdated Show resolved Hide resolved
sphinx_pyscript/mini-coi.js Show resolved Hide resolved
sphinx_pyscript/__init__.py Show resolved Hide resolved
sphinx_pyscript/__init__.py Outdated Show resolved Hide resolved
sphinx_pyscript/__init__.py Outdated Show resolved Hide resolved
@JeffersGlass JeffersGlass changed the title Update to Pyscript 2024.4.2 Update to Pyscript 2024.5.2 May 13, 2024
@JeffersGlass
Copy link
Author

The main open PyScript bug with <py-editor> was fixed in a release this morning, so I've bumped this PR to increment PyScript to 2024.5.2.

@cosmicBboy
Copy link

FYI, the tiny silence example: https://pyscript.com/@ntoll/tiny-silence/latest

raises the following error if the version is bumped to 2024.5.2:

PythonError: Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pyscript/__init__.py", line 32, in <module>
  File "pyscript/display.py", line 6, in <module>
  File "pyscript/magic_js.py", line 11, in <module>
TypeError: object with buffer protocol required

    at proxy_convert_mp_to_js_obj_jsside (micropython.mjs:1:104441)
    at proxy_convert_mp_to_js_obj_jsside_with_free (micropython.mjs:1:106193)
    at Object.runPython (micropython.mjs:1:96443)
    at Object.At [as run] (b7bdcf22-1787-4351-ac4d-985ec12d201c:2:11535)
    at Object.run (b7bdcf22-1787-4351-ac4d-985ec12d201c:2:30021)
    at b7bdcf22-1787-4351-ac4d-985ec12d201c:2:31033

@JeffersGlass
Copy link
Author

@cosmicBboy this PR is about making updates to a PyScript extension for Sphinx - you probably want to file a bug in the main pyscript repo.

@ericwb
Copy link

ericwb commented Oct 4, 2024

I'd love to see this merge soon, however, can you please update to PyScript 2024.9.2? I really want to use py-editor in my sphinx based readthedocs site. Thanks

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.

4 participants