Skip to content

Commit 4113640

Browse files
authored
Merge pull request #250 from newrelic/update-python
Update to Python 3.11
2 parents 3732e00 + b56709b commit 4113640

16 files changed

+1973
-167
lines changed

.circleci/config.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,45 @@ orbs:
55
jobs:
66
test:
77
docker:
8-
- image: circleci/python:3.7
8+
- image: cimg/python:3.11
99
steps:
1010
- checkout
1111
- run:
1212
name: Run tests
1313
command: |
14-
sudo pip install -q -r dev-requirements.txt
15-
py.test --cov-report=xml --cov=newrelic_lambda_cli tests
14+
pip install -q -U pip
15+
pip install -q pipenv
16+
pipenv install --dev
17+
pipenv run pytest --cov-report=xml --cov=newrelic_lambda_cli tests
1618
- codecov/upload
1719

1820
code-style:
1921
docker:
20-
- image: circleci/python:3.7
22+
- image: cimg/python:3.11
2123
steps:
2224
- checkout
2325
- run:
2426
name: Check code style
2527
command: |
26-
sudo pip install -q -U pip
27-
sudo pip install -q -U 'black<22.10.1'
28+
pip install -q -U pip
29+
pip install -q -U 'black<22.10.1'
2830
black --check newrelic_lambda_cli tests
2931
- run:
3032
name: Check README
3133
command: |
32-
sudo pip install -q -U setuptools twine wheel
34+
pip install -q -U setuptools twine wheel
3335
python setup.py sdist
3436
twine check dist/*
3537
3638
release:
3739
docker:
38-
- image: circleci/python:3.7
40+
- image: cimg/python:3.11
3941
steps:
4042
- checkout
4143
- run:
4244
name: Install release dependencies
4345
command: |
44-
sudo pip install -q -U pyOpenSSL setuptools twine wheel
46+
pip install -q -U pyOpenSSL setuptools twine wheel
4547
- run:
4648
name: Release package
4749
command: |

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.7-slim
1+
FROM python:3.11-slim
22
RUN useradd -r -u 1000 newrelic-lambda-cli
33
USER newrelic-lambda-cli
44
WORKDIR /home/newrelic-lambda-cli

Pipfile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
boto3 = "*"
8+
click = "*"
9+
colorama = "*"
10+
emoji = "*"
11+
gql = "*"
12+
requests = "*"
13+
tabulate = "*"
14+
15+
[dev-packages]
16+
black = "*"
17+
pytest = "*"
18+
pytest-cov = "*"
19+
requests_toolbelt = "*"
20+
moto = {extras = ["all"], version = "*"}
21+
22+
[requires]
23+
python_version = "3.11"

Pipfile.lock

+1,762
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,14 @@ A CLI to install the New Relic AWS Lambda integration and layers.
4747
* python3.8
4848
* python3.9
4949
* python3.10
50+
* python3.11
5051

5152
**Note:** Automatic handler wrapping is only supported for Node.js, Python and Java. For other runtimes,
5253
manual function wrapping is required using the runtime specific New Relic agent.
5354

5455
## Requirements
5556

56-
* Python >= 3.3 < 3.10
57+
* Python >= 3.3 <= 3.11
5758
* Retrieve your [New relic Account ID](https://docs.newrelic.com/docs/accounts/install-new-relic/account-setup/account-id) and [User API Key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key)
5859

5960
## Recommendations

THIRD_PARTY_NOTICES.md

+120-49
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,131 @@
11
# Third Party Notices
22

3-
The newrelic-lambda-cli uses source code from third party libraries which carry their own copyright notices and license terms. These notices are provided below.
3+
The LambdaCLI uses source code from third party libraries which carry their own copyright notices and license terms. These notices are provided below.
44

55
the event that a required notice is missing or incorrect, please notify us by e-mailing [email protected].
66

7-
r any licenses that require the disclosure of source code, the source code can be found at [newrelic-lambda-cli](https://github.com/newrelic/newrelic-lambda-cli).
7+
r any licenses that require the disclosure of source code, the source code can be found at https://github.com/newrelic/LambdaCLI.
88

9-
## Content
9+
# Content
1010

1111
**[dependencies](#dependencies)**
1212

1313
**[devDependencies](#devdependencies)**
1414

15-
## Dependencies
16-
17-
| Name | Version | License |
18-
|-----------------|-----------|--------------------------------------------------------------|
19-
| Click | 7.0 | BSD |
20-
| Rx | 1.6.1 | Apache License |
21-
| boto3 | 1.10.22 | Apache License 2.0 |
22-
| botocore | 1.13.22 | Apache License 2.0 |
23-
| certifi | 2019.9.11 | MPL-2.0 |
24-
| chardet | 3.0.4 | LGPL |
25-
| colorama | 0.4.1 | BSD |
26-
| docutils | 0.15.2 | public domain, Python, 2-Clause BSD, GPL 3 (see COPYING.txt) |
27-
| gql | 0.1.0 | MIT |
28-
| graphql-core | 2.2.1 | MIT |
29-
| idna | 2.8 | BSD-like |
30-
| jmespath | 0.9.4 | MIT |
31-
| promise | 2.2.1 | MIT |
32-
| python-dateutil | 2.8.0 | Dual License |
33-
| requests | 2.22.0 | Apache 2.0 |
34-
| s3transfer | 0.2.1 | Apache License 2.0 |
35-
| six | 1.13.0 | MIT |
36-
| tabulate | 0.8.6 | MIT |
37-
| urllib3 | 1.25.7 | MIT |
38-
39-
## DevDependencies
40-
41-
| Name | Version | License |
42-
|-----------------|-----------|--------------------------------------------------------------|
43-
| Click | 7.0 | BSD |
44-
| Rx | 1.6.1 | Apache License |
45-
| boto3 | 1.10.10 | Apache License 2.0 |
46-
| botocore | 1.13.10 | Apache License 2.0 |
47-
| certifi | 2019.9.11 | MPL-2.0 |
48-
| chardet | 3.0.4 | LGPL |
49-
| docutils | 0.15.2 | public domain, Python, 2-Clause BSD, GPL 3 (see COPYING.txt) |
50-
| gql | 0.1.0 | MIT |
51-
| graphql-core | 2.2.1 | MIT |
52-
| idna | 2.8 | BSD-like |
53-
| jmespath | 0.9.4 | MIT |
54-
| promise | 2.2.1 | MIT |
55-
| python-dateutil | 2.8.0 | Dual License |
56-
| requests | 2.22.0 | Apache 2.0 |
57-
| s3transfer | 0.2.1 | Apache License 2.0 |
58-
| six | 1.13.0 | MIT |
59-
| tabulate | 0.8.5 | MIT |
60-
| urllib3 | 1.25.6 | MIT |
15+
# Dependencies
16+
17+
| Name | Version | License |
18+
|--------------------|------------|--------------------------------------|
19+
| backoff | 2.2.1 | MIT License |
20+
| boto3 | 1.29.4 | Apache Software License |
21+
| botocore | 1.32.4 | Apache Software License |
22+
| certifi | 2023.11.17 | Mozilla Public License 2.0 (MPL 2.0) |
23+
| charset-normalizer | 3.3.2 | MIT License |
24+
| click | 8.1.7 | BSD License |
25+
| colorama | 0.4.6 | BSD License |
26+
| distlib | 0.3.7 | Python Software Foundation License |
27+
| filelock | 3.13.1 | The Unlicense (Unlicense) |
28+
| gql | 3.4.1 | MIT |
29+
| graphql-core | 3.2.3 | MIT License |
30+
| idna | 3.4 | BSD License |
31+
| jmespath | 1.0.1 | MIT License |
32+
| multidict | 6.0.4 | Apache Software License |
33+
| pipenv | 2023.11.15 | MIT License |
34+
| platformdirs | 3.11.0 | MIT License |
35+
| python-dateutil | 2.8.2 | Apache Software License; BSD License |
36+
| requests | 2.31.0 | Apache Software License |
37+
| s3transfer | 0.7.0 | Apache Software License |
38+
| six | 1.16.0 | MIT License |
39+
| tabulate | 0.9.0 | MIT License |
40+
| urllib3 | 2.0.7 | MIT License |
41+
| virtualenv | 20.24.6 | MIT License |
42+
| yarl | 1.9.3 | Apache Software License |
43+
44+
# DevDependencies
45+
46+
| Name | Version | License |
47+
|---------------------------|------------|--------------------------------------|
48+
| Jinja2 | 3.1.2 | BSD License |
49+
| MarkupSafe | 2.1.3 | BSD License |
50+
| PyYAML | 6.0.1 | MIT License |
51+
| Werkzeug | 3.0.1 | BSD License |
52+
| annotated-types | 0.6.0 | MIT License |
53+
| attrs | 23.1.0 | MIT License |
54+
| aws-sam-translator | 1.80.0 | Apache Software License |
55+
| aws-xray-sdk | 2.12.1 | Apache Software License |
56+
| backoff | 2.2.1 | MIT License |
57+
| black | 23.11.0 | MIT License |
58+
| boto3 | 1.29.4 | Apache Software License |
59+
| botocore | 1.32.4 | Apache Software License |
60+
| certifi | 2023.11.17 | Mozilla Public License 2.0 (MPL 2.0) |
61+
| cffi | 1.16.0 | MIT License |
62+
| cfn-lint | 0.83.3 | MIT License |
63+
| charset-normalizer | 3.3.2 | MIT License |
64+
| click | 8.1.7 | BSD License |
65+
| colorama | 0.4.6 | BSD License |
66+
| coverage | 7.3.2 | Apache Software License |
67+
| cryptography | 41.0.5 | Apache Software License; BSD License |
68+
| distlib | 0.3.7 | Python Software Foundation License |
69+
| docker | 6.1.3 | Apache Software License |
70+
| ecdsa | 0.18.0 | MIT |
71+
| filelock | 3.13.1 | The Unlicense (Unlicense) |
72+
| gql | 3.4.1 | MIT |
73+
| graphql-core | 3.2.3 | MIT License |
74+
| idna | 3.4 | BSD License |
75+
| iniconfig | 2.0.0 | MIT License |
76+
| jmespath | 1.0.1 | MIT License |
77+
| jschema-to-python | 1.2.3 | MIT License |
78+
| jsondiff | 2.0.0 | MIT License |
79+
| jsonpatch | 1.33 | BSD License |
80+
| jsonpickle | 3.0.2 | BSD License |
81+
| jsonpointer | 2.4 | BSD License |
82+
| jsonschema | 4.20.0 | MIT License |
83+
| jsonschema-path | 0.3.2 | Apache Software License |
84+
| jsonschema-specifications | 2023.11.1 | MIT License |
85+
| junit-xml | 1.9 | Freely Distributable; MIT License |
86+
| lazy-object-proxy | 1.9.0 | BSD License |
87+
| moto | 4.2.9 | Apache Software License |
88+
| mpmath | 1.3.0 | BSD License |
89+
| multidict | 6.0.4 | Apache Software License |
90+
| multipart | 0.2.4 | MIT License |
91+
| mypy-extensions | 1.0.0 | MIT License |
92+
| networkx | 3.2.1 | BSD License |
93+
| openapi-schema-validator | 0.6.2 | BSD License |
94+
| openapi-spec-validator | 0.7.1 | Apache Software License |
95+
| packaging | 23.2 | Apache Software License; BSD License |
96+
| pathable | 0.4.3 | Other/Proprietary License |
97+
| pathspec | 0.11.2 | Mozilla Public License 2.0 (MPL 2.0) |
98+
| pbr | 6.0.0 | Apache Software License |
99+
| pipenv | 2023.11.15 | MIT License |
100+
| platformdirs | 4.0.0 | MIT License |
101+
| pluggy | 1.3.0 | MIT License |
102+
| py-partiql-parser | 0.4.2 | MIT |
103+
| pyasn1 | 0.5.1 | BSD License |
104+
| pycparser | 2.21 | BSD License |
105+
| pydantic | 2.5.1 | MIT License |
106+
| pydantic_core | 2.14.3 | MIT License |
107+
| pyparsing | 3.1.1 | MIT License |
108+
| pytest | 7.4.3 | MIT License |
109+
| pytest-cov | 4.1.0 | MIT License |
110+
| python-dateutil | 2.8.2 | Apache Software License; BSD License |
111+
| python-jose | 3.3.0 | MIT License |
112+
| referencing | 0.31.0 | MIT License |
113+
| regex | 2023.10.3 | Apache Software License |
114+
| requests | 2.31.0 | Apache Software License |
115+
| responses | 0.24.1 | Apache 2.0 |
116+
| rfc3339-validator | 0.1.4 | MIT License |
117+
| rpds-py | 0.13.1 | MIT License |
118+
| rsa | 4.9 | Apache Software License |
119+
| s3transfer | 0.7.0 | Apache Software License |
120+
| sarif-om | 1.0.4 | MIT License |
121+
| six | 1.16.0 | MIT License |
122+
| sshpubkeys | 3.3.1 | BSD License |
123+
| sympy | 1.12 | BSD License |
124+
| tabulate | 0.9.0 | MIT License |
125+
| typing_extensions | 4.8.0 | Python Software Foundation License |
126+
| urllib3 | 2.0.7 | MIT License |
127+
| virtualenv | 20.24.6 | MIT License |
128+
| websocket-client | 1.6.4 | Apache Software License |
129+
| wrapt | 1.16.0 | BSD License |
130+
| xmltodict | 0.13.0 | MIT License |
131+
| yarl | 1.9.3 | Apache Software License |

dev-requirements.txt

-57
This file was deleted.

gen_third_party.sh

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
PROJECT=$(basename $PWD)
33

44
function getdeps {
5-
REQSFILE=$1; shift
5+
FLAGS=$1; shift
66
(
77
TMPINSTALL=`mktemp -d /tmp/${PROJECT}-getdeps.XXXXXX` || exit 1
88

99
(
1010
# Record install deps
11-
if [ ! -d $TMPINSTALL/pyenv ]; then
12-
virtualenv $TMPINSTALL/pyenv
11+
if [ ! -d $TMPINSTALL/venv ]; then
12+
virtualenv $TMPINSTALL/venv
1313
fi
1414
) 2>&1 >/dev/null
1515

16-
# Activate pyenv
17-
. $TMPINSTALL/pyenv/bin/activate
16+
# Activate venv
17+
. $TMPINSTALL/venv/bin/activate
1818

1919
# Isolate output from installations
2020
(
21-
pip install pip-licenses;
22-
pip install -r $REQSFILE
21+
pip install pip-licenses pipenv;
22+
PIPENV_VERBOSITY=-1 pipenv install $FLAGS
2323
) 2>&1 >/dev/null
2424

2525
# Generate markdown report
@@ -44,9 +44,9 @@ r any licenses that require the disclosure of source code, the source code can b
4444
4545
# Dependencies
4646
47-
$(getdeps requirements.txt)
47+
$(getdeps)
4848
4949
# DevDependencies
5050
51-
$(getdeps dev-requirements.txt)
51+
$(getdeps --dev)
5252
EOF

0 commit comments

Comments
 (0)