-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix the xfail tests in te 8000 st_async.py #1313
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
Comments
Merged
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 28, 2023
This is some refactoring I did on the way towards resolving pyscript#1313. I added a new _run_pyscript Python function which executes the code inside a context maanger that sets the display target. We can then return a JS object wrapper directly from Python. I moved the "installation" of the pyscript module to loadInterpreter, and pyimport pyscript_py there and give it a type. This avoids a bunch of creating and deleting of proxies for pyscript_py and allows us to give it a type once and for all. I also did some minor logic cleanup in a few places.
Merged
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 28, 2023
This is some refactoring I did on the way towards resolving pyscript#1313. I added a new _run_pyscript Python function which executes the code inside a context maanger that sets the display target. We can then return a JS object wrapper directly from Python. I moved the "installation" of the pyscript module to loadInterpreter, and pyimport pyscript_py there and give it a type. This avoids a bunch of creating and deleting of proxies for pyscript_py and allows us to give it a type once and for all. I also did some minor logic cleanup in a few places.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 28, 2023
This is some refactoring I did on the way towards resolving pyscript#1313. I added a new _run_pyscript Python function which executes the code inside a context maanger that sets the display target. We can then return a JS object wrapper directly from Python. I moved the "installation" of the pyscript module to loadInterpreter, and pyimport pyscript_py there and give it a type. This avoids a bunch of creating and deleting of proxies for pyscript_py and allows us to give it a type once and for all. I also did some minor logic cleanup in a few places.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 28, 2023
This is some refactoring I did on the way towards resolving pyscript#1313. I added a new _run_pyscript Python function which executes the code inside a context maanger that sets the display target. We can then return a JS object wrapper directly from Python. I moved the "installation" of the pyscript module to loadInterpreter, and pyimport pyscript_py there and give it a type. This avoids a bunch of creating and deleting of proxies for pyscript_py and allows us to give it a type once and for all. I also did some minor logic cleanup in a few places.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 28, 2023
Resolves pyscript#1313 and pyscript#1314. On top of pyscript#1318. The point of these tests is to define the execution order of Tasks that are scheduled in <py-script> tags: first all the py-script tags are executed and their related lifecycle events. Once all of this is done, we schedule any enqueued tasks. To delay the execution of these tasks, we use a custom event loop for pyExec with this defer behavior. Until `start_` is called, our custom loop just stores the tasks. When `start_` is called, all deferred tasks are scheduled and any later tasks are also scheduled immediately. This deferment should only apply to user logic, so we set the custom event loop in a context manager around the user calls and restore the original event loop when we're done.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 28, 2023
Resolves pyscript#1313 and pyscript#1314. On top of pyscript#1318. The point of these tests is to define the execution order of Tasks that are scheduled in <py-script> tags: first all the py-script tags are executed and their related lifecycle events. Once all of this is done, we schedule any enqueued tasks. To delay the execution of these tasks, we use a custom event loop for pyExec with this defer behavior. Until `start_` is called, our custom loop just stores the tasks. When `start_` is called, all deferred tasks are scheduled and any later tasks are also scheduled immediately. This deferment should only apply to user logic, so we set the custom event loop in a context manager around the user calls and restore the original event loop when we're done.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 28, 2023
Resolves pyscript#1313 and pyscript#1314. On top of pyscript#1318. The point of these tests is to define the execution order of Tasks that are scheduled in <py-script> tags: first all the py-script tags are executed and their related lifecycle events. Once all of this is done, we schedule any enqueued tasks. To delay the execution of these tasks, we use a custom event loop for pyExec with this defer behavior. Until `start_` is called, our custom loop just stores the tasks. When `start_` is called, all deferred tasks are scheduled and any later tasks are also scheduled immediately. This deferment should only apply to user logic, so we set the custom event loop in a context manager around the user calls and restore the original event loop when we're done.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 28, 2023
Resolves pyscript#1313 and pyscript#1314. On top of pyscript#1318. The point of these tests is to define the execution order of Tasks that are scheduled in <py-script> tags: first all the py-script tags are executed and their related lifecycle events. Once all of this is done, we schedule any enqueued tasks. To delay the execution of these tasks, we use a custom event loop for pyExec with this defer behavior. Until `start_` is called, our custom loop just stores the tasks. When `start_` is called, all deferred tasks are scheduled and any later tasks are also scheduled immediately. This deferment should only apply to user logic, so we set the custom event loop in a context manager around the user calls and restore the original event loop when we're done.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 28, 2023
Resolves pyscript#1313 and pyscript#1314. On top of pyscript#1318. The point of these tests is to define the execution order of Tasks that are scheduled in <py-script> tags: first all the py-script tags are executed and their related lifecycle events. Once all of this is done, we schedule any enqueued tasks. To delay the execution of these tasks, we use a custom event loop for pyExec with this defer behavior. Until `start_` is called, our custom loop just stores the tasks. When `start_` is called, all deferred tasks are scheduled and any later tasks are also scheduled immediately. This deferment should only apply to user logic, so we set the custom event loop in a context manager around the user calls and restore the original event loop when we're done.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 28, 2023
Resolves pyscript#1313 and pyscript#1314. On top of pyscript#1318. The point of these tests is to define the execution order of Tasks that are scheduled in <py-script> tags: first all the py-script tags are executed and their related lifecycle events. Once all of this is done, we schedule any enqueued tasks. To delay the execution of these tasks, we use a custom event loop for pyExec with this defer behavior. Until `start_` is called, our custom loop just stores the tasks. When `start_` is called, all deferred tasks are scheduled and any later tasks are also scheduled immediately. This deferment should only apply to user logic, so we set the custom event loop in a context manager around the user calls and restore the original event loop when we're done.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 28, 2023
Resolves pyscript#1313 and pyscript#1314. On top of pyscript#1318. The point of these tests is to define the execution order of Tasks that are scheduled in <py-script> tags: first all the py-script tags are executed and their related lifecycle events. Once all of this is done, we schedule any enqueued tasks. To delay the execution of these tasks, we use a custom event loop for pyExec with this defer behavior. Until `start_` is called, our custom loop just stores the tasks. When `start_` is called, all deferred tasks are scheduled and any later tasks are also scheduled immediately. This deferment should only apply to user logic, so we set the custom event loop in a context manager around the user calls and restore the original event loop when we're done.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 28, 2023
Resolves pyscript#1313 and pyscript#1314. On top of pyscript#1318. The point of these tests is to define the execution order of Tasks that are scheduled in <py-script> tags: first all the py-script tags are executed and their related lifecycle events. Once all of this is done, we schedule any enqueued tasks. To delay the execution of these tasks, we use a custom event loop for pyExec with this defer behavior. Until `start_` is called, our custom loop just stores the tasks. When `start_` is called, all deferred tasks are scheduled and any later tasks are also scheduled immediately. This deferment should only apply to user logic, so we set the custom event loop in a context manager around the user calls and restore the original event loop when we're done.
hoodmane
added a commit
that referenced
this issue
Mar 30, 2023
This is some refactoring I did on the way towards resolving #1313. I added a new _run_pyscript Python function which executes the code inside a context manager that sets the display target. We can then return a JS object wrapper directly from Python. I moved the "installation" of the pyscript module to loadInterpreter, and pyimport pyscript_py there and give it a type. This avoids a bunch of creating and deleting of proxies for pyscript_py and allows us to give it a type once and for all. I also did some minor logic cleanup in a few places.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 30, 2023
Resolves pyscript#1313 and pyscript#1314. On top of pyscript#1318. The point of these tests is to define the execution order of Tasks that are scheduled in <py-script> tags: first all the py-script tags are executed and their related lifecycle events. Once all of this is done, we schedule any enqueued tasks. To delay the execution of these tasks, we use a custom event loop for pyExec with this defer behavior. Until `start_` is called, our custom loop just stores the tasks. When `start_` is called, all deferred tasks are scheduled and any later tasks are also scheduled immediately. This deferment should only apply to user logic, so we set the custom event loop in a context manager around the user calls and restore the original event loop when we're done.
hoodmane
added a commit
that referenced
this issue
Mar 30, 2023
Resolves #1313 and #1314. On top of #1318. The point of these tests is to define the execution order of Tasks that are scheduled in <py-script> tags: first all the py-script tags are executed and their related lifecycle events. Once all of this is done, we schedule any enqueued tasks. To delay the execution of these tasks, we use a custom event loop for pyExec with this defer behavior. Until schedule_deferred_tasks is called, we defer tasks started by user code. schedule_deferred_tasks starts all deferred user tasks and switches to immediately scheduling any further user tasks.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a follow-up of #1258.
Original discussion: https://github.com/pyscript/pyscript/pull/1258/files#r1149403259
These two tests were temporarily skipped to make it possible to merge the PR earlier, but they should now be fixed ASAP.
The text was updated successfully, but these errors were encountered: