Upgrade Python version and some of its packages#549
Upgrade Python version and some of its packages#549camilamaia merged 15 commits intoscanapi:mainfrom
Conversation
The end of life for the Python 3.6 was in december 2021, so I think it's the right time to drop support for this version
There was a problem hiding this comment.
Thank you for supporting ScanAPI, and congratulations on your first contribution! A project committer will shortly review your contribution.
In the mean time, if you haven't had a chance please skim over the First Pull Request Guide which all pull requests must adhere to.
We hope to see you around!
|
Also, I'm not sure if I added the changelog entries correctly. Please correct me if I'm wrong |
For some reason after making the change to the yaml.serialize to include the encoding keyword explicitly, black started failing with the message ImportError: cannot import name '_unicodefun' from 'click'. Found this solution in SO: https://stackoverflow.com/a/71674345/3716354 which involved upgrading black. However, in order to upgrade it I would need to upgrade click, which would need to upgrade gitlint. After upgrading black, it required pre-commit to be upgraded as well. So that's why we have more package upgrades in the following order: gitlint > click > black > pre-commit
…encies contain cyclic dependencies
|
This last commit that upgrades Poetry to version |
Co-authored-by: Camila Maia <[email protected]>
camilamaia
left a comment
There was a problem hiding this comment.
Hey @mazulo thank you very much for the PR!! 🙇♀️🙇♀️ It contains really important changes that we were needing ASAP. Thank you again!
|
Congrats on your first merged PR! 🌟 Thank you very much! I am going to send you an invite to join the ScanAPI org on GitHub 🚀 We invite everyone that has contributed with a merged PR in any of our repositories. Here you can check our Contributing Guidelines so you can understand better how it works. Check your email/GitHub notifications to find the invite. If you accept it, you will also be able to clone directly our repositories, without needing to fork them. Welcome on board and once again, thank you! 🙇♀️ |
* BREAKING CHANGE: Upgrade the minimal Python version in pyproject.toml The end of life for the Python 3.6 was in december 2021, so I think it's the right time to drop support for this version * feat: Upgrade PyYAML and types-PyYAML packages * feat: Upgrade Jinja to the latest version * chore: Updates changelog with the appropriate changes * fix: Upgrade Python version in github workflows * feat: Upgrade black, click and gitlint versions (more info below) For some reason after making the change to the yaml.serialize to include the encoding keyword explicitly, black started failing with the message ImportError: cannot import name '_unicodefun' from 'click'. Found this solution in SO: https://stackoverflow.com/a/71674345/3716354 which involved upgrading black. However, in order to upgrade it I would need to upgrade click, which would need to upgrade gitlint. After upgrading black, it required pre-commit to be upgraded as well. So that's why we have more package upgrades in the following order: gitlint > click > black > pre-commit * Update black rev in .pre-commit-config.yaml * fix: pass encoding keyword explicitly in yaml.serialize function * fix: Upgrade Poetry version to 1.1.3 to fix maximum recursion error * fix: Upgrade Poetry version to fix recursion error * fix: Upgrade Poetry version in GitHub action files (now for good) * chore: Run black to reformat some files * chore: Upgrade mypy to the latest version * fix: Remove encoding from yaml.serialize call * chore: Update CHANGELOG.md Co-authored-by: Camila Maia <[email protected]> Co-authored-by: Camila Maia <[email protected]>
Description
Upgrades the minimal Python version required for the project as well as upgrades PyYAML and Jinja2, which should close #546.
Motivation behind this PR?
The current dependencies were locked to older versions of some packages (e.g. PYYAML (6.0) and jinja2 (3.1.x)) as well as the Python 3.6 version, which reached its end of life in December last year, what makes it not receive any other security upgrade.
What type of change is this?
>=3.7.13PyYAML = "~6.0"Jinja2 = "~3.1.0"click = "8.0.3"In dev
black = "22.3.0"(after this change, it was needed to runmake formatin the codebase)pre-commit = "2.9.2"mypy = "^0.960"types-PyYAML = "~6.0.0"gitlint = "0.17.0"Also, we're upgrading the Poetry version in the GitHub workflow files as well as the Python version.
Checklist
Issue
Closes #546
It's my first contribution so I might have done something wrong. If that's the case I'm sorry for the trouble and I'm totally open for feedback! 😄