Skip to content

Add REPL plugin hooks; Add output, output-mode, stderr attributes #1106

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

Merged
merged 29 commits into from
Mar 23, 2023
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
54d10d3
Add before, after REPL hooks
JeffersGlass Jan 11, 2023
62c1595
Basic stdout/stderr handling
JeffersGlass Jan 11, 2023
52d3c5d
Re-introduce 'output-mode' attribute for py-repl
JeffersGlass Jan 11, 2023
7692b56
Adjust to use options/kwargs
JeffersGlass Jan 25, 2023
be949d4
runtime -> interpreter
JeffersGlass Jan 26, 2023
b2d2d9c
Add plugin execution tests
JeffersGlass Jan 26, 2023
dd2cc99
Add test for output attribute on repl
JeffersGlass Jan 26, 2023
0a84e07
Add async test
JeffersGlass Jan 26, 2023
859cb4a
Stub remaining integration tests
JeffersGlass Jan 26, 2023
91c25e0
Remove dedent
JeffersGlass Jan 27, 2023
813bb48
Add dynamic-tag test
JeffersGlass Jan 27, 2023
cc4bbad
More tests
JeffersGlass Jan 27, 2023
92f720a
'Output=' doesn't affect display()
JeffersGlass Jan 29, 2023
48043e5
Adjust behavior of repl results
JeffersGlass Jan 29, 2023
ae0bdcf
Documentation
JeffersGlass Jan 29, 2023
47896ab
Changelog
JeffersGlass Jan 29, 2023
c4381f7
Cleanup
JeffersGlass Feb 6, 2023
eee2fe1
Merge from main
JeffersGlass Feb 6, 2023
2168944
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2023
56b7770
Address comments
JeffersGlass Mar 20, 2023
856d61b
Merge from main
JeffersGlass Mar 20, 2023
a8deeea
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 22, 2023
2e904a8
Remove unused imports
JeffersGlass Mar 22, 2023
982f477
Formats changelog
marimeireles Mar 22, 2023
d775649
Linting
marimeireles Mar 22, 2023
5bf2da8
Linting correctly
marimeireles Mar 22, 2023
9d84d86
Adjust changelog formatting
JeffersGlass Mar 22, 2023
49faecf
Merge branch 'main' into pyrepl-hooks
JeffersGlass Mar 22, 2023
41884c0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Changelog
  • Loading branch information
JeffersGlass committed Mar 22, 2023
commit 47896abe8f1e5bc6774a9a7d0deed89b1eda3ab2
28 changes: 19 additions & 9 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,44 @@ Enhancements
2023.01.1
=========

Features

### Features
--------

#### <py-script> tags
- Restored the `output` attribute of <py-script> tags to route `sys.stdout` to a DOM element with the given ID. ([#1063](https://github.com/pyscript/pyscript/pull/1063))
- Added a `stderr` attribute of <py-script> tags to route `sys.stderr` to a DOM element with the given ID. ([#1063](https://github.com/pyscript/pyscript/pull/1063))

Bug fixes
---------
#### <py-repl tags>
- The `output` attribute of $lt;py-repl$gt; tags now specifies the id of the DOM element that `sys.stdout`, `sys.stderr`, and the results of a REPL execution are written to. It no longer affects the location of calls to `display()`
- Added a `stderr` attribute of <py-repl> tags to route `sys.stderr` to a DOM element with the given ID. ([#1106](https://github.com/pyscript/pyscript/pull/1106))
- Resored the `output-mode` attribute of <py-repl> tags. If `output-mode` == 'append', the DOM element where output is printed is _not_ cleared before writing new results.

#### Plugins
- Plugins may now implement the `beforePyReplExec()` and `afterPyReplExec()` hooks, which are called immediately before and after code in a <py-repl> tag is executed. ([#1106](https://github.com/pyscript/pyscript/pull/1106))

### Bug fixes


- Fixed an issue where `pyscript` would not be available when using the minified version of PyScript. ([#1054](https://github.com/pyscript/pyscript/pull/1054))
- Fixed missing closing tag when rendering an image with `display`. ([#1058](https://github.com/pyscript/pyscript/pull/1058))
- Fixed a bug where Python plugins methods were being executed twice. ([#1064](https://github.com/pyscript/pyscript/pull/1064))

Enhancements
------------
### Enhancements

- When adding a `py-` attribute to an element but didn't added an `id` attribute, PyScript will now generate a random ID for the element instead of throwing an error which caused the splash screen to not shutdown. ([#1122](https://github.com/pyscript/pyscript/pull/1122))
- You can now disable the splashscreen by setting `enabled = false` in your `py-config` under the `[splashscreen]` configuration section. ([#1138](https://github.com/pyscript/pyscript/pull/1138))

Documentation
-------------
### Documentation


- Fixed 'Direct usage of document is deprecated' warning in the getting started guide. ([#1052](https://github.com/pyscript/pyscript/pull/1052))
- Added reference documentation for the `py-splashscreen` plugin ([#1138](https://github.com/pyscript/pyscript/pull/1138))
- Adds doc for installing tests ([#1156](https://github.com/pyscript/pyscript/pull/1156))
- Adds docs for custom Pyscript attributes (`py-*`) that allow you to add event listeners to an element ([#1125](https://github.com/pyscript/pyscript/pull/1125))

Deprecations and Removals
-------------------------
### Deprecations and Removals


- The py-config `runtimes` to specify an interpreter has been deprecated. The `interpreters` config should be used instead. ([#1082](https://github.com/pyscript/pyscript/pull/1082))
- The attributes `pys-onClick` and `pys-onKeyDown` have been deprecated, but the warning was only shown in the console. An alert banner will now be shown on the page if the attributes are used. They will be removed in the next release. ([#1084](https://github.com/pyscript/pyscript/pull/1084))
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy