-
-
Notifications
You must be signed in to change notification settings - Fork 930
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
[tracking] Unbreaking v3.1.15 (yanked) #1223
Comments
I'm not sure how exactly to (quickly) address the lack of completeness of the test-suite. But I've got some thoughts on both the test suite and the process of how these bugs managed to slip in:
About the test suite:
And unfortunately none of this will be an instant guarantee to reduce the amount/severity of bugs that go undetected prior to a release below a certain threshold. At best any of these changes will, over time, slowly start to improve this situation. |
Fantastic, thanks for sharing your thoughts! Here is some my affirmative comments about all of them. General
Good to hear, I will keep doing that.
Agreed, that should have been a red flag, even for myself when I notice I am getting 'sloppy' just to get done with it.
I couldn't agree more. I admit that I didn't even see the changes that weren't related to typing. Furthermore I tend to want to close PRs quickly so try to avoid asking for too many changes especially when I sloppily think 'Nah, it will be fine' :D. It's definitely one of my biases to be aware of. To help with this, I updated the contribution guidelines to especially ask for many small steps, one per commit. Test Suite
This is already part of the contribution guidelines, but I find myself not enforcing it when I think it's hard to write a test for it along with my bias to not try to ask for too many changes to get things merged more quickly. Thus far I could trust the existing test suites, but as always, the devil is in the details.
It's in my very interest to provide a code base that is friendly to contributors, particularly when it comes to running and writing tests. Thus I take your preference as more general truth and hope there is a way to use both test frameworks in the same codebase if that's feasible at all. If you have ideas to reduce the resistance when writing tests I would be more than happy to accept PRs right away. |
In theory, a new release cut be made now, but I would like to explicitly invite @c4xuxo in case they would be able to contribute a failing test to reproduce #1219 so it can be addressed. Doing so would probably mean to either drop python 3.5 support officially or to be more explicit about the patch level required to run this codebase. I will wait a few days for this to settle and then cut a release. |
After your last message I gave #1219 a more detailed look. Seems that's a problem for 3.5, 3.6, 3.7 and 3.8. The code only seems to work with 3.9. |
With #1226 merged we can at least say that mypy is now usable with GitPython, even though there may be other typecheckers that might still not work (and thus break some pipelines out there)? Do you think that's a good basis for cutting a new release, or would you rather wait until more typechecker support was added? |
I've seen things that I'm sure are wrongly annotated types but only in internal code (e.g. the So I think it's a good enough, if a bit ugly, basis for doing a new release. You'll probably want to mention it as a known issue in the change log though. |
Hi all, Thanks for the fix of my mistake. I've been away on work, so not been able to get online until now. I'm hesitant to suggest adding mypy to the CI, as it would force all contributers to type everything or add type ignore comments when mypy cannot check it (as the mypy.ini gets more strict). It could be set up to to use separate, less strict config (ie doesnt require types for all functions etc) than the dev one?
Yep. Mypy and/or pylance complained about anything i put as the return type except Any, hence the ignore and additional comment. Should probably just be TBD, in case mypy improves. Thanks again! |
Thanks for chiming in @Yobmod. It's an interesting situation GitPython is in now as it appears it breaks CIs of users who do use typechecking if its own types fail, which seems to be what this issue is about. Checking our own types means everything written in future needs special annotation to ignore typecheck failures, but on the other hand I'd say this is preferable if it gives the chance of finding genuine bugs. To my mind this is why types were introduced in the first place. My stance here is to do type checking, ideally with all the mainstream checker tools available, and keeps the type system happy knowing that among false positives there are genuine bugs to discover. This keeps users CI's happy, too, at the cost of forcing contributions to deal with it. A cost I am happy to take in the name of the maintainability of this project. An alternative I see is to remove all types and continue without forever which seems like a 180 degree turn.
This seems like middle grounds are possible, and without knowing anything about mypy I'd hope that we can bring something like it to fruition before the next release. |
A new version was released: https://pypi.org/project/GitPython/3.1.16/ . |
3.1.16 * Fix issues from 3.1.15 (see gitpython-developers/GitPython#1223) * Add more static typing information 3.1.15 (YANKED) * add deprectation warning for python 3.5
3.1.17 * Fix issues from 3.1.16 (see gitpython-developers/GitPython#1238) * Fix issues from 3.1.15 (see gitpython-developers/GitPython#1223) * Add more static typing information
With the release of v3.1.15 a few breaking bugs were discovered. This caused yanking the version ~14h later.
Here we collect the kind of breakage and track their fixes to allow for a new release.
Until this issue is resolved no new releases can be made.
Issues
GitCommand missing stderr
- fixed with Fix missing stderr when the progress parameter of _clone is None #1224GitCommand errors are stringifying bytes in 3.1.15
- fixed with Revert compiling GitCommand shell messages #1222Python 3.5 to 3.8 failing with AttributeError: module 'os' has no attribute 'PathLike'
Causes
My reviews aren't good enough and heavily rely heavily on the test-suite to pass. The latter, however, is far from complete, and the lack of static types makes it hard for tooling to expose issues at compile time.
Solutions
Please chime in if you have ideas on how to prevent breaking releases in future.
CC: @muggenhor @jmcgill298
The text was updated successfully, but these errors were encountered: