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

Remove support for Python 3.8 #4212

Merged
merged 6 commits into from
Oct 8, 2024

Conversation

kevin1kevin1k
Copy link
Contributor

Description

This fixes #4115.
Support for Python 3.8 will be removed and 3.9+ will be required.

Development notes

Most syntactical changes in Python files are automatically applied by find . -name "*.py" -print0 | xargs -0 pyupgrade --py39-plus.
Other changes are done manually, with the references from the previous issue #2158 and PR #3060 for dropping 3.7

Developer Certificate of Origin

We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a Signed-off-by line in the commit message. See our wiki for guidance.

If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.

Checklist

  • Read the contributing guidelines
  • Signed off each commit with a Developer Certificate of Origin (DCO)
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes
  • Checked if this change will affect Kedro-Viz, and if so, communicated that with the Viz team

@deepyaman
Copy link
Member

Don't worry about the docs failure! It should be fixed once #4209 goes in.

@deepyaman
Copy link
Member

Looks great! The unused imports do need to be removed, though. --unsafe-fixes may be good enough; just watch to make sure it doesn't do something dumb. :P

Signed-off-by: kevin1kevin1k <kevin1kevin1k@gmail.com>
@kevin1kevin1k
Copy link
Contributor Author

Looks great! The unused imports do need to be removed, though. --unsafe-fixes may be good enough; just watch to make sure it doesn't do something dumb. :P

That's a sharp catch 👀! I just noticed that I didn't install and run the pre-commit so it was not caught by ruff. After running them the unused imports (along with some deprecated stuff, such as UP035 typing.AbstractSet -> collections.abc.Set) are resolved.

@kevin1kevin1k
Copy link
Contributor Author

kevin1kevin1k commented Oct 7, 2024

By the way I just manually resolved the ruff errors that look like the following.

TCH003 Move standard library import `collections.OrderedDict` into a type-checking block

Can these be configured to fix automatically as well?

Copy link
Member

@merelcht merelcht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @kevin1kevin1k and congrats on your first Kedro PR! ⭐ 🔶

I've left some minor comments, but they're all non-blocking.

docs/source/index.rst Outdated Show resolved Hide resolved
RELEASE.md Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
@merelcht merelcht added the Hacktoberfest Issue suitable for hacktoberfest label Oct 7, 2024
Copy link
Contributor

@ankatiyar ankatiyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kevin1kevin1k! 💯

Signed-off-by: kevin1kevin1k <kevin1kevin1k@gmail.com>
Signed-off-by: kevin1kevin1k <kevin1kevin1k@gmail.com>
@kevin1kevin1k
Copy link
Contributor Author

By the way, the typing changes are mainly due to https://peps.python.org/pep-0585/ in case anyone is curious.

@merelcht merelcht merged commit 4fa311b into kedro-org:main Oct 8, 2024
32 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest Issue suitable for hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove support for Python 3.8
5 participants