-
-
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
TypeError: Protocols cannot be instantiated #1332
Comments
I am experiencing the same issue since upgrading to GitPython 3.1.20 and Python 3.9.7. Downgrading GitPython to 3.1.18 fixed it for me. This could be related to bc37d15 |
I got this error with Python 3.9.7 Using GitPython 3.1.20 |
Hi, |
gitpython-developers/GitPython#1332 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
gitpython-3.1.20 (imported via Kapitan 0.30.0rc0) triggers a regression in Python 3.9.7, with errors like ``` simon@wyvern:~/work/syn/commodore $ poetry run commodore component new test Adding component test... Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/simon/work/syn/commodore/commodore/cli.py", line 327, in main commodore.main(prog_name="commodore", auto_envvar_prefix="COMMODORE") File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/work/syn/commodore/commodore/cli.py", line 264, in component_new f.create() File "/home/simon/work/syn/commodore/commodore/component/template.py", line 100, in create git.commit(repo, "Initial commit", self.config) File "/home/simon/work/syn/commodore/commodore/git.py", line 230, in commit repo.index.commit(commit_message, author=author, committer=author) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 1000, in commit tree = self.write_tree() File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 574, in write_tree root_tree = Tree(self.repo, binsha, path='') File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/tree.py", line 215, in __init__ super(Tree, self).__init__(repo, binsha, mode, path) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 168, in __init__ super(IndexObject, self).__init__(repo, binsha) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 56, in __init__ super(Object, self).__init__() File "/usr/lib/python3.9/typing.py", line 1083, in _no_init raise TypeError('Protocols cannot be instantiated') TypeError: Protocols cannot be instantiated ``` This issue has been reported in gitpython-developers/GitPython#1332 and should be fixed with a workaround in the next release of gitpython. Additionally, the regression should be fixed in the next Python 3.9 patch release, cf. https://bugs.python.org/issue45121
gitpython-3.1.20 (imported via Kapitan 0.30.0rc0) triggers a regression in Python 3.9.7, with errors like ``` simon@wyvern:~/work/syn/commodore $ poetry run commodore component new test Adding component test... Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/simon/work/syn/commodore/commodore/cli.py", line 327, in main commodore.main(prog_name="commodore", auto_envvar_prefix="COMMODORE") File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/work/syn/commodore/commodore/cli.py", line 264, in component_new f.create() File "/home/simon/work/syn/commodore/commodore/component/template.py", line 100, in create git.commit(repo, "Initial commit", self.config) File "/home/simon/work/syn/commodore/commodore/git.py", line 230, in commit repo.index.commit(commit_message, author=author, committer=author) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 1000, in commit tree = self.write_tree() File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 574, in write_tree root_tree = Tree(self.repo, binsha, path='') File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/tree.py", line 215, in __init__ super(Tree, self).__init__(repo, binsha, mode, path) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 168, in __init__ super(IndexObject, self).__init__(repo, binsha) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 56, in __init__ super(Object, self).__init__() File "/usr/lib/python3.9/typing.py", line 1083, in _no_init raise TypeError('Protocols cannot be instantiated') TypeError: Protocols cannot be instantiated ``` This issue has been reported in gitpython-developers/GitPython#1332 and should be fixed with a workaround in the next release of gitpython. Additionally, the regression should be fixed in the next Python 3.9 patch release, cf. https://bugs.python.org/issue45121
gitpython-3.1.20 (imported via Kapitan 0.30.0rc0) triggers a regression in Python 3.9.7, with errors like ``` simon@wyvern:~/work/syn/commodore $ poetry run commodore component new test Adding component test... Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/simon/work/syn/commodore/commodore/cli.py", line 327, in main commodore.main(prog_name="commodore", auto_envvar_prefix="COMMODORE") File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/work/syn/commodore/commodore/cli.py", line 264, in component_new f.create() File "/home/simon/work/syn/commodore/commodore/component/template.py", line 100, in create git.commit(repo, "Initial commit", self.config) File "/home/simon/work/syn/commodore/commodore/git.py", line 230, in commit repo.index.commit(commit_message, author=author, committer=author) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 1000, in commit tree = self.write_tree() File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 574, in write_tree root_tree = Tree(self.repo, binsha, path='') File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/tree.py", line 215, in __init__ super(Tree, self).__init__(repo, binsha, mode, path) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 168, in __init__ super(IndexObject, self).__init__(repo, binsha) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 56, in __init__ super(Object, self).__init__() File "/usr/lib/python3.9/typing.py", line 1083, in _no_init raise TypeError('Protocols cannot be instantiated') TypeError: Protocols cannot be instantiated ``` This issue has been reported in gitpython-developers/GitPython#1332 and should be fixed with a workaround in the next release of gitpython. Additionally, the regression should be fixed in the next Python 3.9 patch release, cf. https://bugs.python.org/issue45121
gitpython-3.1.20 (imported via Kapitan 0.30.0rc0) triggers a regression in Python 3.9.7, with errors like ``` simon@wyvern:~/work/syn/commodore $ poetry run commodore component new test Adding component test... Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/simon/work/syn/commodore/commodore/cli.py", line 327, in main commodore.main(prog_name="commodore", auto_envvar_prefix="COMMODORE") File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/work/syn/commodore/commodore/cli.py", line 264, in component_new f.create() File "/home/simon/work/syn/commodore/commodore/component/template.py", line 100, in create git.commit(repo, "Initial commit", self.config) File "/home/simon/work/syn/commodore/commodore/git.py", line 230, in commit repo.index.commit(commit_message, author=author, committer=author) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 1000, in commit tree = self.write_tree() File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 574, in write_tree root_tree = Tree(self.repo, binsha, path='') File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/tree.py", line 215, in __init__ super(Tree, self).__init__(repo, binsha, mode, path) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 168, in __init__ super(IndexObject, self).__init__(repo, binsha) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 56, in __init__ super(Object, self).__init__() File "/usr/lib/python3.9/typing.py", line 1083, in _no_init raise TypeError('Protocols cannot be instantiated') TypeError: Protocols cannot be instantiated ``` This issue has been reported in gitpython-developers/GitPython#1332 and should be fixed with a workaround in the next release of gitpython. Additionally, the regression should be fixed in the next Python 3.9 patch release, cf. https://bugs.python.org/issue45121
gitpython-3.1.20 (imported via Kapitan 0.30.0rc0) triggers a regression in Python 3.9.7, with errors like ``` simon@wyvern:~/work/syn/commodore $ poetry run commodore component new test Adding component test... Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/simon/work/syn/commodore/commodore/cli.py", line 327, in main commodore.main(prog_name="commodore", auto_envvar_prefix="COMMODORE") File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/work/syn/commodore/commodore/cli.py", line 264, in component_new f.create() File "/home/simon/work/syn/commodore/commodore/component/template.py", line 100, in create git.commit(repo, "Initial commit", self.config) File "/home/simon/work/syn/commodore/commodore/git.py", line 230, in commit repo.index.commit(commit_message, author=author, committer=author) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 1000, in commit tree = self.write_tree() File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 574, in write_tree root_tree = Tree(self.repo, binsha, path='') File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/tree.py", line 215, in __init__ super(Tree, self).__init__(repo, binsha, mode, path) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 168, in __init__ super(IndexObject, self).__init__(repo, binsha) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 56, in __init__ super(Object, self).__init__() File "/usr/lib/python3.9/typing.py", line 1083, in _no_init raise TypeError('Protocols cannot be instantiated') TypeError: Protocols cannot be instantiated ``` This issue has been reported in gitpython-developers/GitPython#1332 and should be fixed with a workaround in the next release of gitpython. Additionally, the regression should be fixed in the next Python 3.9 patch release, cf. https://bugs.python.org/issue45121
gitpython-3.1.20 (imported via Kapitan 0.30.0rc0) triggers a regression in Python 3.9.7, with errors like ``` simon@wyvern:~/work/syn/commodore $ poetry run commodore component new test Adding component test... Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/simon/work/syn/commodore/commodore/cli.py", line 327, in main commodore.main(prog_name="commodore", auto_envvar_prefix="COMMODORE") File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/work/syn/commodore/commodore/cli.py", line 264, in component_new f.create() File "/home/simon/work/syn/commodore/commodore/component/template.py", line 100, in create git.commit(repo, "Initial commit", self.config) File "/home/simon/work/syn/commodore/commodore/git.py", line 230, in commit repo.index.commit(commit_message, author=author, committer=author) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 1000, in commit tree = self.write_tree() File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 574, in write_tree root_tree = Tree(self.repo, binsha, path='') File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/tree.py", line 215, in __init__ super(Tree, self).__init__(repo, binsha, mode, path) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 168, in __init__ super(IndexObject, self).__init__(repo, binsha) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 56, in __init__ super(Object, self).__init__() File "/usr/lib/python3.9/typing.py", line 1083, in _no_init raise TypeError('Protocols cannot be instantiated') TypeError: Protocols cannot be instantiated ``` This issue has been reported in gitpython-developers/GitPython#1332 and should be fixed with a workaround in the next release of gitpython. Additionally, the regression should be fixed in the next Python 3.9 patch release, cf. https://bugs.python.org/issue45121
gitpython-3.1.20 (imported via Kapitan 0.30.0rc0) triggers a regression in Python 3.9.7, with errors like ``` simon@wyvern:~/work/syn/commodore $ poetry run commodore component new test Adding component test... Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/simon/work/syn/commodore/commodore/cli.py", line 327, in main commodore.main(prog_name="commodore", auto_envvar_prefix="COMMODORE") File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/work/syn/commodore/commodore/cli.py", line 264, in component_new f.create() File "/home/simon/work/syn/commodore/commodore/component/template.py", line 100, in create git.commit(repo, "Initial commit", self.config) File "/home/simon/work/syn/commodore/commodore/git.py", line 230, in commit repo.index.commit(commit_message, author=author, committer=author) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 1000, in commit tree = self.write_tree() File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 574, in write_tree root_tree = Tree(self.repo, binsha, path='') File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/tree.py", line 215, in __init__ super(Tree, self).__init__(repo, binsha, mode, path) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 168, in __init__ super(IndexObject, self).__init__(repo, binsha) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 56, in __init__ super(Object, self).__init__() File "/usr/lib/python3.9/typing.py", line 1083, in _no_init raise TypeError('Protocols cannot be instantiated') TypeError: Protocols cannot be instantiated ``` This issue has been reported in gitpython-developers/GitPython#1332 and should be fixed with a workaround in the next release of gitpython. Additionally, the regression should be fixed in the next Python 3.9 patch release, cf. https://bugs.python.org/issue45121
gitpython-3.1.20 (imported via Kapitan 0.30.0rc0) triggers a regression in Python 3.9.7, with errors like ``` simon@wyvern:~/work/syn/commodore $ poetry run commodore component new test Adding component test... Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/simon/work/syn/commodore/commodore/cli.py", line 327, in main commodore.main(prog_name="commodore", auto_envvar_prefix="COMMODORE") File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/simon/work/syn/commodore/commodore/cli.py", line 264, in component_new f.create() File "/home/simon/work/syn/commodore/commodore/component/template.py", line 100, in create git.commit(repo, "Initial commit", self.config) File "/home/simon/work/syn/commodore/commodore/git.py", line 230, in commit repo.index.commit(commit_message, author=author, committer=author) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 1000, in commit tree = self.write_tree() File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/index/base.py", line 574, in write_tree root_tree = Tree(self.repo, binsha, path='') File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/tree.py", line 215, in __init__ super(Tree, self).__init__(repo, binsha, mode, path) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 168, in __init__ super(IndexObject, self).__init__(repo, binsha) File "/home/simon/.cache/pypoetry/virtualenvs/syn-commodore-mfZDsTMQ-py3.9/lib/python3.9/site-packages/git/objects/base.py", line 56, in __init__ super(Object, self).__init__() File "/usr/lib/python3.9/typing.py", line 1083, in _no_init raise TypeError('Protocols cannot be instantiated') TypeError: Protocols cannot be instantiated ``` This issue has been reported in gitpython-developers/GitPython#1332 and should be fixed with a workaround in the next release of gitpython. Additionally, the regression should be fixed in the next Python 3.9 patch release, cf. https://bugs.python.org/issue45121
I had the same issue using @Yobmod can we close this? |
I am having a issue with getting the date from a git commit. I keep getting this error:
I get this error with the python 3.9 in docker. Using version 3.1.20 of GitPython.
The text was updated successfully, but these errors were encountered: