Skip to content

Commit abb6405

Browse files
authored
Remove Python 2.7 and pypy2 testing (#835)
* Change setup-python to @v2 for py2.7 * Remove py27 and pypy testing * Fix syntax errors * Fix comma related syntax errors * Fix more issues in tox * Remove gearman test
1 parent 668b0a9 commit abb6405

File tree

4 files changed

+119
-134
lines changed

4 files changed

+119
-134
lines changed

.github/actions/setup-python-matrix/action.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ runs:
88
python-version: "pypy-3.7"
99
architecture: x64
1010

11-
- uses: actions/setup-python@v4
12-
with:
13-
python-version: "pypy-2.7"
14-
architecture: x64
11+
# - uses: actions/setup-python@v4
12+
# with:
13+
# python-version: "pypy-2.7"
14+
# architecture: x64
1515

1616
- uses: actions/setup-python@v4
1717
with:
@@ -38,10 +38,10 @@ runs:
3838
python-version: "3.11"
3939
architecture: x64
4040

41-
- uses: actions/setup-python@v4
42-
with:
43-
python-version: "2.7"
44-
architecture: x64
41+
# - uses: actions/setup-python@v4
42+
# with:
43+
# python-version: "2.7"
44+
# architecture: x64
4545

4646
- name: Install Dependencies
4747
shell: bash

.github/workflows/tests.yml

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- python
3737
- elasticsearchserver07
3838
- elasticsearchserver08
39-
- gearman
39+
# - gearman
4040
- grpc
4141
#- kafka
4242
- libcurl
@@ -769,51 +769,51 @@ jobs:
769769
path: ./**/.coverage.*
770770
retention-days: 1
771771

772-
gearman:
773-
env:
774-
TOTAL_GROUPS: 1
775-
776-
strategy:
777-
fail-fast: false
778-
matrix:
779-
group-number: [1]
780-
781-
runs-on: ubuntu-20.04
782-
timeout-minutes: 30
783-
784-
services:
785-
gearman:
786-
image: artefactual/gearmand
787-
ports:
788-
- 4730:4730
789-
# Set health checks to wait until gearman has started
790-
options: >-
791-
--health-cmd "(echo status ; sleep 0.1) | nc 127.0.0.1 4730 -w 1"
792-
--health-interval 10s
793-
--health-timeout 5s
794-
--health-retries 5
795-
796-
steps:
797-
- uses: actions/checkout@v3
798-
- uses: ./.github/actions/setup-python-matrix
799-
800-
- name: Get Environments
801-
id: get-envs
802-
run: |
803-
echo "envs=$(tox -l | grep '^${{ github.job }}\-' | ./.github/workflows/get-envs.py)" >> $GITHUB_OUTPUT
804-
env:
805-
GROUP_NUMBER: ${{ matrix.group-number }}
806-
807-
- name: Test
808-
run: |
809-
tox -vv -e ${{ steps.get-envs.outputs.envs }} -p auto
810-
env:
811-
TOX_PARALLEL_NO_SPINNER: 1
812-
PY_COLORS: 0
813-
814-
- name: Upload Coverage Artifacts
815-
uses: actions/upload-artifact@v3
816-
with:
817-
name: coverage-${{ github.job }}-${{ strategy.job-index }}
818-
path: ./**/.coverage.*
819-
retention-days: 1
772+
# gearman:
773+
# env:
774+
# TOTAL_GROUPS: 1
775+
776+
# strategy:
777+
# fail-fast: false
778+
# matrix:
779+
# group-number: [1]
780+
781+
# runs-on: ubuntu-20.04
782+
# timeout-minutes: 30
783+
784+
# services:
785+
# gearman:
786+
# image: artefactual/gearmand
787+
# ports:
788+
# - 4730:4730
789+
# # Set health checks to wait until gearman has started
790+
# options: >-
791+
# --health-cmd "(echo status ; sleep 0.1) | nc 127.0.0.1 4730 -w 1"
792+
# --health-interval 10s
793+
# --health-timeout 5s
794+
# --health-retries 5
795+
796+
# steps:
797+
# - uses: actions/checkout@v3
798+
# - uses: ./.github/actions/setup-python-matrix
799+
800+
# - name: Get Environments
801+
# id: get-envs
802+
# run: |
803+
# echo "envs=$(tox -l | grep '^${{ github.job }}\-' | ./.github/workflows/get-envs.py)" >> $GITHUB_OUTPUT
804+
# env:
805+
# GROUP_NUMBER: ${{ matrix.group-number }}
806+
807+
# - name: Test
808+
# run: |
809+
# tox -vv -e ${{ steps.get-envs.outputs.envs }} -p auto
810+
# env:
811+
# TOX_PARALLEL_NO_SPINNER: 1
812+
# PY_COLORS: 0
813+
814+
# - name: Upload Coverage Artifacts
815+
# uses: actions/upload-artifact@v3
816+
# with:
817+
# name: coverage-${{ github.job }}-${{ strategy.job-index }}
818+
# path: ./**/.coverage.*
819+
# retention-days: 1

newrelic/config.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3029,21 +3029,21 @@ def _process_module_builtin_defaults():
30293029

30303030
_process_module_definition("thrift.transport.TSocket", "newrelic.hooks.external_thrift")
30313031

3032-
_process_module_definition(
3033-
"gearman.client",
3034-
"newrelic.hooks.application_gearman",
3035-
"instrument_gearman_client",
3036-
)
3037-
_process_module_definition(
3038-
"gearman.connection_manager",
3039-
"newrelic.hooks.application_gearman",
3040-
"instrument_gearman_connection_manager",
3041-
)
3042-
_process_module_definition(
3043-
"gearman.worker",
3044-
"newrelic.hooks.application_gearman",
3045-
"instrument_gearman_worker",
3046-
)
3032+
# _process_module_definition(
3033+
# "gearman.client",
3034+
# "newrelic.hooks.application_gearman",
3035+
# "instrument_gearman_client",
3036+
# )
3037+
# _process_module_definition(
3038+
# "gearman.connection_manager",
3039+
# "newrelic.hooks.application_gearman",
3040+
# "instrument_gearman_connection_manager",
3041+
# )
3042+
# _process_module_definition(
3043+
# "gearman.worker",
3044+
# "newrelic.hooks.application_gearman",
3045+
# "instrument_gearman_worker",
3046+
# )
30473047

30483048
_process_module_definition(
30493049
"botocore.endpoint",

tox.ini

Lines changed: 47 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
[tox]
4343
setupdir = {toxinidir}
4444
envlist =
45-
python-adapter_cheroot-{py27,py37,py38,py39,py310,py311},
45+
python-adapter_cheroot-{py37,py38,py39,py310,py311},
4646
python-adapter_daphne-{py37,py38,py39,py310,py311}-daphnelatest,
4747
python-adapter_daphne-py38-daphne{0204,0205},
48-
python-adapter_gevent-{py27,py37,py38,py310,py311},
48+
python-adapter_gevent-{py37,py38,py310,py311},
4949
python-adapter_gunicorn-{py37,py38,py39,py310,py311}-aiohttp3-gunicornlatest,
5050
python-adapter_hypercorn-{py37,py38,py39,py310,py311}-hypercornlatest,
5151
python-adapter_hypercorn-py38-hypercorn{0010,0011,0012,0013},
@@ -54,123 +54,108 @@ envlist =
5454
python-adapter_waitress-{py37,py38,py39}-waitress010404,
5555
python-adapter_waitress-{py37,py38,py39,py310}-waitress02,
5656
python-adapter_waitress-{py37,py38,py39,py310,py311}-waitresslatest,
57-
python-agent_features-{py27,py37,py38,py39,py310,py311}-{with,without}_extensions,
58-
python-agent_features-{pypy,pypy37}-without_extensions,
59-
python-agent_streaming-py27-grpc0125-{with,without}_extensions,
57+
python-agent_features-{py37,py38,py39,py310,py311}-{with,without}_extensions,
58+
python-agent_features-{pypy37}-without_extensions,
6059
python-agent_streaming-{py37,py38,py39,py310,py311}-protobuf04-{with,without}_extensions,
6160
python-agent_streaming-py39-protobuf{03,0319}-{with,without}_extensions,
62-
python-agent_unittests-{py27,py37,py38,py39,py310,py311}-{with,without}_extensions,
63-
python-agent_unittests-{pypy,pypy37}-without_extensions,
64-
python-application_celery-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
65-
gearman-application_gearman-{py27,pypy},
66-
python-component_djangorestframework-py27-djangorestframework0300,
61+
python-agent_unittests-{py37,py38,py39,py310,py311}-{with,without}_extensions,
62+
python-agent_unittests-{pypy37}-without_extensions,
63+
python-application_celery-{py37,py38,py39,py310,py311,pypy37},
6764
python-component_djangorestframework-{py37,py38,py39,py310,py311}-djangorestframeworklatest,
6865
python-component_flask_rest-{py37,py38,py39,pypy37}-flaskrestxlatest,
69-
python-component_flask_rest-{py27,pypy}-flaskrestx051,
7066
python-component_graphqlserver-{py37,py38,py39,py310,py311},
71-
python-component_tastypie-{py27,pypy}-tastypie0143,
7267
python-component_tastypie-{py37,py38,py39,pypy37}-tastypie{0143,latest},
7368
python-coroutines_asyncio-{py37,py38,py39,py310,py311,pypy37},
74-
python-cross_agent-{py27,py37,py38,py39,py310,py311}-{with,without}_extensions,
75-
python-cross_agent-pypy-without_extensions,
69+
python-cross_agent-{py37,py38,py39,py310,py311}-{with,without}_extensions,
7670
postgres-datastore_asyncpg-{py37,py38,py39,py310,py311},
77-
memcached-datastore_bmemcached-{pypy,py27,py37,py38,py39,py310,py311}-memcached030,
78-
elasticsearchserver07-datastore_elasticsearch-{py27,py37,py38,py39,py310,py311,pypy,pypy37}-elasticsearch07,
71+
memcached-datastore_bmemcached-{py37,py38,py39,py310,py311}-memcached030,
72+
elasticsearchserver07-datastore_elasticsearch-{py37,py38,py39,py310,py311,pypy37}-elasticsearch07,
7973
elasticsearchserver08-datastore_elasticsearch-{py37,py38,py39,py310,py311,pypy37}-elasticsearch08,
80-
memcached-datastore_memcache-{py27,py37,py38,py39,py310,py311,pypy,pypy37}-memcached01,
81-
mysql-datastore_mysql-mysql080023-py27,
74+
memcached-datastore_memcache-{py37,py38,py39,py310,py311,pypy37}-memcached01,
8275
mysql-datastore_mysql-mysqllatest-{py37,py38,py39,py310,py311},
8376
postgres-datastore_postgresql-{py37,py38,py39},
84-
postgres-datastore_psycopg2-{py27,py37,py38,py39,py310,py311}-psycopg2latest
85-
postgres-datastore_psycopg2cffi-{py27,pypy,py37,py38,py39,py310,py311}-psycopg2cffilatest,
86-
postgres-datastore_pyodbc-{py27,py37,py311}-pyodbclatest
87-
memcached-datastore_pylibmc-{py27,py37},
88-
memcached-datastore_pymemcache-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
89-
mongodb-datastore_pymongo-{py27,py37,py38,py39,py310,py311,pypy}-pymongo{03},
90-
mongodb-datastore_pymongo-{py37,py38,py39,py310,py311,pypy,pypy37}-pymongo04,
91-
mysql-datastore_pymysql-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
92-
solr-datastore_pysolr-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
93-
redis-datastore_redis-{py27,py37,py38,pypy,pypy37}-redis03,
77+
postgres-datastore_psycopg2-{py37,py38,py39,py310,py311}-psycopg2latest,
78+
postgres-datastore_psycopg2cffi-{py37,py38,py39,py310,py311}-psycopg2cffilatest,
79+
postgres-datastore_pyodbc-{py37,py311}-pyodbclatest,
80+
memcached-datastore_pylibmc-{py37},
81+
memcached-datastore_pymemcache-{py37,py38,py39,py310,py311,pypy37},
82+
mongodb-datastore_pymongo-{py37,py38,py39,py310,py311}-pymongo{03},
83+
mongodb-datastore_pymongo-{py37,py38,py39,py310,py311,pypy37}-pymongo04,
84+
mysql-datastore_pymysql-{py37,py38,py39,py310,py311,pypy37},
85+
solr-datastore_pysolr-{py37,py38,py39,py310,py311,pypy37},
86+
redis-datastore_redis-{py37,py38,pypy37}-redis03,
9487
redis-datastore_redis-{py37,py38,py39,py310,py311,pypy37}-redis{0400,latest},
9588
redis-datastore_aioredis-{py37,py38,py39,py310,pypy37}-aioredislatest,
9689
redis-datastore_aioredis-{py37,py310}-aioredis01,
9790
redis-datastore_aioredis-{py37,py38,py39,py310,py311,pypy37}-redislatest,
9891
redis-datastore_aredis-{py37,py38,py39,pypy37}-aredislatest,
99-
solr-datastore_solrpy-{py27,pypy}-solrpy{00,01},
100-
python-datastore_sqlite-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
101-
python-external_boto3-{py27,py37,py38,py39,py310,py311}-boto01,
92+
python-datastore_sqlite-{py37,py38,py39,py310,py311,pypy37},
93+
python-external_boto3-{py37,py38,py39,py310,py311}-boto01,
10294
python-external_botocore-{py37,py38,py39,py310,py311}-botocorelatest,
10395
python-external_botocore-{py311}-botocore128,
10496
python-external_botocore-py310-botocore0125,
105-
python-external_feedparser-py27-feedparser{05,06},
106-
python-external_http-{py27,py37,py38,py39,py310,py311,pypy},
107-
python-external_httplib-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
108-
python-external_httplib2-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
97+
python-external_http-{py37,py38,py39,py310,py311},
98+
python-external_httplib-{py37,py38,py39,py310,py311,pypy37},
99+
python-external_httplib2-{py37,py38,py39,py310,py311,pypy37},
109100
python-external_httpx-{py37,py38,py39,py310,py311},
110-
python-external_requests-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
111-
python-external_urllib3-{py27,py37,pypy}-urllib3{0109},
112-
python-external_urllib3-{py27,py37,py38,py39,py310,py311,pypy,pypy37}-urllib3latest,
101+
python-external_requests-{py37,py38,py39,py310,py311,pypy37},
102+
python-external_urllib3-{py37}-urllib3{0109},
103+
python-external_urllib3-{py37,py38,py39,py310,py311,pypy37}-urllib3latest,
113104
python-framework_aiohttp-{py37,py38,py39,py310,py311,pypy37}-aiohttp03,
114105
python-framework_ariadne-{py37,py38,py39,py310,py311}-ariadnelatest,
115106
python-framework_ariadne-py37-ariadne{0011,0012,0013},
116-
python-framework_bottle-py27-bottle{0008,0009,0010},
117-
python-framework_bottle-{py27,py37,py38,py39,pypy37}-bottle{0011,0012},
107+
python-framework_bottle-{py37,py38,py39,pypy37}-bottle{0011,0012},
118108
python-framework_bottle-{py310,py311}-bottle0012,
119-
python-framework_bottle-pypy-bottle{0008,0009,0010,0011,0012},
120109
; CherryPy still uses inspect.getargspec, deprecated in favor of inspect.getfullargspec. Not supported in 3.11
121110
python-framework_cherrypy-{py37,py38,py39,py310,py311,pypy37}-CherryPylatest,
122-
python-framework_django-{pypy,py27}-Django0103,
123-
python-framework_django-{pypy,py27,py37}-Django0108,
111+
python-framework_django-{py37}-Django0108,
124112
python-framework_django-{py39}-Django{0200,0201,0202,0300,0301,latest},
125113
python-framework_django-{py37,py38,py39,py310,py311}-Django0302,
126-
python-framework_falcon-{py27,py37,py38,py39,pypy,pypy37}-falcon0103,
114+
python-framework_falcon-{py37,py38,py39,pypy37}-falcon0103,
127115
python-framework_falcon-{py37,py38,py39,py310,pypy37}-falcon{0200,master},
128116
# Falcon master branch failing on 3.11 currently.
129117
python-framework_falcon-py311-falcon0200,
130118
python-framework_fastapi-{py37,py38,py39,py310,py311},
131-
python-framework_flask-{pypy,py27}-flask0012,
132-
python-framework_flask-{pypy,py27,py37,py38,py39,py310,py311,pypy37}-flask0101,
119+
python-framework_flask-{py37,py38,py39,py310,py311,pypy37}-flask0101,
133120
; temporarily disabling flaskmaster tests
134121
python-framework_flask-{py37,py38,py39,py310,py311,pypy37}-flask{latest},
135122
python-framework_graphene-{py37,py38,py39,py310,py311}-graphenelatest,
136-
python-framework_graphene-{py27,py37,py38,py39,pypy,pypy37}-graphene{0200,0201},
123+
python-framework_graphene-{py37,py38,py39,pypy37}-graphene{0200,0201},
137124
python-framework_graphene-{py310,py311}-graphene0201,
138-
python-framework_graphql-{py27,py37,py38,py39,py310,py311,pypy,pypy37}-graphql02,
125+
python-framework_graphql-{py37,py38,py39,py310,py311,pypy37}-graphql02,
139126
python-framework_graphql-{py37,py38,py39,py310,py311,pypy37}-graphql03,
140127
; temporarily disabling graphqlmaster tests
141128
python-framework_graphql-py37-graphql{0202,0203,0300,0301,0302},
142-
grpc-framework_grpc-py27-grpc0125,
143129
grpc-framework_grpc-{py37,py38,py39,py310,py311}-grpclatest,
144-
python-framework_pyramid-{pypy,py27,py38}-Pyramid0104,
145-
python-framework_pyramid-{pypy,py27,pypy37,py37,py38,py39,py310,py311}-Pyramid0110-cornice,
130+
python-framework_pyramid-{py38}-Pyramid0104,
131+
python-framework_pyramid-{pypy37,py37,py38,py39,py310,py311}-Pyramid0110-cornice,
146132
python-framework_pyramid-{py37,py38,py39,py310,py311,pypy37}-Pyramidlatest,
147133
python-framework_sanic-{py38,pypy37}-sanic{190301,1906,1912,200904,210300,2109,2112,2203,2290},
148134
python-framework_sanic-{py37,py38,py39,py310,py311,pypy37}-saniclatest,
149135
python-framework_starlette-{py310,pypy37}-starlette{0014,0015,0019},
150136
python-framework_starlette-{py37,py38}-starlette{002001},
151137
python-framework_starlette-{py37,py38,py39,py310,py311,pypy37}-starlettelatest,
152138
python-framework_strawberry-{py37,py38,py39,py310,py311}-strawberrylatest,
153-
python-logger_logging-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
139+
python-logger_logging-{py37,py38,py39,py310,py311,pypy37},
154140
python-logger_loguru-{py37,py38,py39,py310,py311,pypy37}-logurulatest,
155141
python-logger_loguru-py39-loguru{06,05,04,03},
156142
libcurl-framework_tornado-{py37,py38,py39,py310,py311,pypy37}-tornado0600,
157143
libcurl-framework_tornado-{py38,py39,py310,py311}-tornadomaster,
158-
rabbitmq-messagebroker_pika-{py27,py37,py38,py39,pypy,pypy37}-pika0.13,
144+
rabbitmq-messagebroker_pika-{py37,py38,py39,pypy37}-pika0.13,
159145
rabbitmq-messagebroker_pika-{py37,py38,py39,py310,py311,pypy37}-pikalatest,
160-
kafka-messagebroker_confluentkafka-{py27,py37,py38,py39,py310,py311}-confluentkafkalatest,
161-
kafka-messagebroker_confluentkafka-{py27,py39}-confluentkafka{0107,0106},
146+
kafka-messagebroker_confluentkafka-{py37,py38,py39,py310,py311}-confluentkafkalatest,
147+
kafka-messagebroker_confluentkafka-{py39}-confluentkafka{0107,0106},
162148
; confluent-kafka had a bug in 1.8.2's setup.py file which was incompatible with 2.7.
163149
kafka-messagebroker_confluentkafka-{py39}-confluentkafka{0108},
164-
kafka-messagebroker_kafkapython-{pypy,py27,py37,py38,pypy37}-kafkapythonlatest,
165-
kafka-messagebroker_kafkapython-{py27,py38}-kafkapython{020001,020000,0104},
166-
python-template_genshi-{py27,py37,py311}-genshilatest
167-
python-template_mako-{py27,py37,py310,py311}
150+
kafka-messagebroker_kafkapython-{py37,py38,pypy37}-kafkapythonlatest,
151+
kafka-messagebroker_kafkapython-{py38}-kafkapython{020001,020000,0104},
152+
python-template_genshi-{py37,py311}-genshilatest,
153+
python-template_mako-{py37,py310,py311},
168154

169155
[testenv]
170156
deps =
171157
# Base Dependencies
172158
{py37,py38,py39,py310,py311,pypy37}: pytest==7.2.2
173-
{py27,pypy}: pytest==4.6.11
174159
iniconfig
175160
coverage
176161
WebTest==2.0.35
@@ -202,7 +187,7 @@ deps =
202187
agent_features: beautifulsoup4
203188
application_celery: celery<6.0
204189
application_celery-py{py37,37}: importlib-metadata<5.0
205-
application_gearman: gearman<3.0.0
190+
; application_gearman: gearman<3.0.0
206191
component_djangorestframework-djangorestframework0300: Django<1.9
207192
component_djangorestframework-djangorestframework0300: djangorestframework<3.1
208193
component_djangorestframework-djangorestframeworklatest: Django
@@ -430,7 +415,7 @@ changedir =
430415
agent_streaming: tests/agent_streaming
431416
agent_unittests: tests/agent_unittests
432417
application_celery: tests/application_celery
433-
application_gearman: tests/application_gearman
418+
; application_gearman: tests/application_gearman
434419
component_djangorestframework: tests/component_djangorestframework
435420
component_flask_rest: tests/component_flask_rest
436421
component_graphqlserver: tests/component_graphqlserver

0 commit comments

Comments
 (0)