Skip to content

Commit

Permalink
Drop support and builds for Python < 3.7.
Browse files Browse the repository at this point in the history
Includes:
- pinning images and package dependencies in CircleCI
- removing stale `master` branch
- dropping pylons framework test
- updating versioning documentation
- drop Python < 3.7 as supported on setup.py
- removing pylons/boto from CI suitespec
- release note for 2.0
  • Loading branch information
Yun-Kim committed Aug 8, 2023
1 parent bbff997 commit 3fbb4eb
Show file tree
Hide file tree
Showing 440 changed files with 530 additions and 14,738 deletions.
43 changes: 17 additions & 26 deletions .circleci/config.templ.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
version: 2.1

default_resource_class: &default_resource_class medium
cimg_base_image: &cimg_base_image cimg/base:stable
python310_image: &python310_image cimg/python:3.10
ddtrace_dev_image: &ddtrace_dev_image ghcr.io/datadog/dd-trace-py/testrunner:latest
redis_image: &redis_image redis:4.0-alpine
memcached_image: &memcached_image memcached:1.5-alpine
cassandra_image: &cassandra_image cassandra:3.11.7
consul_image: &consul_image consul:1.6.0
moto_image: &moto_image palazzem/moto:1.0.1
mysql_image: &mysql_image mysql:5.7
postgres_image: &postgres_image postgres:12-alpine
mongo_image: &mongo_image mongo:3.6
ubuntu_base_image: &ubuntu_base_img ubuntu-2004:2023.04.2
cimg_base_image: &cimg_base_image cimg/base:2022.08
python310_image: &python310_image cimg/python:3.10.12
ddtrace_dev_image: &ddtrace_dev_image ghcr.io/datadog/dd-trace-py/testrunner@sha256:0ab20ba6e382770f520c4d5956cef5d4aa20623b8d43e58f77c100ee8ad903a0
redis_image: &redis_image redis:4.0-alpine@sha256:3e99741f293147ff406657dda7644c2b88564b80a498cd00da8f905743449c9f
memcached_image: &memcached_image memcached:1.5-alpine@sha256:48cb7207e3d34871893fa1628f3a4984375153e9942facf82e25935b0a633c8a
cassandra_image: &cassandra_image cassandra:3.11.7@sha256:495e5752526f7e75d3ad85b6a6bbf3b79714321b17a44255a216c341e3baae11
consul_image: &consul_image consul:1.6.0@sha256:daa6203532fc30d81bf6c5593f79a2c7c23f08e8fde82f1e4bd8069b48b57596
moto_image: &moto_image datadog/docker-library:moto_1_0_1@sha256:58c15f03141073629f4ff2a78910b812205324579c76f8bcac87e8e89af2e673
mysql_image: &mysql_image mysql:5.7@sha256:03b6dcedf5a2754da00e119e2cc6094ed3c884ad36b67bb25fe67be4b4f9bdb1
postgres_image: &postgres_image postgres:12-alpine@sha256:c6704f41eb84be53d5977cb821bf0e5e876064b55eafef1e260c2574de40ad9a
mongo_image: &mongo_image mongo:3.6@sha256:19c11a8f1064fd2bb713ef1270f79a742a184cd57d9bb922efdd2a8eca514af8
httpbin_image: &httpbin_image kennethreitz/httpbin@sha256:2c7abc4803080c22928265744410173b6fea3b898872c01c5fd0f0f9df4a59fb
vertica_image: &vertica_image sumitchawla/vertica:latest
rabbitmq_image: &rabbitmq_image rabbitmq:3.7-alpine
Expand All @@ -30,7 +31,7 @@ orbs:

machine_executor: &machine_executor
machine:
image: ubuntu-2004:current
image: *ubuntu_base_img
environment:
- BOTO_CONFIG: /dev/null
# https://support.circleci.com/hc/en-us/articles/360045268074-Build-Fails-with-Too-long-with-no-output-exceeded-10m0s-context-deadline-exceeded-
Expand Down Expand Up @@ -263,7 +264,7 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: pip install coverage codecov diff_cover
- run: pip install -r ci/coverage/requirements.txt
- run: ls -hal *.coverage
# Combine all job coverage reports into one
- run: coverage combine *.coverage
Expand Down Expand Up @@ -441,12 +442,12 @@ jobs:
- run_test:
pattern: 'vendor'

boto:
botocore:
<<: *machine_executor
parallelism: 6
steps:
- run_test:
pattern: '^boto' # run boto and botocore
pattern: 'botocore'
snapshot: true
docker_services: "localstack"

Expand Down Expand Up @@ -485,16 +486,6 @@ jobs:
snapshot: true
docker_services: 'postgres'

pylons:
<<: *contrib_job_small
docker:
- image: *ddtrace_dev_image
- *testagent
steps:
- run_test:
pattern: 'pylons'
trace_agent_url: "http://localhost:8126"

aiohttp:
<<: *machine_executor
parallelism: 3
Expand Down Expand Up @@ -551,7 +542,7 @@ jobs:
<<: *contrib_job_large
docker:
- image: *ddtrace_dev_image
- image: redis:4.0-alpine
- image: *redis_image
- image: *rabbitmq_image
- image: *testagent_image
environment:
Expand Down
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2.1

python310_image: &python310_image cimg/python:3.10
python310_image: &python310_image cimg/python:3.10.12

setup: true

Expand Down Expand Up @@ -38,4 +38,4 @@ jobs:
workflows:
setup:
jobs:
- setup
- setup
62 changes: 0 additions & 62 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,67 +24,6 @@ on:
- cron: 0 2 * * 2-6

jobs:
build_wheels_py27_35:
name: Build and test wheels on ${{ matrix.os }} (${{ matrix.archs }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
archs: x86_64 i686
- os: ubuntu-latest
archs: aarch64
- os: windows-latest
archs: AMD64 x86
- os: macos-latest
# universal2 and arm64 builds require CPython 3.8 or newer:
# https://cibuildwheel.readthedocs.io/en/stable/faq/#universal2
archs: x86_64 universal2
steps:
- uses: actions/checkout@v3
# Include all history and tags
with:
fetch-depth: 0

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.8'

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: all

- name: Build wheels python 2.7 and 3.5
uses: joerick/cibuildwheel@v1.12.0
env:
# configure cibuildwheel to build native archs ('auto'), and some
# emulated ones
CIBW_ARCHS: ${{ matrix.archs }}
# PyPY is not supported
# Windows 2.7 wheels no longer can be built https://github.com/DataDog/dd-trace-py/pull/2344
CIBW_SKIP: cp27-win*
CIBW_BUILD: cp27* cp35*
# Run a smoke test on every supported platform
CIBW_TEST_COMMAND: python {project}/tests/smoke_test.py
# Testing arm on MacOS is currently not supported by Github
CIBW_TEST_SKIP: "*-macosx_universal2:arm64"
# Workaround for Macos 11.0 versioning issue, a.k.a.
# `platform.mac_ver()` reports incorrect MacOS version at 11.0
# See: https://stackoverflow.com/a/65402241
CIBW_ENVIRONMENT_MACOS: SYSTEM_VERSION_COMPAT=0

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build_wheels_py36:
uses: ./.github/workflows/build_python_3.yml
with:
cibw_build: 'cp36*'

build_wheels_py37:
uses: ./.github/workflows/build_python_3.yml
with:
Expand Down Expand Up @@ -169,7 +108,6 @@ jobs:

upload_pypi:
needs:
- build_wheels_py27_35
- build_wheels_py36
- build_wheels_py37
- build_wheels_py38
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Changelog
on:
push:
branches:
- master
- 0.x
- 1.x
pull_request:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ name: "CodeQL"
on:
push:
branches:
- master
- 0.x
- 1.x
pull_request:
# The branches below must be a subset of the branches above
branches:
- master
- 0.x
- 1.x

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/django-overhead-profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: django-overhead-profile
on:
push:
branches:
- master
- 0.x
- 1.x
pull_request:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/encoders-profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: encoders-profile
on:
push:
branches:
- master
- 0.x
- 1.x
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/requirements-locks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Set python interpreters
run: pyenv global 3.10 2.7 3.5 3.6 3.7 3.8 3.9 3.11
run: pyenv global 3.10 3.7 3.8 3.9 3.11

- name: Install Dependencies
run: pip install --upgrade pip && pip install riot
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/test_frameworks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Framework tests
on:
push:
branches:
- master
- 0.x
- 1.x
pull_request:
Expand Down Expand Up @@ -416,42 +415,6 @@ jobs:
# Disable tests checking GC references since profiling can interfere
run: ddtrace-run python -m pytest -k 'not test_record_gc and not test_record_get and not test_record_items and not test_record_iter' tests

pylons-testsuite-1_0_3:
name: Pylons 1.0.3
runs-on: "ubuntu-20.04"
# Ubuntu 20.04 is the last version of ubuntu on github setup actions to provide Python 2.7.
container:
image: python:2.7.18-buster
env:
DD_TESTING_RAISE: true
PYTHONPATH: ../ddtrace/tests/debugging/exploration/
defaults:
run:
working-directory: pylons
steps:
- uses: actions/checkout@v3
with:
path: ddtrace
- uses: actions/checkout@v3
with:
repository: pylons/pylons
ref: master
path: pylons
- name: Install ddtrace
run: pip install ../ddtrace
- name: Install test dependencies
run: pip install -e .[test]
- name: Pin PasteDeploy to Python 2.7 compatible version
run: pip install pastedeploy==2.1.1
- name: MarkupSafe fix
run: pip install --upgrade MarkupSafe==0.18 pip setuptools --force
- name: Disable failing tests
run: |
sed -i'' "s/test_detect_lang/detect_lang/g" tests/test_units/test_basic_app.py
sed -i'' "s/test_langs/langs/g" tests/test_units/test_basic_app.py
- name: Run tests
run: nosetests

gunicorn-testsuite-20_1_0:
name: gunicorn 20.1.0
runs-on: "ubuntu-latest"
Expand Down
27 changes: 0 additions & 27 deletions .riot/requirements/1017b7b.txt

This file was deleted.

26 changes: 0 additions & 26 deletions .riot/requirements/10192c8.txt

This file was deleted.

27 changes: 12 additions & 15 deletions .riot/requirements/102cf0a.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,29 @@
# This file is autogenerated by pip-compile with Python 3.7
# by the following command:
#
# pip-compile --no-annotate --resolver=backtracking .riot/requirements/102cf0a.in
# pip-compile --config=pyproject.toml --no-annotate --resolver=backtracking .riot/requirements/102cf0a.in
#
attrs==23.1.0
coverage[toml]==7.2.3
exceptiongroup==1.1.1
coverage[toml]==7.2.7
exceptiongroup==1.1.2
gevent==1.4.0
greenlet==0.4.14
gunicorn[gevent]==20.1.0
gunicorn[gevent]==21.2.0
hypothesis==6.45.0
importlib-metadata==6.6.0
importlib-metadata==6.7.0
iniconfig==2.0.0
mock==5.0.2
mock==5.1.0
opentracing==2.4.0
packaging==23.1
pluggy==1.0.0
pluggy==1.2.0
py-cpuinfo==8.0.0
pytest==7.3.1
pytest-asyncio==0.21.0
pytest==7.4.0
pytest-asyncio==0.21.1
pytest-benchmark==4.0.0
pytest-cov==4.0.0
pytest-mock==3.10.0
pytest-cov==4.1.0
pytest-mock==3.11.1
sortedcontainers==2.4.0
tomli==2.0.1
typing-extensions==4.7.0
typing-extensions==4.7.1
uwsgi==2.0.21
zipp==3.15.0

# The following packages are considered to be unsafe in a requirements file:
# setuptools
Loading

0 comments on commit 3fbb4eb

Please sign in to comment.