Open bhogan125 opened 3 years ago
contextlib2 sets python_requires: https://github.com/jazzband/contextlib2/blob/0828b5a3322a148de8fdaf7443fefda983e7e9c8/setup.py#L10
you probably need to do pip install pip-with-requires-python
before installing raven
Environment
Python2.7 environment that imports raven
Steps to Reproduce
This stems from https://github.com/getsentry/raven-python/blob/master/setup.py#L133 . That version specification for contextlib2 no longer works since contextlib2 released a new version on June 27th, 2021 which is tagged as supporting python3, and raven just checks for a version that supports anything less than python 3.2. This should be updated to either hardcode the last contextlib2 version (0.6.0.post1), or by specifying any version that supports < python 3
Expected Result
I expected raven to be installed correctly via pip in a python2.7 environment and to be able to import and use raven as normal.
This is for work and we are trying to migrate off this environment, but can't for the foreseeable future.
Actual Result
Workarounds
In any project that depends on raven, just set contextlib2==0.6.0.post1 in your requirements file to guarantee you get a python2 compatible version