-
Notifications
You must be signed in to change notification settings - Fork 7
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
Update for Python 3 #5
base: master
Are you sure you want to change the base?
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.
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 |
herald/__main__.py
Outdated
|
||
|
||
|
||
Created on 23/09/2023 |
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 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 |
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.