-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add jbotDeprecated directive with dictionary as single argument. #20
Merged
Conversation
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
71fda0c
to
9b10d7b
Compare
This can be used when you move templates and want an existing jbot override for the old template path to still work. Example: * You move `old_package/test.pt` to `new_package/test.pt`. * You register a dictionary with: `{"old_package.test.pt": "new_package.test.pt"}` * If a third party package has a template override `old_package.test.pt`, we display a warning that the package should use `new_package.test.pt`. * The override with the old name still works: instead of `new_package/test.pt`, the override is used. * Of course an override with the new name works as well. Sample warning for a template that is moved from plone.app.layout to plone.classicui: UserWarning: Template /Users/maurits/zeelandia/plone60/src/zeelandia.theme/src/zeelandia/theme/browser/overrides/plone.app.layout.viewlets.searchbox.pt deprecated, use plone.classicui.viewlets.searchbox.pt For background, see plone/plone.classicui#7
9b10d7b
to
06db058
Compare
…plates-directives/tests Add tests to the deprecation feature
Pull Request Test Coverage Report for Build 13259735283Details
💛 - Coveralls |
…plates-directives/feature Add a ``jbot-deprecations`` ZCML feature to conditionally set depreca…
And remove a comment on how to enable Chameleon: that is out of scope for z3c.jbot. Anyone wanting to use this, will have configured this correctly years ago.
@ale-rt I have added documentation but I did not test it. Probably I made some mistakes. Leaving for dinner now. ;-) |
…plates-directives/rst Fix rst syntax
Thanks! |
This was referenced Feb 11, 2025
First we must load all deprecation dicts, and only afterwards register the overrides.
Ready for review now. |
ale-rt
approved these changes
Feb 11, 2025
2 tasks
I just released https://pypi.org/project/z3c.jbot/2.2/. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This can be used when you move templates and want an existing jbot override for the old template path to still work.
Example:
old_package/test.pt
tonew_package/test.pt
.{"old_package.test.pt": "new_package.test.pt"}
old_package.test.pt
, we display a warning that the package should usenew_package.test.pt
.new_package/test.pt
, the override is used.Sample warning for a template that is moved from plone.app.layout to plone.classicui:
UserWarning: Template /Users/maurits/zeelandia/plone60/src/zeelandia.theme/src/zeelandia/theme/browser/overrides/plone.app.layout.viewlets.searchbox.pt deprecated, use plone.classicui.viewlets.searchbox.pt
For background, see plone/plone.classicui#7
This works for me when I try it out, but it would be better to have tests, so I made this a draft PR.