Skip to content

Commit c339504

Browse files
authored
Merge branch 'main' into ecs-docker-id
2 parents 1df2a58 + 286a714 commit c339504

File tree

503 files changed

+2961
-6402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

503 files changed

+2961
-6402
lines changed

.github/containers/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ RUN echo 'eval "$(pyenv init -)"' >>${HOME}/.bashrc && \
9696
pyenv update
9797

9898
# Install Python
99-
ARG PYTHON_VERSIONS="3.11 3.10 3.9 3.8 3.7 3.12 2.7 pypy2.7-7.3.12 pypy3.10-7.3.15"
99+
ARG PYTHON_VERSIONS="3.11 3.10 3.9 3.8 3.7 3.12 pypy3.10-7.3.15"
100100
COPY --chown=1000:1000 --chmod=+x ./install-python.sh /tmp/install-python.sh
101101
RUN /tmp/install-python.sh && \
102102
rm /tmp/install-python.sh

.github/containers/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ REPO_ROOT:=$(realpath ${MAKEFILE_DIR}../../)
2323
UNAME_P:=$(shell uname -p)
2424
PLATFORM_AUTOMATIC:=$(if $(findstring arm,${UNAME_P}),linux/arm64,linux/amd64)
2525
PLATFORM:=$(if ${PLATFORM_OVERRIDE},${PLATFORM_OVERRIDE},${PLATFORM_AUTOMATIC})
26-
PYTHON_VERSIONS_AUTOMATIC:=3.10 2.7
26+
PYTHON_VERSIONS_AUTOMATIC:=3.10
2727
PYTHON_VERSIONS:=$(if ${PYTHON_VERSIONS_OVERRIDE},${PYTHON_VERSIONS_OVERRIDE},${PYTHON_VERSIONS_AUTOMATIC})
2828

2929
.PHONY: default
@@ -70,6 +70,5 @@ test: build
7070
ghcr.io/newrelic/python-agent-ci:local \
7171
/bin/bash -c '\
7272
python3.10 --version && \
73-
python2.7 --version && \
7473
touch tox.ini && tox --version && \
7574
echo "Success! Python versions installed."'

.github/containers/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ isort
55
pip
66
setuptools
77
tox
8-
virtualenv<20.22.0
8+
virtualenv
99
wheel

.github/workflows/deploy-python.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -64,35 +64,6 @@ jobs:
6464
path: ./wheelhouse/*.whl
6565
retention-days: 1
6666

67-
build-linux-py2:
68-
runs-on: ubuntu-latest
69-
70-
steps:
71-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1
72-
with:
73-
persist-credentials: false
74-
fetch-depth: 0
75-
76-
- name: Setup QEMU
77-
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # 3.0.0
78-
79-
- name: Build Wheels
80-
uses: pypa/cibuildwheel@bf3a5590c9aeb9a7e4ff4025ef7400e0c6ad1248 # 1.12.0 (Last release to support Python 2)
81-
env:
82-
CIBW_PLATFORM: linux
83-
CIBW_BUILD: cp27-manylinux_x86_64
84-
CIBW_ARCHS_LINUX: x86_64
85-
CIBW_ENVIRONMENT: "LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib"
86-
CIBW_TEST_REQUIRES: pytest==4.6.11
87-
CIBW_TEST_COMMAND: "PYTHONPATH={project}/tests pytest {project}/tests/agent_unittests -vx"
88-
89-
- name: Upload Artifacts
90-
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # 4.3.1
91-
with:
92-
name: ${{ github.job }}
93-
path: ./wheelhouse/*.whl
94-
retention-days: 1
95-
9667
build-sdist:
9768
runs-on: ubuntu-latest
9869
steps:
@@ -130,7 +101,6 @@ jobs:
130101

131102
needs:
132103
- build-linux-py3
133-
- build-linux-py2
134104
- build-sdist
135105

136106
steps:

.github/workflows/get-envs.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ def main(f):
2525
filtered_envs = environments[GROUP_NUMBER::TOTAL_GROUPS]
2626
joined_envs = ",".join(filtered_envs)
2727

28-
assert joined_envs, "No environments found.\nenvironments = %s\nGROUP_NUMBER = %d\nTOTAL_GROUPS = %d" % (
29-
str(environments),
30-
GROUP_NUMBER + 1,
31-
TOTAL_GROUPS,
32-
)
28+
assert joined_envs, f"No environments found.\nenvironments = {str(environments)}\nGROUP_NUMBER = {GROUP_NUMBER + 1}\nTOTAL_GROUPS = {TOTAL_GROUPS}"
3329
print(joined_envs)
3430

3531

THIRD_PARTY_NOTICES.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ Distributed under the following license(s):
3535
* [The Apache License, Version 2.0 License](https://opensource.org/license/apache-2-0/)
3636

3737

38-
## [six](https://pypi.org/project/six)
39-
40-
Copyright (c) 2010-2013 Benjamin Peterson
41-
42-
Distributed under the following license(s):
43-
44-
* [The MIT License](http://opensource.org/licenses/MIT)
45-
46-
4738
## [time.monotonic](newrelic/common/_monotonic.c)
4839

4940
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Python Software Foundation; All Rights Reserved

codecov.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,13 @@ ignore:
66
- "newrelic/hooks/adapter_meinheld.py"
77
- "newrelic/hooks/adapter_paste.py"
88
- "newrelic/hooks/component_piston.py"
9-
- "newrelic/hooks/database_oursql.py"
109
- "newrelic/hooks/database_psycopg2ct.py"
1110
- "newrelic/hooks/datastore_aioredis.py"
1211
- "newrelic/hooks/datastore_aredis.py"
1312
- "newrelic/hooks/datastore_motor.py"
1413
- "newrelic/hooks/datastore_pyelasticsearch.py"
15-
- "newrelic/hooks/datastore_umemcache.py"
1614
- "newrelic/hooks/external_dropbox.py"
1715
- "newrelic/hooks/external_facepy.py"
18-
- "newrelic/hooks/external_pywapi.py"
1916
- "newrelic/hooks/external_xmlrpclib.py"
20-
- "newrelic/hooks/framework_pylons.py"
21-
- "newrelic/hooks/framework_web2py.py"
22-
- "newrelic/hooks/framework_webpy.py"
23-
- "newrelic/hooks/middleware_weberror.py"
2417
- "newrelic/packages/*"
2518
- "newrelic/packages/**/*"

newrelic/admin/__init__.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from __future__ import print_function
16-
1715
import logging
1816
import sys
1917

@@ -51,7 +49,7 @@ def usage(name):
5149
details = _commands[name]
5250
if details.deprecated:
5351
print("[WARNING] This command is deprecated and will be removed")
54-
print("Usage: newrelic-admin %s %s" % (name, details.options))
52+
print(f"Usage: newrelic-admin {name} {details.options}")
5553

5654

5755
@command("help", "[command]", hidden=True)
@@ -74,18 +72,18 @@ def help(args):
7472
name = args[0]
7573

7674
if name not in _commands:
77-
print("Unknown command '%s'." % name, end=" ")
75+
print(f"Unknown command '{name}'.", end=" ")
7876
print("Type 'newrelic-admin help' for usage.")
7977

8078
else:
8179
details = _commands[name]
8280

83-
print("Usage: newrelic-admin %s %s" % (name, details.options))
81+
print(f"Usage: newrelic-admin {name} {details.options}")
8482
if details.description:
8583
print()
8684
description = details.description
8785
if details.deprecated:
88-
description = "[DEPRECATED] " + description
86+
description = f"[DEPRECATED] {description}"
8987
print(description)
9088

9189

@@ -117,7 +115,7 @@ def emit(self, record):
117115

118116
def load_internal_plugins():
119117
for name in _builtin_plugins:
120-
module_name = "%s.%s" % (__name__, name)
118+
module_name = f"{__name__}.{name}"
121119
__import__(module_name)
122120

123121

@@ -151,7 +149,7 @@ def main():
151149
callback = _commands[command]
152150

153151
except Exception:
154-
print("Unknown command '%s'." % command, end="")
152+
print(f"Unknown command '{command}'.", end="")
155153
print("Type 'newrelic-admin help' for usage.")
156154
sys.exit(1)
157155

newrelic/admin/debug_console.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from __future__ import print_function
16-
1715
from newrelic.admin import command, usage
1816

1917
@command('debug-console', 'config_file [session_log]',

newrelic/admin/generate_config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from __future__ import print_function
16-
1715
from newrelic.admin import command, usage
1816

1917
@command('generate-config', 'license_key [output_file]',

0 commit comments

Comments
 (0)