-
-
Notifications
You must be signed in to change notification settings - Fork 905
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
repo.index.commit fails on python 3.10.0-rc2 (but not 3.10.0-rc1) #1341
Comments
Thanks for reporting. I wouldn't know how to go about this though. Is it a bug in the upcoming python release and thus should be reported there? Or is it a 'breaking-change-in-minor-release' that is justified as bugfix so GitPython should be adjusted? Admittedly, GItPython clearly fell into the OO trap and probably pays for that more than a decade later, so cleaning this up is probably merely paying tech debt (with a lot of accumulated compound interest ;)). |
Yeah, i think this is the same issue with Protocol classes that cropped up a few times. #1332 I have to check if we can just revert to the our original code or it needs a different fix. I might end up just stripping Protocols back out like I did for TypeGuard, until python changes calm down. Either way, we'll need a new GitPython release for py 3.10.0 compat (due Oct 4th). |
Having a similar issue with Python
|
@silvanocerza different stack trace but the same issue as far as I can tell (i.e. triggered by inheritance from |
The issue is not present in Python |
I also got the error in the original post with Python 3.10.0-rc2. But it worked fine with the final release of Python 3.10.0, which I guess explains why this issue hasn't had any activity over the last year. So I think it can be closed. |
This is an excerpt of Hopic's pytest run in the
python:3.10.0rc2-slim
docker image. Withpython:3.10.0rc1-slim
this same error does not occur.I don't have the time right now to fully analyze this. But it looks suspiciously similar to a problem that I observed in Hopic itself and fixed with tomtom-international/hopic@a0f5a93. That one was triggered by this Python change: https://bugs.python.org/issue44806 / python/cpython@2cc19a5.
This if failing in a different location in the same function. But given the CPython commit message it seems to me that it's somehow achieving the opposite of its intent: it looks like non-protocol classes do call the
__init__
method (viasuper
) of the protocol class they inherit from.The text was updated successfully, but these errors were encountered: