-
Notifications
You must be signed in to change notification settings - Fork 9
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 support of Python 3.12 #27
Conversation
@@ -41,8 +42,8 @@ | |||
) | |||
|
|||
install_requires = [ | |||
'aiohttp>3.6.2,<3.9.0', | |||
'requests>=2.24.0,<3.0.0', | |||
'aiohttp~=3.6', |
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.
it is recommended to upgrade to at least version 3.10.5 or higher to ensure compatibility with Python 3.12
-r{toxinidir}/requirements.txt | ||
-r{toxinidir}/tests/requirements.txt | ||
commands = | ||
pylint \ | ||
--disable=E0611,R0801,W0212,W0511,C0103,C0114,C0115,C0116,C0209,R0902,R0903,R0911,R1713 \ | ||
--disable=E0611,R0801,W0212,W0511,C0103,C0114,C0115,C0116,C0209,R0902,R0903,R0911,R0913,R1713 \ |
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.
https://pylint.readthedocs.io/en/latest/user_guide/messages/refactor/too-many-arguments.html
pylint: commands[0]> pylint --disable=E0611,R0801,W0212,W0511,C0103,C0114,C0115,C0116,C0209,R0902,R0903,R0911,R1713 --good-names=e,i,k,v ujenkins tests
************* Module ujenkins.adapters.sync
ujenkins/adapters/sync.py:15:4: R0913: Too many arguments (7/5) (too-many-arguments)
************* Module ujenkins.adapters.aio
ujenkins/adapters/aio.py:58:4: R0913: Too many arguments (7/5) (too-many-arguments)
Hello! Thanks for PR. Without it we have some error on Python 3.12? |
Yes, Python 3.12 requires a newer version of Additionally, the tests fail due to version issues with Pylint and Flake8. Pylint version 3.0 or higher and Flake8 version 6.1.0 or higher are required.
In this pull request, I've updated the versions of several dependencies and made the version specifications more flexible for future Python releases. |
setup.cfg
Outdated
@@ -16,8 +16,8 @@ data_file = .tox/.coverage | |||
|
|||
[testenv:mypy] | |||
deps = | |||
mypy==1.4.* | |||
types-requests==2.28.* | |||
mypy |
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.
Why did you remove versions? It's not okay to not pin dependencies versions
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.
The reason for removing the version pins is to prevent future compatibility issues with upcoming Python releases (e.g., 3.13 or 3.14), similar to the aiohttp
issue we resolved in this PR. The goal is to continue using mypy for type checking over time, rather than being tied to version 1.4.x. Additionally, the current latest mypy version is 1.11.2, and maintaining strict version pins would increase long-term maintenance costs as new releases emerge.
I understand that pinning versions can prevent potential breakage caused by changes in dependencies, as you pointed out. However, this increases the cost of adapting to new environments, so it’s a trade-off. I believe making it easier to adapt to new environments is beneficial for your personal project, but I will follow your decision.
Thank you!
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.
No, all dependencies must be pinned
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.
Understood. In that case, would the following versions be acceptable?
mypy~=1.4
types-requests~=2.28
ruff~=0.6
flake8~=7.1
pylint~=3.3
isort~=5.13
All tests on GitHub Actions have passed with these versions. Let me know if this works for you.
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.
NOTE: the tests fail due to version issues with Pylint and Flake8. Pylint version 3.0 or higher and Flake8 version 6.1.0 or higher are required.
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.
Okay, please update PR
Thank you for merging the PR! One last note: Best regards. |
Okay, thanks, but we will merge it after October. |
No description provided.