-
Notifications
You must be signed in to change notification settings - Fork 52
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 Python 3.11 #303
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
671bd85
Update to Python 3.11
jtpio fdb41bb
Update sha
jtpio a75cdb0
update to 3.11.2
jtpio b4a19d8
sync patches
jtpio b6f6270
reset build number
jtpio c0a06d8
Replace hard-coded `python3.10` with `python3.11` for now
jtpio 47f06b3
Revert "Replace hard-coded `python3.10` with `python3.11` for now"
jtpio 919c4b4
update in `build.sh`only for now
jtpio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
217 changes: 0 additions & 217 deletions
217
..._emscripten/python/patches/0001-Patch-in-call-trampolines-to-handle-fpcast-troubles.patch
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
recipes/recipes_emscripten/python/patches/0001-Public-pymain_run_python.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 8dc93243eb0cdf27a81e9baf156df621cc8e2eb9 Mon Sep 17 00:00:00 2001 | ||
From: Hood Chatham <[email protected]> | ||
Date: Sun, 17 Jul 2022 14:40:39 +0100 | ||
Subject: [PATCH 1/9] Public pymain_run_python | ||
|
||
--- | ||
Modules/main.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/Modules/main.c b/Modules/main.c | ||
index 6904e3f76e..07bea58080 100644 | ||
--- a/Modules/main.c | ||
+++ b/Modules/main.c | ||
@@ -537,7 +537,7 @@ pymain_repl(PyConfig *config, int *exitcode) | ||
} | ||
|
||
|
||
-static void | ||
+void | ||
pymain_run_python(int *exitcode) | ||
{ | ||
PyObject *main_importer_path = NULL; | ||
-- | ||
2.25.1 | ||
|
36 changes: 36 additions & 0 deletions
36
...emscripten/python/patches/0002-Patch-importlib-to-allow-modifications-to-ModuleNotF.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From 90812b6dc97860ef164a2810ebf5f3121dfc919e Mon Sep 17 00:00:00 2001 | ||
From: Hood Chatham <[email protected]> | ||
Date: Wed, 16 Nov 2022 14:02:53 -0800 | ||
Subject: [PATCH 2/9] Patch importlib to allow modifications to | ||
ModuleNotFoundError | ||
|
||
--- | ||
Lib/importlib/_bootstrap.py | 5 ++++- | ||
1 file changed, 4 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py | ||
index afb95f4e1d..32fe7a68bf 100644 | ||
--- a/Lib/importlib/_bootstrap.py | ||
+++ b/Lib/importlib/_bootstrap.py | ||
@@ -1119,6 +1119,9 @@ def _sanity_check(name, package, level): | ||
_ERR_MSG_PREFIX = 'No module named ' | ||
_ERR_MSG = _ERR_MSG_PREFIX + '{!r}' | ||
|
||
+def _get_module_not_found_error(name): | ||
+ return ModuleNotFoundError(_ERR_MSG.format(name), name=name) | ||
+ | ||
def _find_and_load_unlocked(name, import_): | ||
path = None | ||
parent = name.rpartition('.')[0] | ||
@@ -1139,7 +1142,7 @@ def _find_and_load_unlocked(name, import_): | ||
child = name.rpartition('.')[2] | ||
spec = _find_spec(name, path) | ||
if spec is None: | ||
- raise ModuleNotFoundError(_ERR_MSG.format(name), name=name) | ||
+ raise _get_module_not_found_error(name) | ||
else: | ||
if parent_spec: | ||
# Temporarily add child we are currently importing to parent's | ||
-- | ||
2.25.1 | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would revert the hard-coded changes and only change it in the python recipe but not all the other recipes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright, is it because this should be tackled in #308 instead?