Skip to content

Commit e833571

Browse files
Ferenc-GSVarsha
authored andcommitted
chore: Drop 3.7 support
This is needed for multiple reasons, most pressing is that the `importlib.metadata` is only available in 3.8, and that would be needed to fix deprecation warnings about `pkg_resources`. Signed-off-by: Ferenc Géczi <[email protected]>
1 parent 9006c03 commit e833571

15 files changed

+11
-124
lines changed

.circleci/config.yml

+1-28
Original file line numberDiff line numberDiff line change
@@ -112,31 +112,6 @@ commands:
112112
path: htmlcov
113113

114114
jobs:
115-
python37:
116-
docker:
117-
- image: cimg/python:3.7.17
118-
- image: cimg/postgres:9.6.24
119-
environment:
120-
POSTGRES_USER: root
121-
POSTGRES_PASSWORD: passw0rd
122-
POSTGRES_DB: instana_test_db
123-
- image: cimg/mariadb:10.11.2
124-
environment:
125-
MYSQL_ROOT_PASSWORD: passw0rd
126-
MYSQL_DATABASE: instana_test_db
127-
- image: cimg/redis:5.0.14
128-
- image: rabbitmq:3.9.13
129-
- image: mongo:4.2.3
130-
- image: vanmoof/pubsub-emulator
131-
working_directory: ~/repo
132-
steps:
133-
- checkout
134-
- pip-install-deps:
135-
requirements: "tests/requirements-307.txt"
136-
- run-tests-with-coverage-report
137-
- store-pytest-results
138-
- store-coverage-report
139-
140115
python38:
141116
docker:
142117
- image: cimg/python:3.8.17
@@ -301,7 +276,7 @@ jobs:
301276
steps:
302277
- checkout
303278
- pip-install-deps:
304-
requirements: "tests/requirements-307.txt"
279+
requirements: "tests/requirements.txt"
305280
- store-pytest-results
306281
- run_sonarqube
307282

@@ -323,7 +298,6 @@ workflows:
323298
version: 2
324299
build:
325300
jobs:
326-
- python37
327301
- python38
328302
- python39
329303
- python310
@@ -334,7 +308,6 @@ workflows:
334308
- py39gevent_starlette
335309
- final_job:
336310
requires:
337-
- python37
338311
- python38
339312
- python39
340313
- python310

.tekton/pipeline.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ spec:
2525
params:
2626
- name: imageDigest
2727
value:
28-
# 3.7.17-bookworm
29-
- "sha256:2011a37d2a08fe83dd9ff923e0f83bfd7290152e2e6afe359bde1453170d9bdc"
3028
# 3.8.18-bookworm
3129
- "sha256:625008535504ab68868ca06d1bdd868dee92a9878d5b55fc240af7ceb38b7183"
3230
# 3.9.18-bookworm

.tekton/python-tracer-prepuller.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ spec:
6565
# 3.3.1-bookworm
6666
image: ruby@sha256:5cf0004738f54bd67e4c4316394208ca38a6726eda7a1b0586d95601aad86e5d
6767
command: ["sh", "-c", "'true'"]
68-
- name: prepuller-37
69-
# 3.7.17-bookworm
70-
image: "python@sha256:2011a37d2a08fe83dd9ff923e0f83bfd7290152e2e6afe359bde1453170d9bdc"
71-
command: ["sh", "-c", "'true'"]
7268
- name: prepuller-38
7369
# 3.8.18-bookworm
7470
image: "python@sha256:625008535504ab68868ca06d1bdd868dee92a9878d5b55fc240af7ceb38b7183"

.tekton/run_unittests.sh

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ PYTHON_MINOR_VERSION="$(echo "${PYTHON_VERSION}" | cut -d'.' -f 2)"
1818
case "${TEST_CONFIGURATION}" in
1919
default)
2020
case "${PYTHON_MINOR_VERSION}" in
21-
7)
22-
export REQUIREMENTS='requirements-307.txt' ;;
2321
10 | 11)
2422
export REQUIREMENTS='requirements-310.txt' ;;
2523
12)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The `instana` Python package collects key metrics and distributed traces for [Instana].
44

5-
This package supports Python 3.7 or greater.
5+
This package supports Python 3.8 or greater.
66

77
Any feedback is welcome. Happy Python visibility.
88

bin/aws-lambda/build_and_publish_lambda_layer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
"Provides Instana tracing and monitoring of AWS Lambda functions built with Python",
132132
"--license-info", "MIT", "--output", "json",
133133
"--layer-name", LAYER_NAME, "--zip-file", aws_zip_filename,
134-
"--compatible-runtimes", "python3.7", "python3.8", "python3.9",
134+
"--compatible-runtimes", "python3.8", "python3.9",
135135
"--profile", profile])
136136

137137
json_data = json.loads(response)

example/asyncio/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This directory includes an example asyncio application and client with aiohttp a
44

55
# Requirements
66

7-
* Python 3.7 or greater
7+
* Python 3.8 or greater
88
* instana, aiohttp and aio-pika Python packages installed
99
* A RabbitMQ server with it's location specified in the `RABBITMQ_HOST` environment variable
1010

pyproject.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dynamic = [
99
]
1010
description = "Python Distributed Tracing & Metrics Sensor for Instana."
1111
readme = "README.md"
12-
requires-python = ">=3.7"
12+
requires-python = ">=3.8"
1313
license = "MIT"
1414
keywords = [
1515
"performance",
@@ -31,7 +31,6 @@ classifiers = [
3131
"License :: OSI Approved :: MIT License",
3232
"Operating System :: OS Independent",
3333
"Programming Language :: Python",
34-
"Programming Language :: Python :: 3.7",
3534
"Programming Language :: Python :: 3.8",
3635
"Programming Language :: Python :: 3.9",
3736
"Programming Language :: Python :: 3.10",

tests/apps/flask_app/app.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313

1414
try:
1515
import boto3
16-
# TODO: Remove branching when we drop support for Python 3.7
17-
import sys
18-
if sys.version_info >= (3, 8):
19-
from moto import mock_aws
20-
else:
21-
from moto import mock_sqs as mock_aws
16+
from moto import mock_aws
2217
except ImportError:
2318
# Doesn't matter. We won't call routes using boto3
2419
# in test sets that don't install/test for it.

tests/clients/boto3/test_boto3_lambda.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@
55
import json
66

77
import boto3
8-
# TODO: Remove branching when we drop support for Python 3.7
9-
from sys import version_info
10-
if version_info >= (3, 8):
11-
from moto import mock_aws
8+
from moto import mock_aws
129

1310
from instana.singletons import tracer, agent
1411
from ...helpers import get_first_span_by_filter
1512

16-
@unittest.skipIf(version_info < (3, 8), "Test skipped on Python < 3.8")
1713
class TestLambda(unittest.TestCase):
1814
def setUp(self):
1915
""" Clear all spans before a test run """

tests/clients/boto3/test_boto3_s3.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44
import os
55
import unittest
66

7-
# TODO: Remove branching when we drop support for Python 3.7
8-
import sys
9-
if sys.version_info >= (3, 8):
10-
from moto import mock_aws
11-
else:
12-
from moto import mock_s3 as mock_aws
7+
from moto import mock_aws
138
import boto3
149

1510
from instana.singletons import tracer, agent

tests/clients/boto3/test_boto3_secretsmanager.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@
55
import boto3
66
import unittest
77

8-
# TODO: Remove branching when we drop support for Python 3.7
9-
import sys
10-
if sys.version_info >= (3, 8):
11-
from moto import mock_aws
12-
else:
13-
from moto import mock_secretsmanager as mock_aws
8+
from moto import mock_aws
149

1510
from instana.singletons import tracer, agent
1611
from ...helpers import get_first_span_by_filter

tests/clients/boto3/test_boto3_ses.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@
55
import boto3
66
import unittest
77

8-
# TODO: Remove branching when we drop support for Python 3.7
9-
import sys
10-
if sys.version_info >= (3, 8):
11-
from moto import mock_aws
12-
else:
13-
from moto import mock_ses as mock_aws
8+
from moto import mock_aws
149

1510
from instana.singletons import tracer, agent
1611
from ...helpers import get_first_span_by_filter

tests/clients/boto3/test_boto3_sqs.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@
66
import unittest
77
import urllib3
88

9-
# TODO: Remove branching when we drop support for Python 3.7
10-
import sys
11-
if sys.version_info >= (3, 8):
12-
from moto import mock_aws
13-
else:
14-
from moto import mock_sqs as mock_aws
9+
from moto import mock_aws
1510

1611
import tests.apps.flask_app
1712
from instana.singletons import tracer, agent

tests/requirements-307.txt

-48
This file was deleted.

0 commit comments

Comments
 (0)