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

Declare support for Python 3.11 #1541

Merged
merged 4 commits into from Jan 17, 2023
Merged

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Jan 15, 2023

Add the Trove classifier to declare support for Python 3.11 on PyPI.

Also a few other little changes to setup.py.

Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

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

It looks like f-strings aren't supported consistently, but if the scope could be reduced to just he trove specifier this PR could probably be merged - CI should be green then.

@hugovk
Copy link
Contributor Author

hugovk commented Jan 16, 2023

Hi! I dropped the f-strings commit.

The Flake8 Bugbear warnings also come from files I didn't touch, because the CI is using unpinned versions and B028 is a new check released yesterday:

https://github.com/PyCQA/flake8-bugbear/releases/tag/23.1.14

(I use pre-commit for pinning, running and updating linters.)

@Byron
Copy link
Member

Byron commented Jan 16, 2023

Oh, I see. Not pinning the version here in the GitPython CI has led to unpleasant surprises more than once. Would you be able to adjust the workflow file to install a specific (the previous) version of it and fix CI that way? Maybe the code for that is already present in the hooks you are using.

@hugovk
Copy link
Contributor Author

hugovk commented Jan 16, 2023

Updated to move linting out of the Cygwin and Ubuntu workflows and into a dedicated workflow: this makes it clearer if the CI fails due to linting or a test failure. And there's no need to run linting on every Python version and OS.

To run the linting locally:

# Install the tool
python -m pip install pre-commit

# Lint all the files, only those in Git
pre-commit run --all-files

You can also install it to run when you commit, and it only checks those staged commits. This is entirely optional, the CI will do its checks anyway, and you can run the above commands at any time.

pre-commit install

Then commit as normal, and it will first run the lint. If it find problems, it will stop and halt the commit before completing. You then get to check the problems, make changes, and try the commit again. One benefit is "fail fast", you find errors before pushing.

If you change your mind:

pre-commit uninstall

And can still run manually via pre-commit run --all-files or let the CI deal with it.

Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Thanks so much, this is great, much appreciated work!

I will probably not be the one to ever update the flake8 version number, and if this is something you are interested in doing occasionally, I'd welcome that as well.

@Byron Byron added this to the v3.1.31 - Bugfixes milestone Jan 17, 2023
@Byron Byron merged commit f594266 into gitpython-developers:main Jan 17, 2023
@Byron
Copy link
Member

Byron commented Jan 17, 2023

By the way, I saw on your profile that this quality of work doesn't come from nothing. Is Co-Maintaining GitPython an option for you? I really am not doing a good job as I have not caught up with Python which I stopped using entirely what feels like 10 years ago. Thanks for your consideration.

@hugovk hugovk deleted the add-3.11 branch January 17, 2023 07:31
@hugovk
Copy link
Contributor Author

hugovk commented Jan 17, 2023

Hi, thanks for the offer, however my open-source plate is a little full at the moment.

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

Successfully merging this pull request may close these issues.

None yet

2 participants