From d2fe00f06ad7b747052e9a43e95e491962816081 Mon Sep 17 00:00:00 2001 From: 27piyus <146543004+27piyus@users.noreply.github.com> Date: Thu, 28 Nov 2024 08:27:41 +0000 Subject: [PATCH] Main Hopefully, this will help improve the quality of new-contirbutor pull requests to this project. This pull request addresses the issue with the importlib-metadata dependency in the zulip_bots project. The dependency was missing for Python >= 3.10, causing import errors. I have updated the setup.py file to ensure that the importlib-metadata package is conditionally included for Python versions < 3.10, ensuring compatibility. Fixes: This PR fixes the issue #829, where importlib_metadata was being imported in Python >= 3.10 without being listed as a required dependency. No visual changes were made. The functionality was tested by running the bot with Python 3.10, and the error no longer occurs.
Self-review checklist - [ ] [Self-reviewed](https://zulip.readthedocs.io/en/latest/contributing/code-reviewing.html#how-to-review-code) the changes for clarity and maintainability (variable names, code reuse, readability, etc.). Communicate decisions, questions, and potential concerns. - [ ] Explains differences from previous plans (e.g., issue description). - [ ] Highlights technical choices and bugs encountered. - [ ] Calls out remaining decisions and concerns. - [ ] Automated tests verify logic where appropriate. Individual commits are ready for review (see [commit discipline](https://zulip.readthedocs.io/en/latest/contributing/commit-discipline.html)). - [ ] Each commit is a coherent idea. - [ ] Commit message(s) explain reasoning and motivation for changes. Completed manual review and testing of the following: - [ ] Visual appearance of the changes. - [ ] Responsiveness and internationalization. - [ ] Strings and tooltips. - [ ] End-to-end functionality of buttons, interactions and flows. - [ ] Corner cases, error conditions, and easily imagined bugs.
--- zulip_bots/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zulip_bots/setup.py b/zulip_bots/setup.py index d81a40a12..e682209f9 100644 --- a/zulip_bots/setup.py +++ b/zulip_bots/setup.py @@ -56,7 +56,7 @@ "lxml", "BeautifulSoup4", "typing_extensions>=4.5.0", - 'importlib-metadata >= 3.6; python_version < "3.10"', + "importlib-metadata>=3.6; python_version<'3.10'", # For Python < 3.10 ], packages=find_packages(), package_data=package_data,