Skip to content

Commit

Permalink
Remove Python 2.7 and pypy2 testing (#835)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
lrafeei authored Jun 21, 2023
1 parent 668b0a9 commit abb6405
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 134 deletions.
16 changes: 8 additions & 8 deletions .github/actions/setup-python-matrix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ runs:
python-version: "pypy-3.7"
architecture: x64

- uses: actions/setup-python@v4
with:
python-version: "pypy-2.7"
architecture: x64
# - uses: actions/setup-python@v4
# with:
# python-version: "pypy-2.7"
# architecture: x64

- uses: actions/setup-python@v4
with:
Expand All @@ -38,10 +38,10 @@ runs:
python-version: "3.11"
architecture: x64

- uses: actions/setup-python@v4
with:
python-version: "2.7"
architecture: x64
# - uses: actions/setup-python@v4
# with:
# python-version: "2.7"
# architecture: x64

- name: Install Dependencies
shell: bash
Expand Down
98 changes: 49 additions & 49 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- python
- elasticsearchserver07
- elasticsearchserver08
- gearman
# - gearman
- grpc
#- kafka
- libcurl
Expand Down Expand Up @@ -769,51 +769,51 @@ jobs:
path: ./**/.coverage.*
retention-days: 1

gearman:
env:
TOTAL_GROUPS: 1

strategy:
fail-fast: false
matrix:
group-number: [1]

runs-on: ubuntu-20.04
timeout-minutes: 30

services:
gearman:
image: artefactual/gearmand
ports:
- 4730:4730
# Set health checks to wait until gearman has started
options: >-
--health-cmd "(echo status ; sleep 0.1) | nc 127.0.0.1 4730 -w 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-python-matrix

- name: Get Environments
id: get-envs
run: |
echo "envs=$(tox -l | grep '^${{ github.job }}\-' | ./.github/workflows/get-envs.py)" >> $GITHUB_OUTPUT
env:
GROUP_NUMBER: ${{ matrix.group-number }}

- name: Test
run: |
tox -vv -e ${{ steps.get-envs.outputs.envs }} -p auto
env:
TOX_PARALLEL_NO_SPINNER: 1
PY_COLORS: 0

- name: Upload Coverage Artifacts
uses: actions/upload-artifact@v3
with:
name: coverage-${{ github.job }}-${{ strategy.job-index }}
path: ./**/.coverage.*
retention-days: 1
# gearman:
# env:
# TOTAL_GROUPS: 1

# strategy:
# fail-fast: false
# matrix:
# group-number: [1]

# runs-on: ubuntu-20.04
# timeout-minutes: 30

# services:
# gearman:
# image: artefactual/gearmand
# ports:
# - 4730:4730
# # Set health checks to wait until gearman has started
# options: >-
# --health-cmd "(echo status ; sleep 0.1) | nc 127.0.0.1 4730 -w 1"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5

# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/setup-python-matrix

# - name: Get Environments
# id: get-envs
# run: |
# echo "envs=$(tox -l | grep '^${{ github.job }}\-' | ./.github/workflows/get-envs.py)" >> $GITHUB_OUTPUT
# env:
# GROUP_NUMBER: ${{ matrix.group-number }}

# - name: Test
# run: |
# tox -vv -e ${{ steps.get-envs.outputs.envs }} -p auto
# env:
# TOX_PARALLEL_NO_SPINNER: 1
# PY_COLORS: 0

# - name: Upload Coverage Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: coverage-${{ github.job }}-${{ strategy.job-index }}
# path: ./**/.coverage.*
# retention-days: 1
30 changes: 15 additions & 15 deletions newrelic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3029,21 +3029,21 @@ def _process_module_builtin_defaults():

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

_process_module_definition(
"gearman.client",
"newrelic.hooks.application_gearman",
"instrument_gearman_client",
)
_process_module_definition(
"gearman.connection_manager",
"newrelic.hooks.application_gearman",
"instrument_gearman_connection_manager",
)
_process_module_definition(
"gearman.worker",
"newrelic.hooks.application_gearman",
"instrument_gearman_worker",
)
# _process_module_definition(
# "gearman.client",
# "newrelic.hooks.application_gearman",
# "instrument_gearman_client",
# )
# _process_module_definition(
# "gearman.connection_manager",
# "newrelic.hooks.application_gearman",
# "instrument_gearman_connection_manager",
# )
# _process_module_definition(
# "gearman.worker",
# "newrelic.hooks.application_gearman",
# "instrument_gearman_worker",
# )

_process_module_definition(
"botocore.endpoint",
Expand Down
109 changes: 47 additions & 62 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
[tox]
setupdir = {toxinidir}
envlist =
python-adapter_cheroot-{py27,py37,py38,py39,py310,py311},
python-adapter_cheroot-{py37,py38,py39,py310,py311},
python-adapter_daphne-{py37,py38,py39,py310,py311}-daphnelatest,
python-adapter_daphne-py38-daphne{0204,0205},
python-adapter_gevent-{py27,py37,py38,py310,py311},
python-adapter_gevent-{py37,py38,py310,py311},
python-adapter_gunicorn-{py37,py38,py39,py310,py311}-aiohttp3-gunicornlatest,
python-adapter_hypercorn-{py37,py38,py39,py310,py311}-hypercornlatest,
python-adapter_hypercorn-py38-hypercorn{0010,0011,0012,0013},
Expand All @@ -54,123 +54,108 @@ envlist =
python-adapter_waitress-{py37,py38,py39}-waitress010404,
python-adapter_waitress-{py37,py38,py39,py310}-waitress02,
python-adapter_waitress-{py37,py38,py39,py310,py311}-waitresslatest,
python-agent_features-{py27,py37,py38,py39,py310,py311}-{with,without}_extensions,
python-agent_features-{pypy,pypy37}-without_extensions,
python-agent_streaming-py27-grpc0125-{with,without}_extensions,
python-agent_features-{py37,py38,py39,py310,py311}-{with,without}_extensions,
python-agent_features-{pypy37}-without_extensions,
python-agent_streaming-{py37,py38,py39,py310,py311}-protobuf04-{with,without}_extensions,
python-agent_streaming-py39-protobuf{03,0319}-{with,without}_extensions,
python-agent_unittests-{py27,py37,py38,py39,py310,py311}-{with,without}_extensions,
python-agent_unittests-{pypy,pypy37}-without_extensions,
python-application_celery-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
gearman-application_gearman-{py27,pypy},
python-component_djangorestframework-py27-djangorestframework0300,
python-agent_unittests-{py37,py38,py39,py310,py311}-{with,without}_extensions,
python-agent_unittests-{pypy37}-without_extensions,
python-application_celery-{py37,py38,py39,py310,py311,pypy37},
python-component_djangorestframework-{py37,py38,py39,py310,py311}-djangorestframeworklatest,
python-component_flask_rest-{py37,py38,py39,pypy37}-flaskrestxlatest,
python-component_flask_rest-{py27,pypy}-flaskrestx051,
python-component_graphqlserver-{py37,py38,py39,py310,py311},
python-component_tastypie-{py27,pypy}-tastypie0143,
python-component_tastypie-{py37,py38,py39,pypy37}-tastypie{0143,latest},
python-coroutines_asyncio-{py37,py38,py39,py310,py311,pypy37},
python-cross_agent-{py27,py37,py38,py39,py310,py311}-{with,without}_extensions,
python-cross_agent-pypy-without_extensions,
python-cross_agent-{py37,py38,py39,py310,py311}-{with,without}_extensions,
postgres-datastore_asyncpg-{py37,py38,py39,py310,py311},
memcached-datastore_bmemcached-{pypy,py27,py37,py38,py39,py310,py311}-memcached030,
elasticsearchserver07-datastore_elasticsearch-{py27,py37,py38,py39,py310,py311,pypy,pypy37}-elasticsearch07,
memcached-datastore_bmemcached-{py37,py38,py39,py310,py311}-memcached030,
elasticsearchserver07-datastore_elasticsearch-{py37,py38,py39,py310,py311,pypy37}-elasticsearch07,
elasticsearchserver08-datastore_elasticsearch-{py37,py38,py39,py310,py311,pypy37}-elasticsearch08,
memcached-datastore_memcache-{py27,py37,py38,py39,py310,py311,pypy,pypy37}-memcached01,
mysql-datastore_mysql-mysql080023-py27,
memcached-datastore_memcache-{py37,py38,py39,py310,py311,pypy37}-memcached01,
mysql-datastore_mysql-mysqllatest-{py37,py38,py39,py310,py311},
postgres-datastore_postgresql-{py37,py38,py39},
postgres-datastore_psycopg2-{py27,py37,py38,py39,py310,py311}-psycopg2latest
postgres-datastore_psycopg2cffi-{py27,pypy,py37,py38,py39,py310,py311}-psycopg2cffilatest,
postgres-datastore_pyodbc-{py27,py37,py311}-pyodbclatest
memcached-datastore_pylibmc-{py27,py37},
memcached-datastore_pymemcache-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
mongodb-datastore_pymongo-{py27,py37,py38,py39,py310,py311,pypy}-pymongo{03},
mongodb-datastore_pymongo-{py37,py38,py39,py310,py311,pypy,pypy37}-pymongo04,
mysql-datastore_pymysql-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
solr-datastore_pysolr-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
redis-datastore_redis-{py27,py37,py38,pypy,pypy37}-redis03,
postgres-datastore_psycopg2-{py37,py38,py39,py310,py311}-psycopg2latest,
postgres-datastore_psycopg2cffi-{py37,py38,py39,py310,py311}-psycopg2cffilatest,
postgres-datastore_pyodbc-{py37,py311}-pyodbclatest,
memcached-datastore_pylibmc-{py37},
memcached-datastore_pymemcache-{py37,py38,py39,py310,py311,pypy37},
mongodb-datastore_pymongo-{py37,py38,py39,py310,py311}-pymongo{03},
mongodb-datastore_pymongo-{py37,py38,py39,py310,py311,pypy37}-pymongo04,
mysql-datastore_pymysql-{py37,py38,py39,py310,py311,pypy37},
solr-datastore_pysolr-{py37,py38,py39,py310,py311,pypy37},
redis-datastore_redis-{py37,py38,pypy37}-redis03,
redis-datastore_redis-{py37,py38,py39,py310,py311,pypy37}-redis{0400,latest},
redis-datastore_aioredis-{py37,py38,py39,py310,pypy37}-aioredislatest,
redis-datastore_aioredis-{py37,py310}-aioredis01,
redis-datastore_aioredis-{py37,py38,py39,py310,py311,pypy37}-redislatest,
redis-datastore_aredis-{py37,py38,py39,pypy37}-aredislatest,
solr-datastore_solrpy-{py27,pypy}-solrpy{00,01},
python-datastore_sqlite-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
python-external_boto3-{py27,py37,py38,py39,py310,py311}-boto01,
python-datastore_sqlite-{py37,py38,py39,py310,py311,pypy37},
python-external_boto3-{py37,py38,py39,py310,py311}-boto01,
python-external_botocore-{py37,py38,py39,py310,py311}-botocorelatest,
python-external_botocore-{py311}-botocore128,
python-external_botocore-py310-botocore0125,
python-external_feedparser-py27-feedparser{05,06},
python-external_http-{py27,py37,py38,py39,py310,py311,pypy},
python-external_httplib-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
python-external_httplib2-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
python-external_http-{py37,py38,py39,py310,py311},
python-external_httplib-{py37,py38,py39,py310,py311,pypy37},
python-external_httplib2-{py37,py38,py39,py310,py311,pypy37},
python-external_httpx-{py37,py38,py39,py310,py311},
python-external_requests-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
python-external_urllib3-{py27,py37,pypy}-urllib3{0109},
python-external_urllib3-{py27,py37,py38,py39,py310,py311,pypy,pypy37}-urllib3latest,
python-external_requests-{py37,py38,py39,py310,py311,pypy37},
python-external_urllib3-{py37}-urllib3{0109},
python-external_urllib3-{py37,py38,py39,py310,py311,pypy37}-urllib3latest,
python-framework_aiohttp-{py37,py38,py39,py310,py311,pypy37}-aiohttp03,
python-framework_ariadne-{py37,py38,py39,py310,py311}-ariadnelatest,
python-framework_ariadne-py37-ariadne{0011,0012,0013},
python-framework_bottle-py27-bottle{0008,0009,0010},
python-framework_bottle-{py27,py37,py38,py39,pypy37}-bottle{0011,0012},
python-framework_bottle-{py37,py38,py39,pypy37}-bottle{0011,0012},
python-framework_bottle-{py310,py311}-bottle0012,
python-framework_bottle-pypy-bottle{0008,0009,0010,0011,0012},
; CherryPy still uses inspect.getargspec, deprecated in favor of inspect.getfullargspec. Not supported in 3.11
python-framework_cherrypy-{py37,py38,py39,py310,py311,pypy37}-CherryPylatest,
python-framework_django-{pypy,py27}-Django0103,
python-framework_django-{pypy,py27,py37}-Django0108,
python-framework_django-{py37}-Django0108,
python-framework_django-{py39}-Django{0200,0201,0202,0300,0301,latest},
python-framework_django-{py37,py38,py39,py310,py311}-Django0302,
python-framework_falcon-{py27,py37,py38,py39,pypy,pypy37}-falcon0103,
python-framework_falcon-{py37,py38,py39,pypy37}-falcon0103,
python-framework_falcon-{py37,py38,py39,py310,pypy37}-falcon{0200,master},
# Falcon master branch failing on 3.11 currently.
python-framework_falcon-py311-falcon0200,
python-framework_fastapi-{py37,py38,py39,py310,py311},
python-framework_flask-{pypy,py27}-flask0012,
python-framework_flask-{pypy,py27,py37,py38,py39,py310,py311,pypy37}-flask0101,
python-framework_flask-{py37,py38,py39,py310,py311,pypy37}-flask0101,
; temporarily disabling flaskmaster tests
python-framework_flask-{py37,py38,py39,py310,py311,pypy37}-flask{latest},
python-framework_graphene-{py37,py38,py39,py310,py311}-graphenelatest,
python-framework_graphene-{py27,py37,py38,py39,pypy,pypy37}-graphene{0200,0201},
python-framework_graphene-{py37,py38,py39,pypy37}-graphene{0200,0201},
python-framework_graphene-{py310,py311}-graphene0201,
python-framework_graphql-{py27,py37,py38,py39,py310,py311,pypy,pypy37}-graphql02,
python-framework_graphql-{py37,py38,py39,py310,py311,pypy37}-graphql02,
python-framework_graphql-{py37,py38,py39,py310,py311,pypy37}-graphql03,
; temporarily disabling graphqlmaster tests
python-framework_graphql-py37-graphql{0202,0203,0300,0301,0302},
grpc-framework_grpc-py27-grpc0125,
grpc-framework_grpc-{py37,py38,py39,py310,py311}-grpclatest,
python-framework_pyramid-{pypy,py27,py38}-Pyramid0104,
python-framework_pyramid-{pypy,py27,pypy37,py37,py38,py39,py310,py311}-Pyramid0110-cornice,
python-framework_pyramid-{py38}-Pyramid0104,
python-framework_pyramid-{pypy37,py37,py38,py39,py310,py311}-Pyramid0110-cornice,
python-framework_pyramid-{py37,py38,py39,py310,py311,pypy37}-Pyramidlatest,
python-framework_sanic-{py38,pypy37}-sanic{190301,1906,1912,200904,210300,2109,2112,2203,2290},
python-framework_sanic-{py37,py38,py39,py310,py311,pypy37}-saniclatest,
python-framework_starlette-{py310,pypy37}-starlette{0014,0015,0019},
python-framework_starlette-{py37,py38}-starlette{002001},
python-framework_starlette-{py37,py38,py39,py310,py311,pypy37}-starlettelatest,
python-framework_strawberry-{py37,py38,py39,py310,py311}-strawberrylatest,
python-logger_logging-{py27,py37,py38,py39,py310,py311,pypy,pypy37},
python-logger_logging-{py37,py38,py39,py310,py311,pypy37},
python-logger_loguru-{py37,py38,py39,py310,py311,pypy37}-logurulatest,
python-logger_loguru-py39-loguru{06,05,04,03},
libcurl-framework_tornado-{py37,py38,py39,py310,py311,pypy37}-tornado0600,
libcurl-framework_tornado-{py38,py39,py310,py311}-tornadomaster,
rabbitmq-messagebroker_pika-{py27,py37,py38,py39,pypy,pypy37}-pika0.13,
rabbitmq-messagebroker_pika-{py37,py38,py39,pypy37}-pika0.13,
rabbitmq-messagebroker_pika-{py37,py38,py39,py310,py311,pypy37}-pikalatest,
kafka-messagebroker_confluentkafka-{py27,py37,py38,py39,py310,py311}-confluentkafkalatest,
kafka-messagebroker_confluentkafka-{py27,py39}-confluentkafka{0107,0106},
kafka-messagebroker_confluentkafka-{py37,py38,py39,py310,py311}-confluentkafkalatest,
kafka-messagebroker_confluentkafka-{py39}-confluentkafka{0107,0106},
; confluent-kafka had a bug in 1.8.2's setup.py file which was incompatible with 2.7.
kafka-messagebroker_confluentkafka-{py39}-confluentkafka{0108},
kafka-messagebroker_kafkapython-{pypy,py27,py37,py38,pypy37}-kafkapythonlatest,
kafka-messagebroker_kafkapython-{py27,py38}-kafkapython{020001,020000,0104},
python-template_genshi-{py27,py37,py311}-genshilatest
python-template_mako-{py27,py37,py310,py311}
kafka-messagebroker_kafkapython-{py37,py38,pypy37}-kafkapythonlatest,
kafka-messagebroker_kafkapython-{py38}-kafkapython{020001,020000,0104},
python-template_genshi-{py37,py311}-genshilatest,
python-template_mako-{py37,py310,py311},

[testenv]
deps =
# Base Dependencies
{py37,py38,py39,py310,py311,pypy37}: pytest==7.2.2
{py27,pypy}: pytest==4.6.11
iniconfig
coverage
WebTest==2.0.35
Expand Down Expand Up @@ -202,7 +187,7 @@ deps =
agent_features: beautifulsoup4
application_celery: celery<6.0
application_celery-py{py37,37}: importlib-metadata<5.0
application_gearman: gearman<3.0.0
; application_gearman: gearman<3.0.0
component_djangorestframework-djangorestframework0300: Django<1.9
component_djangorestframework-djangorestframework0300: djangorestframework<3.1
component_djangorestframework-djangorestframeworklatest: Django
Expand Down Expand Up @@ -430,7 +415,7 @@ changedir =
agent_streaming: tests/agent_streaming
agent_unittests: tests/agent_unittests
application_celery: tests/application_celery
application_gearman: tests/application_gearman
; application_gearman: tests/application_gearman
component_djangorestframework: tests/component_djangorestframework
component_flask_rest: tests/component_flask_rest
component_graphqlserver: tests/component_graphqlserver
Expand Down

0 comments on commit abb6405

Please sign in to comment.