-
-
Notifications
You must be signed in to change notification settings - Fork 186
add deprecation chapter #1850
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
base: 6.0
Are you sure you want to change the base?
add deprecation chapter #1850
Conversation
Co-authored-by: Alessandro Pisa <[email protected]>
Co-authored-by: Alessandro Pisa <[email protected]>
Co-authored-by: Alessandro Pisa <[email protected]>
Co-authored-by: Alessandro Pisa <[email protected]>
Co-authored-by: Alessandro Pisa <[email protected]>
Co-authored-by: Alessandro Pisa <[email protected]>
Co-authored-by: Alessandro Pisa <[email protected]>
Co-authored-by: Alessandro Pisa <[email protected]>
Co-authored-by: Alessandro Pisa <[email protected]>
Co-authored-by: Alessandro Pisa <[email protected]>
Co-authored-by: Alessandro Pisa <[email protected]>
Co-authored-by: Alessandro Pisa <[email protected]>
Co-authored-by: Alessandro Pisa <[email protected]>
Co-authored-by: Alessandro Pisa <[email protected]>
2ccbcf2 to
46b14eb
Compare
|
Ok, this should work. @stevepiercy what do you think? |
Co-authored-by: Alessandro Pisa <[email protected]>
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.
Thank you very much to all of you :)
@stevepiercy do you mind having another look?
- Generalize for npm and Volto - Clean up MyST style and formatting
- Clean up grammar, MyST syntax - Indent code within list items. - Use ruff style code example formatting.
stevepiercy
left a comment
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.
This is really good. I can tell because even I can understand it.
I have only one question that needs to be addressed. Thank you!
sorry, I can not find the question... |
|
|
||
| ### Zope | ||
|
|
||
| Zope configures logging and warnings, so the steps as described below in {ref}`deprecation-warning-python-label` aren't needed. |
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.
If the steps in the next section aren't needed, then why do we include them?
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.
With next step you refer to debug-mode on? IIRC it is needed to show the messages. I wrote this down years ago, so this may have been subject to change.
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.
And with cookiecutter-zope-instance based installs we only need to use the PYTHONWARNINGS variable or start the interpreter with parameters (like below in Python).
Thinking further, I am not 100% sure if the above method is anyway ZServer only?
Does anybody in here know more details?
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.
@jensens you might be able to see it more clearly on the pull request preview, beginning at https://plone6--1850.org.readthedocs.build/developer-guide/deprecation.html#zope.
This sentence refers to the next section entitled Python, and it states that the steps in that section are not needed.
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.
We can drop the whole section Zope with plone.recipe.zopeinstance since this feature was dropped with WSGI server usage. So, it does not make sense to keep the Python subheading, right?
See last bullet point at https://github.com/plone/plone.recipe.zope2instance/blob/0452e05386708564b17ae1de1aafe708a4d88ccb/CHANGES.rst#610-2018-12-28
Shall we mention somehow this change in the developer guide or focus on the current state?
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 wish I could offer advice, but this was before my time. I'll go with what you think is true and accurate, and to the best of your knowledge. We can also wait a few days for other old timers to offer advice. The only thing I can refer to is this search result:
https://6.docs.plone.org/search.html?q=plone.recipe.zopeinstance
I'd focus on the current state of Plone 6.x.x. I'd use a {versionchanged} or {versionremoved} MyST directive, but we should use Plone 6.x.x or 5.x.x as the referred version, whenever the package got released with Plone, not the package's version. The content of that directive should include whatever is helpful to Plone 6 developers for what has changed. There might even be some references in the Upgrade Guide. Why, yes, there is: https://6.docs.plone.org/backend/upgrading/version-specific-migration/upgrade-to-52.html#wsgi
Does that help at all?
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.
We can drop the whole section
Zopewith plone.recipe.zopeinstance since this feature was dropped with WSGI server usage. So, it does not make sense to keep the Python subheading, right?
I think you mean we don't need to keep the Zope subheading. The Python subheading still seems accurate.
I must say I always get deprecation warnings when starting Plone though, even though I don't think I have configured anything to enable it. So when I don't want them, I explicitly disable them with export PYTHONWARNINGS=ignore. This may depend on how Python is installed, and with which flags it was built.
Shall we mention somehow this change in the developer guide or focus on the current state?
Indeed focus on current state, but if possible mention the change as Steve says.
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.
We then have one subheading, that is a bit pointless. But if it helps, ok.
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.
There would be two, one for Python and the other for running tests.
stevepiercy
left a comment
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.
@jensens I thought I had submitted it. Here ya go!
Co-authored-by: Jens W. Klein <[email protected]>
mauritsvanrees
left a comment
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.
Thanks for working on this. I added some suggestions.
|
|
||
| ### Zope | ||
|
|
||
| Zope configures logging and warnings, so the steps as described below in {ref}`deprecation-warning-python-label` aren't needed. |
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.
We can drop the whole section
Zopewith plone.recipe.zopeinstance since this feature was dropped with WSGI server usage. So, it does not make sense to keep the Python subheading, right?
I think you mean we don't need to keep the Zope subheading. The Python subheading still seems accurate.
I must say I always get deprecation warnings when starting Plone though, even though I don't think I have configured anything to enable it. So when I don't want them, I explicitly disable them with export PYTHONWARNINGS=ignore. This may depend on how Python is installed, and with which flags it was built.
Shall we mention somehow this change in the developer guide or focus on the current state?
Indeed focus on current state, but if possible mention the change as Steve says.
Co-authored-by: Maurits van Rees <[email protected]>
Co-authored-by: Maurits van Rees <[email protected]>
Co-authored-by: Maurits van Rees <[email protected]>
Co-authored-by: Maurits van Rees <[email protected]>
stevepiercy
left a comment
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.
A couple of minor tweaks and the removal of the Zope section and revision of the parent heading content.
|
|
||
| To enable deprecation warnings, use the `-W` command. | ||
|
|
||
| Given you're using a modern buildout with a virtual environment as recommended, the command would be the following |
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.
| Given you're using a modern buildout with a virtual environment as recommended, the command would be the following | |
| Given you're using a modern buildout with a virtual environment as recommended, the command would be the following. |
|
|
||
| : Warnings are written to `stderr` by default, but `DeprecationWarning` output is surpressed by default. | ||
|
|
||
| Output can be enabled by starting the Python interpreter with the {ref}`-W[all|module|once] <python:using-on-warnings>` argument. |
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.
| Output can be enabled by starting the Python interpreter with the {ref}`-W[all|module|once] <python:using-on-warnings>` argument. | |
| Output can be enabled by starting the Python interpreter with the {ref}`-W[all|module|once] <python:using-on-warnings>` argument. |
|
|
||
| ## Enable deprecation warnings | ||
|
|
||
| This section describes how to enable deprecation warnings in Zope, Python, and tests. |
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.
| This section describes how to enable deprecation warnings in Zope, Python, and tests. | |
| This section describes how to enable deprecation warnings in Python, both in an interpreter and code, and when running tests. |
|
|
||
| ### Zope | ||
|
|
||
| Zope configures logging and warnings, so the steps as described below in {ref}`deprecation-warning-python-label` aren't needed. |
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.
There would be two, one for Python and the other for running tests.
| ### Zope | ||
|
|
||
| Zope configures logging and warnings, so the steps as described below in {ref}`deprecation-warning-python-label` aren't needed. | ||
|
|
||
| Using `plone.recipe.zope2instance`, add the option `deprecation-warnings = on` to the buildout's `[instance]` section. | ||
|
|
||
| ```cfg | ||
| [buildout] | ||
| parts = instance | ||
|
|
||
| [instance] | ||
| recipe = plone.recipe.zope2instance | ||
| # … | ||
| deprecation-warnings = on | ||
| # … | ||
| ``` | ||
|
|
||
| This adds the following line to the {file}`zope.conf` file. | ||
|
|
||
| ```cfg | ||
| debug-mode on | ||
| ``` | ||
|
|
||
| Without the recipe, this can be set manually as well. | ||
| In {file}`zope.conf`, define custom filters for warnings, such as the following example. | ||
|
|
||
| ```xml | ||
| <warnfilter> | ||
| action always | ||
| category exceptions.DeprecationWarning | ||
| </warnfilter> | ||
| ``` |
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.
Per @mauritsvanrees's suggestion.
| ### Zope | |
| Zope configures logging and warnings, so the steps as described below in {ref}`deprecation-warning-python-label` aren't needed. | |
| Using `plone.recipe.zope2instance`, add the option `deprecation-warnings = on` to the buildout's `[instance]` section. | |
| ```cfg | |
| [buildout] | |
| parts = instance | |
| [instance] | |
| recipe = plone.recipe.zope2instance | |
| # … | |
| deprecation-warnings = on | |
| # … | |
| ``` | |
| This adds the following line to the {file}`zope.conf` file. | |
| ```cfg | |
| debug-mode on | |
| ``` | |
| Without the recipe, this can be set manually as well. | |
| In {file}`zope.conf`, define custom filters for warnings, such as the following example. | |
| ```xml | |
| <warnfilter> | |
| action always | |
| category exceptions.DeprecationWarning | |
| </warnfilter> | |
| ``` |
First-time contributors
You must read and follow our First-time contributors.
Submit a pull request
Thank you for your contribution to the Plone Documentation.
Before submitting this pull request, please make sure you follow our guides:
Issue number
Description
Write a description of the fixes or improvements.
Add screenshots or links to a preview of the changes
📚 Documentation preview 📚: