Improve PythonFdWrapper class#1846
Merged
BareosBot merged 3 commits intobareos:masterfrom Jul 10, 2024
Merged
Conversation
sebsura
reviewed
Jun 6, 2024
Member
Author
|
The new exception handling is not wanted/required, but all the other improvements should be merged. |
8a3d68e to
1abd35d
Compare
Member
Author
|
I made it so that all functions bubble up their exceptions, even if they didn't do that previously. i.e. we had exception handling in |
5fd3a33 to
c0de743
Compare
The wrappers won't catch any exceptions, but will let python-fd's error handler take care of them. Previously this was a bit unclear as load_bareos_plugin() did handle exceptions, but the other wrapper functions did not. We now declare what names will be exported to consuming plugins. This ensures we can change the implementation as long as we don't break the API. This also ensures that we don't leak implementation details into the plugins using the wrapper. improve compliance with pylint. Some warnings can only be ignored. Especially naming issues in the API are not fixable in a backwards-compatible manner.
We currently have "bugfix" and "bug" as labels in the Bareos project. The "bugfix" label was added for PRs that fix a bug. However, since we started using issues we also have the "bug" label for issues that descibe a bug. We should probably use "bug" for everything, but for that pr-tool needs to accept "bug" as an alias for "bugfix" when generating changelog records.
a1b37bf to
0851a7d
Compare
This file contains hidden or 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
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 PR tries to improve the PythonFdWrapper.
With these changes applied
from PythonFdWrapper import *will now only import some of the namesPlease check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-toolto have some simple automated checks run and a proper changelog record added.General
Required backport PRs have been createdSource code quality