mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 02:37:41 -05:00
* Deprecate py-mount attribute, with comments as to when it was deprecated * Add changelog entry for deprecation * Fix 'unused' examples that used py-mount (handtrack and mario)
39 lines
1.5 KiB
Markdown
39 lines
1.5 KiB
Markdown
# Deprecation Cycle
|
|
|
|
Pyscript is under heavy development, which means that some things may change, and some features might need to be deprecated so you can use different alternative implementations.
|
|
|
|
This page describes the deprecation cycle for pyscript.
|
|
|
|
## Deprecation Steps
|
|
|
|
1. Remove usage of deprecated features from all examples.
|
|
2. Add warnings to all elements/features marked for deprecation.
|
|
3. Release a new version of pyscript with the deprecation warnings.
|
|
4. Next release, remove the deprecated features.
|
|
|
|
## Deprecation Warnings
|
|
|
|
Deprecation warnings are added to the codebase using the `showWarning` function from the `pyscriptjs.utils` module.
|
|
|
|
This function creates a warning banner on the page if any of the deprecated features was used. You can use HTML to write the message; ideally, you should provide an alternative to the deprecated feature.
|
|
|
|
### Example
|
|
|
|
```js
|
|
import {showWarning} from './utils'
|
|
|
|
showWarning(`
|
|
<p>
|
|
The <code>py-deprecated</code> tag is deprecated. Please use the <code>py-actual</code> tag instead. Please refer to <a href="#">this documentation page</a> for more information.
|
|
</p>
|
|
`, "html")
|
|
```
|
|
|
|
## Deprecation History
|
|
|
|
This section tracks deprecations of specific features, both for historical record and to help the development team remember to actually remove deprecated features in future releases.
|
|
|
|
|Attribute/Object/Functionality|Deprecated In|Removed In|
|
|
|-|-|-|
|
|
|`py-mount` attribute | (Release following 2023.03.1) | -|
|