Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit86c6f55

Browse files
authored
Merge pull requestalexmojaki#166 from alexmojaki/3.9
Upgrade to Python 3.9 again, and Pyodide 0.18.0
2 parents1ff96cf +b78db25 commit86c6f55

File tree

6 files changed

+15
-13
lines changed

6 files changed

+15
-13
lines changed

‎.github/workflows/workflow.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
-name:Set up Python
99
uses:actions/setup-python@v2
1010
with:
11-
python-version:3.8
11+
python-version:3.9
1212
-name:Set up Node
1313
uses:actions/setup-node@v2
1414
with:

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Several debuggers are provided, including [snoop](https://github.com/alexmojaki/
134134

135135
##Running locally
136136

137-
1. Install Python 3.8 and[poetry](https://python-poetry.org/docs/#installation).
137+
1. Install Python 3.9 and[poetry](https://python-poetry.org/docs/#installation).
138138
2. Run`poetry install` to install Python dependencies.
139139
3. Run`poetry run python -m core.generate_static_files`.
140140
4. In the`frontend` folder:

‎frontend/src/Worker.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ async function getPackageBuffer() {
1515
}
1616

1717
letrunCodeCatchErrors;
18+
letpyodide;
1819

1920
asyncfunctionloadPyodideOnly(){
2021
console.time("importScripts pyodide")
21-
importScripts('https://cdn.jsdelivr.net/pyodide/v0.17.0/full/pyodide.js');
22+
constindexURL='https://cdn.jsdelivr.net/pyodide/v0.18.0/full/';
23+
importScripts(indexURL+'pyodide.js');
2224
console.timeEnd("importScripts pyodide")
2325

2426
console.time("loadPyodide")
25-
awaitloadPyodide({indexURL:'https://cdn.jsdelivr.net/pyodide/v0.17.0/full/'});
27+
pyodide=awaitloadPyodide({indexURL});
2628
console.timeEnd("loadPyodide")
2729

2830
pyodide.runPython(loadPythonString)
@@ -83,7 +85,7 @@ class Runner {
8385
returndecoder.decode(bytes)+"\n";
8486
}
8587

86-
pyodide.setInterruptBuffer(interruptBuffer);
88+
pyodide._module.setInterruptBuffer(interruptBuffer);
8789
constresultCallbackToObject=(result)=>this.resultCallback(toObject(result.toJs()));
8890
runCodeCatchErrors(entry,inputCallback,resultCallbackToObject)
8991
}

‎poetry.lock‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = ""
55
authors = ["Alex Hall <alex.mojaki@gmail.com>"]
66

77
[tool.poetry.dependencies]
8-
python ="~3.8"
8+
python ="~3.9"
99
birdseye = {git ="https://github.com/alexmojaki/birdseye.git",branch ="futurecoder"}
1010
snoop ="@latest"
1111
asttokens ="@latest"

‎tests/test_transcript.json‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@
934934
"result": [
935935
{
936936
"color":"red",
937-
"text":" print('---')\n ^\nIndentationError: unindent does not match any outer indentation level\nat line 3\n\nAn `IndentationError` occurs when a given line of code is\nnot indented (aligned vertically with other lines) as expected.\n\nThe line identified above is less indented than expected.\n\n"
937+
"text":" print('---')\n^\nIndentationError: unindent does not match any outer indentation level\nat line 3\n\nAn `IndentationError` occurs when a given line of code is\nnot indented (aligned vertically with other lines) as expected.\n\nThe line identified above is less indented than expected.\n\n"
938938
},
939939
{
940940
"color":"red",
@@ -2685,7 +2685,7 @@
26852685
"result": [
26862686
{
26872687
"color":"red",
2688-
"text":"SyntaxError: expression cannot contain assignment, perhaps you meant\"==\"?\nat line 1\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nOne of the following two possibilities could be the cause:\n1. You meant to do a comparison with == and wrote = instead.\n2. You called a function with a named argument:\n\n a_function(invalid=...)\n\nwhere `invalid` is not a valid identifier (variable name) in Python\neither because it starts with a number, or is a string,\nor contains a period, etc.\n\n\n"
2688+
"text":" print(1 + 2 = 3)\n ^\nSyntaxError: expression cannot contain assignment, perhaps you meant\"==\"?\nat line 1\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nOne of the following two possibilities could be the cause:\n1. You meant to do a comparison with == and wrote = instead.\n2. You called a function with a named argument:\n\n a_function(invalid=...)\n\nwhere `invalid` is not a valid identifier (variable name) in Python\neither because it starts with a number, or is a string,\nor contains a period, etc.\n\n\n"
26892689
},
26902690
{
26912691
"color":"red",
@@ -5158,7 +5158,7 @@
51585158
"result": [
51595159
{
51605160
"color":"white",
5161-
"text":"['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'clear', 'copy', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']"
5161+
"text":"['__add__', '__class__', '__class_getitem__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'append', 'clear', 'copy', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']"
51625162
},
51635163
{
51645164
"color":"white",
@@ -15018,7 +15018,7 @@
1501815018
"result": [
1501915019
{
1502015020
"color":"red",
15021-
"text":" is_friend = name ==\"Alice\" or\n ^\nSyntaxError: invalid syntax\nat line 1\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nI am guessing that you wrote `or` by mistake.\nRemoving it and writing `is_friend = name ==\"Alice\"` seems to fix the error.\n\n"
15021+
"text":" is_friend = name ==\"Alice\" or\n^\nSyntaxError: invalid syntax\nat line 1\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nI am guessing that you wrote `or` by mistake.\nRemoving it and writing `is_friend = name ==\"Alice\"` seems to fix the error.\n\n"
1502215022
},
1502315023
{
1502415024
"color":"red",
@@ -15535,7 +15535,7 @@
1553515535
"result": [
1553615536
{
1553715537
"color":"red",
15538-
"text":"\"XOX\n ^\nSyntaxError: EOL while scanning string literal\nat line 7\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nYou started writing a string with a single or double quote\nbut never ended the string with another quote on that line.\n\n"
15538+
"text":"\"XOX\n^\nSyntaxError: EOL while scanning string literal\nat line 7\n\nA `SyntaxError` occurs when Python cannot understand your code.\n\nYou started writing a string with a single or double quote\nbut never ended the string with another quote on that line.\n\n"
1553915539
},
1554015540
{
1554115541
"color":"red",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp