Election-Tech-Initiative / Election-Tech-Initiative/electionguard-python

🐞 electionguard-python fails to install dependencies

Open
#799 1 comment 0 reactions 0 assignees View on GitHub
bug triage
Dominant language
Python
Stars
168
Forks
103
PR merge metrics
No merged PRs in 30d

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

When trying to install and use [electionguard-python](https://github.com/microsoft/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

```markdown
- 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.