Skip to content

Commit ca1240a

Browse files
authored
chore(ci): pin PasteDeploy for pylons, pyramid tests (#4323)
## Description PasteDeploy, which is a dependency of pylons, released a new version 3.0 which includes an f-string and is therefore not Python 2 compatible (see relevant [issue](Pylons/pastedeploy#38)). This is unfortunately breaking our CI so we will pin PasteDeploy to <3.0 for our pylons tests for now. I've pinned PasteDeploy in our pylons tests and framework tests, as well as pyramid tests (which indirectly rely on PasteDeploy as well). ## Checklist - [ ] Title must conform to [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional). - [ ] Add additional sections for `feat` and `fix` pull requests. - [ ] Ensure tests are passing for affected code. - [ ] [Library documentation](https://github.com/DataDog/dd-trace-py/tree/1.x/docs) and/or [Datadog's documentation site](https://github.com/DataDog/documentation/) is updated. Link to doc PR in description. ## Motivation ## Design ## Testing strategy ## Relevant issue(s) ## Testing strategy ## Reviewer Checklist - [ ] Title is accurate. - [ ] Description motivates each change. - [ ] No unnecessary changes were introduced in this PR. - [ ] PR cannot be broken up into smaller PRs. - [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [ ] Tests provided or description of manual testing performed is included in the code or PR. - [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added. - [ ] All relevant GitHub issues are correctly linked. - [ ] Backports are identified and tagged with Mergifyio. - [ ] Add to milestone.
1 parent b2e9be7 commit ca1240a

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

.github/workflows/test_frameworks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ jobs:
397397
run: pip install ../ddtrace
398398
- name: Install test dependencies
399399
run: pip install -e .[test]
400+
- name: Pin PasteDeploy to Python 2.7 compatible version
401+
run: pip install pastedeploy==2.1.1
400402
- name: MarkupSafe fix
401403
run: pip install --upgrade MarkupSafe==0.18 pip setuptools --force
402404
- name: Disable failing tests

riotfile.py

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,14 +1236,30 @@ def select_pys(min_version=MIN_PYTHON_VERSION, max_version=MAX_PYTHON_VERSION):
12361236
),
12371237
Venv(
12381238
name="pyramid",
1239+
command="pytest {cmdargs} tests/contrib/pyramid/test_pyramid.py",
1240+
pkgs={
1241+
"requests": [latest],
1242+
"webtest": [latest],
1243+
"tests/contrib/pyramid/pserve_app": [latest],
1244+
},
12391245
venvs=[
12401246
Venv(
1241-
command="pytest {cmdargs} tests/contrib/pyramid/test_pyramid.py",
1242-
pys=select_pys(),
1247+
# pserve_app has PasteDeploy dependency, but PasteDeploy>=3.0 is incompatible with Python 2.7
1248+
# pyramid>=2.0 no longer supports Python 2.7 and 3.5
1249+
pys=select_pys(max_version="3.5"),
1250+
pkgs={
1251+
"pastedeploy": "<3.0",
1252+
"pyramid": [
1253+
"~=1.7",
1254+
"~=1.8",
1255+
"~=1.9",
1256+
"~=1.10",
1257+
],
1258+
},
1259+
),
1260+
Venv(
1261+
pys=select_pys(min_version="3.6"),
12431262
pkgs={
1244-
"requests": [latest],
1245-
"webtest": [latest],
1246-
"tests/contrib/pyramid/pserve_app": [latest],
12471263
"pyramid": [
12481264
"~=1.7",
12491265
"~=1.8",

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ deps =
189189
pylibmc160: pylibmc>=1.6,<1.7
190190
# webob is required for Pylons < 1.0
191191
pylons: pylons
192-
# decorator 5 dropped support for Python 2
192+
# decorator>=5 and pastedeploy>=3 dropped support for Python 2
193193
pylons_contrib: decorator<5
194+
pylons_contrib: pastedeploy<3
194195
pylons096: pylons>=0.9.6,<0.9.7
195196
pylons096: webob<1.1
196197
pylons097: pylons>=0.9.7,<0.9.8

0 commit comments

Comments
 (0)