Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Drop 3.7 support #542

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 1 addition & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,31 +112,6 @@ commands:
path: htmlcov

jobs:
python37:
docker:
- image: cimg/python:3.7.17
- image: cimg/postgres:9.6.24
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
POSTGRES_DB: instana_test_db
- image: cimg/mariadb:10.11.2
environment:
MYSQL_ROOT_PASSWORD: passw0rd
MYSQL_DATABASE: instana_test_db
- image: cimg/redis:5.0.14
- image: rabbitmq:3.9.13
- image: mongo:4.2.3
- image: vanmoof/pubsub-emulator
working_directory: ~/repo
steps:
- checkout
- pip-install-deps:
requirements: "tests/requirements-307.txt"
- run-tests-with-coverage-report
- store-pytest-results
- store-coverage-report

python38:
docker:
- image: cimg/python:3.8.17
Expand Down Expand Up @@ -301,7 +276,7 @@ jobs:
steps:
- checkout
- pip-install-deps:
requirements: "tests/requirements-307.txt"
requirements: "tests/requirements.txt"
- store-pytest-results
- run_sonarqube

Expand All @@ -323,7 +298,6 @@ workflows:
version: 2
build:
jobs:
- python37
- python38
- python39
- python310
Expand All @@ -334,7 +308,6 @@ workflows:
- py39gevent_starlette
- final_job:
requires:
- python37
- python38
- python39
- python310
Expand Down
2 changes: 0 additions & 2 deletions .tekton/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ spec:
params:
- name: imageDigest
value:
# 3.7.17-bookworm
- "sha256:2011a37d2a08fe83dd9ff923e0f83bfd7290152e2e6afe359bde1453170d9bdc"
# 3.8.18-bookworm
- "sha256:625008535504ab68868ca06d1bdd868dee92a9878d5b55fc240af7ceb38b7183"
# 3.9.18-bookworm
Expand Down
4 changes: 0 additions & 4 deletions .tekton/python-tracer-prepuller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ spec:
# 3.3.1-bookworm
image: ruby@sha256:5cf0004738f54bd67e4c4316394208ca38a6726eda7a1b0586d95601aad86e5d
command: ["sh", "-c", "'true'"]
- name: prepuller-37
# 3.7.17-bookworm
image: "python@sha256:2011a37d2a08fe83dd9ff923e0f83bfd7290152e2e6afe359bde1453170d9bdc"
command: ["sh", "-c", "'true'"]
- name: prepuller-38
# 3.8.18-bookworm
image: "python@sha256:625008535504ab68868ca06d1bdd868dee92a9878d5b55fc240af7ceb38b7183"
Expand Down
2 changes: 0 additions & 2 deletions .tekton/run_unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ PYTHON_MINOR_VERSION="$(echo "${PYTHON_VERSION}" | cut -d'.' -f 2)"
case "${TEST_CONFIGURATION}" in
default)
case "${PYTHON_MINOR_VERSION}" in
7)
export REQUIREMENTS='requirements-307.txt' ;;
10 | 11)
export REQUIREMENTS='requirements-310.txt' ;;
12)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

This package supports Python 3.7 or greater.
This package supports Python 3.8 or greater.

Any feedback is welcome. Happy Python visibility.

Expand Down
2 changes: 1 addition & 1 deletion bin/aws-lambda/build_and_publish_lambda_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"Provides Instana tracing and monitoring of AWS Lambda functions built with Python",
"--license-info", "MIT", "--output", "json",
"--layer-name", LAYER_NAME, "--zip-file", aws_zip_filename,
"--compatible-runtimes", "python3.7", "python3.8", "python3.9",
"--compatible-runtimes", "python3.8", "python3.9",
"--profile", profile])

json_data = json.loads(response)
Expand Down
2 changes: 1 addition & 1 deletion example/asyncio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This directory includes an example asyncio application and client with aiohttp a

# Requirements

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

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dynamic = [
]
description = "Python Distributed Tracing & Metrics Sensor for Instana."
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.8"
license = "MIT"
keywords = [
"performance",
Expand All @@ -31,7 +31,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
7 changes: 1 addition & 6 deletions tests/apps/flask_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@

try:
import boto3
# TODO: Remove branching when we drop support for Python 3.7
import sys
if sys.version_info >= (3, 8):
from moto import mock_aws
else:
from moto import mock_sqs as mock_aws
from moto import mock_aws
except ImportError:
# Doesn't matter. We won't call routes using boto3
# in test sets that don't install/test for it.
Expand Down
6 changes: 1 addition & 5 deletions tests/clients/boto3/test_boto3_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@
import json

import boto3
# TODO: Remove branching when we drop support for Python 3.7
from sys import version_info
if version_info >= (3, 8):
from moto import mock_aws
from moto import mock_aws

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

@unittest.skipIf(version_info < (3, 8), "Test skipped on Python < 3.8")
class TestLambda(unittest.TestCase):
def setUp(self):
""" Clear all spans before a test run """
Expand Down
7 changes: 1 addition & 6 deletions tests/clients/boto3/test_boto3_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
import os
import unittest

# TODO: Remove branching when we drop support for Python 3.7
import sys
if sys.version_info >= (3, 8):
from moto import mock_aws
else:
from moto import mock_s3 as mock_aws
from moto import mock_aws
import boto3

from instana.singletons import tracer, agent
Expand Down
7 changes: 1 addition & 6 deletions tests/clients/boto3/test_boto3_secretsmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
import boto3
import unittest

# TODO: Remove branching when we drop support for Python 3.7
import sys
if sys.version_info >= (3, 8):
from moto import mock_aws
else:
from moto import mock_secretsmanager as mock_aws
from moto import mock_aws

from instana.singletons import tracer, agent
from ...helpers import get_first_span_by_filter
Expand Down
7 changes: 1 addition & 6 deletions tests/clients/boto3/test_boto3_ses.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
import boto3
import unittest

# TODO: Remove branching when we drop support for Python 3.7
import sys
if sys.version_info >= (3, 8):
from moto import mock_aws
else:
from moto import mock_ses as mock_aws
from moto import mock_aws

from instana.singletons import tracer, agent
from ...helpers import get_first_span_by_filter
Expand Down
7 changes: 1 addition & 6 deletions tests/clients/boto3/test_boto3_sqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@
import unittest
import urllib3

# TODO: Remove branching when we drop support for Python 3.7
import sys
if sys.version_info >= (3, 8):
from moto import mock_aws
else:
from moto import mock_sqs as mock_aws
from moto import mock_aws

import tests.apps.flask_app
from instana.singletons import tracer, agent
Expand Down
48 changes: 0 additions & 48 deletions tests/requirements-307.txt

This file was deleted.

Loading