Open
Conversation
Update herald.py for Python 3.11 with modern dependencies.
Upgrade gevent to version 23.9 and pyyaml to version 6.0 in the install_requires section of setup.py.
This commit adds the .idea/.gitignore file with the following ignored files: - /shelf/ - /workspace.xml
Transforms herald in an executable module. Must run using -m option of the Python 3 interpreter. The plugins directory is no longer a module since plugins just Python scripts which import herald module herald.baseplugin. © CalCool Studios SAS 2021-2023
🐛 fix(herald): Fix typo in error message 🎨 style(herald): Remove unused imports 🎨 style(herald): Remove commented code 🐛 fix(baseplugin): Fix typo in assertion message 🚧 chore(herald): Add logger.info() statement 📝 docs(herald): Add missing docstring 🐛 fix(httpplugin): Replace urllib2 with requests 📝 docs(httpplugin): Add missing docstring 🐛 fix(example_config): Fix typo in thresholds_metric ✨ feat(example_config): Add new plugin configuration
…nder debugger. Refactor the codebase in the `herald.py`, `baseplugin.py`, `httpplugin.py`, and `__main__.py` files to remove unused imports.
Contributor
|
Hi @lepeuvedic, thank you for your contribution. I no longer have write access to this repository, I've asked the org to review and accept the PR. |
|
@lepeuvedic I would suggest excluding the |
ghoseb
reviewed
Sep 24, 2023
|
|
||
|
|
||
|
|
||
| Created on 23/09/2023 |
There was a problem hiding this comment.
I would suggest removing this boilerplate comment.
|
@lepeuvedic I can see that you have added the This is one of the commits that needs to be undone - 8022f8c |
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.
The update replaces urllib2 with requests, eliminates the last remnants of Python 2 syntax and more cleanly defines herald as an executable Python module, using a new main.py entry point. The recommended way to launch herald is with the -m option to python3.
The clean up defines the plugins as independent user-defined Python modules, which do not need to reside in the herald file hierarchy (herald never relied on that anyway, since the plugins location is configurable).
The new version runs with Python 3.11, but should run with most versions of Python 3. It still uses gevent.