Skip to content

Commit 4f53932

Browse files
author
Rocco Zanni
authored
Merge pull request #9 from spreaker/python311
Upgrade Python to 3.11 and dependencies to latest version
2 parents 265c298 + 873fa51 commit 4f53932

File tree

7 files changed

+22
-14
lines changed

7 files changed

+22
-14
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### 2.0.0 (2023-09-25)
4+
- Upgrade to Python 3.11
5+
- Upgrade dependencies
6+
37
### 1.1.2 (2019-06-12)
48
- Release 1.1.2 that fixes multithreading sessions with boto3 client
59

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM alpine:3.9
1+
FROM alpine:3.18
22

3-
RUN apk add --update --no-cache python3~=3.6 && \
4-
python3 -m pip install prometheus-aws-guardduty-exporter==1.1.2 --no-cache-dir
3+
RUN apk add --update --no-cache python3~=3.11 && \
4+
python3 -m pip install prometheus-aws-guardduty-exporter==2.0.0 --no-cache-dir
55

66
# Run as non-root
77
RUN adduser app -S -u 1000

Dockerfile-dev

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
FROM alpine:3.9
1+
FROM alpine:3.18
22

33
# Installing required packages
44
RUN apk add --update --no-cache \
5-
python3~=3.6
5+
gcc libc-dev libffi-dev \
6+
python3~=3.11 python3-dev~=3.11 \
7+
py3-pip
68

79
# Install app code
810
RUN mkdir /app

LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2019 - Spreaker, Inc.
1+
Copyright 2023 - Spreaker, Inc.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

docker-compose.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ services:
99
volumes:
1010
- .:/app:delegated
1111
- ~/.aws:/home/app/.aws:ro
12+
environment:
13+
- AWS_DEFAULT_REGION=us-east-1

prometheus_aws_guardduty_exporter/cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def main(args):
2626

2727
# Init logger
2828
logHandler = logging.StreamHandler()
29-
formatter = jsonlogger.JsonFormatter("(asctime) (levelname) (message)", datefmt="%Y-%m-%d %H:%M:%S")
29+
formatter = jsonlogger.JsonFormatter("%(asctime)s %(levelname)s %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
3030
logHandler.setFormatter(formatter)
3131

3232
logger = logging.getLogger()

setup.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from setuptools import setup
33

44
# Version
5-
version = "1.1.2"
5+
version = "2.0.0"
66

77
# Requires Python 3
88
if sys.version_info.major < 3:
@@ -19,18 +19,18 @@
1919
description = 'Prometheus exporter for AWS GuardDuty',
2020
long_description = long_description,
2121
long_description_content_type = 'text/markdown',
22-
author = 'Marco Pracucci',
23-
author_email = 'marco@pracucci.com',
22+
author = 'Spreaker',
23+
author_email = 'dev@spreaker.com',
2424
url = 'https://github.com/spreaker/prometheus-aws-guardduty-exporter',
2525
download_url = f'https://github.com/spreaker/prometheus-aws-guardduty-exporter/archive/{version}.tar.gz',
2626
keywords = ['prometheus', 'aws', 'guardduty'],
2727
classifiers = [],
28-
python_requires = ' >= 3',
29-
install_requires = ["boto3==1.9.148", "python-json-logger==0.1.11", "prometheus_client==0.6.0"],
28+
python_requires = ' >= 3.11',
29+
install_requires = ["boto3==1.28.53", "python-json-logger==2.0.7", "prometheus_client==0.17.1"],
3030
extras_require = {
3131
'dev': [
32-
'flake8==3.7.7',
33-
'twine==1.13.0'
32+
'flake8==6.1.0',
33+
'twine==4.0.2'
3434
]
3535
},
3636
entry_points = {

0 commit comments

Comments
 (0)