Skip to content

Commit c2d7ab4

Browse files
mergify[bot]petriborgbrettlangdon
authored
fix(deps): fix issue with attrs and contextlib2 version constraints for Python 2.7 (backport #4357) (#4382)
* fix(deps): fix issue with attrs and contextlib2 version constraints for Python 2.7 (#4357) ## Description The package attrs 22.0 dropped support for Python 2.7. Also pip gets confused on the conxtextlib2 (backport library) version requirements. ## Motivation While trying to integrate DD with our product (which is legacy python 2.7) these build problems were encountered. ## Testing strategy In python 2.7 virtualenv (which is separated from the internet), run the pip install ddtrace. ## Reviewer Checklist - [x] Title is accurate. - [x] Description motivates each change. - [x] No unnecessary changes were introduced in this PR. - [x] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Tests provided or description of manual testing performed is included in the code or PR. - [x] Release note has been added for fixes and features, or else `changelog/no-changelog` label added. - [x] All relevant GitHub issues are correctly linked. - [x] Backports are identified and tagged with Mergifyio. (cherry picked from commit 8bdafe5) # Conflicts: # setup.py * Update setup.py Co-authored-by: Peter Cooner <[email protected]> Co-authored-by: Brett Langdon <[email protected]>
1 parent ecec783 commit c2d7ab4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
fixes:
3+
- |
4+
Fix issue with ``attrs`` and ``contextlib2`` version constraints for Python 2.7.

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ def get_exts_for(name):
250250
"protobuf>=3,<4.0; python_version=='3.6'",
251251
"protobuf>=3,<3.18; python_version<'3.6'",
252252
"tenacity>=5",
253-
"attrs>=19.2.0",
253+
"attrs>=19.2.0; python_version>'2.7'",
254+
"attrs>=19.2.0,<22; python_version=='2.7'",
255+
"contextlib2<1.0; python_version=='2.7'",
254256
"cattrs",
255257
"six>=1.12.0",
256258
"typing_extensions",

0 commit comments

Comments
 (0)