Fix AWS git-remote-codecommit SyntaxWarning / Namespace cli_binary_format
Switching from the workaround for the OSX credential Helper 403 Error I tried the AWS git credential helper and could not got it working without fixing some problems.
The Problem
After the installation with brew install git-remote-codecommit
using git will throw the following warnings:
1$ git pull2/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:32: SyntaxWarning: “is” with a literal. Did you mean “==”?3if x is 0 or x is 1:4/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:32: SyntaxWarning: “is” with a literal. Did you mean “==”?5if x is 0 or x is 1:6/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:34: SyntaxWarning: “is” with a literal. Did you mean “==”?7elif y is 0 or y is 1:8/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:34: SyntaxWarning: “is” with a literal. Did you mean “==”?9elif y is 0 or y is 1:10/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:260: SyntaxWarning: “is” with a literal. Did you mean “==”?11if original_result is 0:12‘Namespace’ object has no attribute ‘cli_binary_format’13Already up to date.
The problem is related to the outdated versions of jmespath
and awscli
bundled with git-remote-codecommit
.
The Fix
will be fixed when this pull request gets merged: https://github.com/Homebrew/homebrew-core/pull/52424
1sudo cp -rp /usr/local/Cellar/awscli/2.0.10/libexec/lib/python3.8/site-packages/awscli /usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages2sudo cp -rp /usr/local/Cellar/awscli/2.0.10/libexec/lib/python3.8/site-packages/jmespath /usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages
If the copy breaks check your local versions of awscli (2.0.10) and codecommit (1.13) and adapt the path to your enviroment.