Skip to content
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

[Chore] Introduce Python 3.12 #346

Merged
merged 4 commits into from
Mar 23, 2024

Conversation

nautics889
Copy link
Contributor

@nautics889 nautics889 commented Mar 22, 2024

It feels like it's time to add support for Python 3.12.
Updated pyproject.toml, updated pythonapp.yml slightly, generate new poetry lock-file.

Maybe it's also worth considering what dependabot suggested recently.


  • (chore): update 'classifiers' in pyproject.toml, add python 3.12
  • (chore): update 'target-version' for 'tool.black' in pyproject.toml, add python 3.12
  • (chore): add 3.12 python-version for strategy matrix of ci-jobs in pythonapp.yml

* (chore): update 'classifiers' in pyproject.toml, add python 3.12
* (chore): update 'target-version' for 'tool.black' in pyproject.toml,
  add python 3.12
* (chore): add 3.12 python-version for strategy matrix of ci-jobs in
  pythonapp.yml
* (fix): add conditional installation of black ">=23.12.0" if it's
  python 3.12
* (fix): remove 'py312' from the black's 'target-version' list
* (chore): add 'additional_dependencies' for several hooks
@nautics889
Copy link
Contributor Author

Several CI-jobs were failed as you can see from above, this was caused by multiple reasons.

  1. Hooks 'nbqa-black', 'nbqa-pyupgrade', 'nbqa-isort' kept failing untill I specified additional_dependencies.
Traceback.
File "C:\Users\<my_home_dir>\.cache\pre-commit\repolax5e6sq\py_env-python3.12\Lib\site-packages\nbqa\__main__.py", line 28, in <module>
from pkg_resources import parse_version ModuleNotFoundError: No module named 'pkg_resources'
  1. Couldn't leave 'py312' in tool.black's 'target-version', since current implementation of CI tries to execute black --target-version py312 while running tests even for Python 3.7, and consequently fails (cause there can't be installed such version of black which would support --target-version py312). Therefore I suggest leave it the way it works now, the problem gonna disappear after dropping support for old version of Python.

@nautics889 nautics889 marked this pull request as ready for review March 22, 2024 21:53
@upbit upbit merged commit 3273654 into upbit:master Mar 23, 2024
2 checks passed
@upbit
Copy link
Owner

upbit commented Mar 23, 2024

Thanks for contribution! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants