🐞 electionguard-python fails to install dependencies
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
When trying to install and use electionguard-python, there is an error when trying to install dependencies.
When running make install the following output is being presented:
🔧 INSTALL
poetry install
Installing dependencies from lock file
Package operations: 131 installs, 0 updates, 0 removals
• Installing attrs (21.4.0): Failed
AttributeError
'HTTPResponse' object has no attribute 'strict'
at ~/.pyenv/versions/3.9.16/lib/python3.9/site-packages/cachecontrol/serialize.py:54 in dumps
50│ ),
51│ u"status": response.status,
52│ u"version": response.version,
53│ u"reason": text_type(response.reason),
→ 54│ u"strict": response.strict,
55│ u"decode_content": response.decode_content,
56│ }
57│ }
58│
• Installing pycparser (2.21): Failed
AttributeError
'HTTPResponse' object has no attribute 'strict'
at ~/.pyenv/versions/3.9.16/lib/python3.9/site-packages/cachecontrol/serialize.py:54 in dumps
50│ ),
51│ u"status": response.status,
52│ u"version": response.version,
53│ u"reason": text_type(response.reason),
→ 54│ u"strict": response.strict,
55│ u"decode_content": response.decode_content,
56│ }
57│ }
58│
• Installing pyrsistent (0.18.1): Failed
AttributeError
'HTTPResponse' object has no attribute 'strict'
at ~/.pyenv/versions/3.9.16/lib/python3.9/site-packages/cachecontrol/serialize.py:54 in dumps
50│ ),
51│ u"status": response.status,
52│ u"version": response.version,
53│ u"reason": text_type(response.reason),
→ 54│ u"strict": response.strict,
55│ u"decode_content": response.decode_content,
56│ }
57│ }
58│
• Installing six (1.16.0): Failed
TypeError
__init__() got an unexpected keyword argument 'strict'
at ~/.pyenv/versions/3.9.16/lib/python3.9/site-packages/cachecontrol/serialize.py:141 in prepare_response
137│ #
138│ # TypeError: 'str' does not support the buffer interface
139│ body = io.BytesIO(body_raw.encode("utf8"))
140│
→ 141│ return HTTPResponse(body=body, preload_content=False, **cached["response"])
142│
143│ def _loads_v0(self, request, data, body_file=None):
144│ # The original legacy cache data. This doesn't contain enough
145│ # information to construct everything we need, so we'll treat this as
• Installing traitlets (5.1.1): Failed
AttributeError
'HTTPResponse' object has no attribute 'strict'
at ~/.pyenv/versions/3.9.16/lib/python3.9/site-packages/cachecontrol/serialize.py:54 in dumps
50│ ),
51│ u"status": response.status,
52│ u"version": response.version,
53│ u"reason": text_type(response.reason),
→ 54│ u"strict": response.strict,
55│ u"decode_content": response.decode_content,
56│ }
57│ }
58│
• Installing zipp (3.8.0): Failed
AttributeError
'HTTPResponse' object has no attribute 'strict'
at ~/.pyenv/versions/3.9.16/lib/python3.9/site-packages/cachecontrol/serialize.py:54 in dumps
50│ ),
51│ u"status": response.status,
52│ u"version": response.version,
53│ u"reason": text_type(response.reason),
→ 54│ u"strict": response.strict,
55│ u"decode_content": response.decode_content,
56│ }
57│ }
58│
make: *** [Makefile:25: install] Error 1
Expected Behavior
running make environment && make install should be successful.
Steps To Reproduce
No response
Environment
- OS: Ubuntu 22.04
Anything else?
Solution proposed by https://github.com/ionrock/cachecontrol/issues/292 is to upgrade poetry version to 1.4.2
I have tested locally, and works as expected. The line needed to be changed is: https://github.com/microsoft/electionguard-python/blob/b3ddc2a732f6c5f078a3afbe05b00d632a2ff5e0/Makefile#LL17C2-L17C31
I know this is old, but I got it working in a Debian Docker container using dependency versions that were current when it was published. The only thing I updated was poetry to 1.1.14.