Skip to content

Commit 0a40996

Browse files
authored
Merge pull request #1706 from nsano-rururu/support_python_314
support python 3.14
2 parents f3d3ced + a2b92cc commit 0a40996

File tree

10 files changed

+61
-40
lines changed

10 files changed

+61
-40
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@
88

99
## Other changes
1010
- Fix percentile metric_aggregation rule error for rules with compound query keys - [#1701](https://github.com/jertel/elastalert2/pull/1701) - @jhatcher1
11+
- Support Python 3.14 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
12+
- Update library: boto3 to 1.40.59 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
13+
- Update library: cffi to 2.0.0 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
14+
- Update library: jinja2 to 3.1.6 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
15+
- Update library: jira to 3.10.5 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
16+
- Update library: jsonschema to 4.25.1 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
17+
- Update library: prettytable to 3.16.0 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
18+
- Update library: prometheus-client to 0.23.1 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
19+
- Update library: pyyaml to 6.0.3 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
20+
- Update library: requests to 2.32.5 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
21+
- Update library: tencentcloud-sdk-python to 3.0.1479 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
22+
- Update library: twilio to 9.8.4 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
23+
- Update build libraries: pylint, pytest, pytest-cov, pytest-xdist, sphinx, tox - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
1124

1225
# 2.26.0
1326

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.13-slim as builder
1+
FROM python:3.14-slim as builder
22

33
LABEL description="ElastAlert 2 Official Image"
44
LABEL maintainer="Jason Ertel"
@@ -10,7 +10,7 @@ RUN mkdir -p /opt/elastalert && \
1010
pip install setuptools wheel && \
1111
python setup.py sdist bdist_wheel
1212

13-
FROM python:3.13-slim
13+
FROM python:3.14-slim
1414

1515
ARG GID=1000
1616
ARG UID=1000

docs/source/running_elastalert.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ Requirements
146146

147147
- Elasticsearch 7, 8, or 9 or OpenSearch 1, 2, or 3
148148
- ISO8601 or Unix timestamped data
149-
- Python 3.13. Require OpenSSL 3.0.8 or newer. Note that Python 3.12 is still supported but will be removed in a future release.
149+
- Python 3.14 or 3.13. Require OpenSSL 3.0.8 or newer. Note that Python 3.12 is still supported but will be removed in a future release.
150150
- pip
151-
- Packages on Ubuntu 24.04: build-essential python3-pip python3.13 python3.13-dev libffi-dev libssl-dev
151+
- Packages on Ubuntu 24.04: build-essential python3-pip python3.14 python3.14-dev libffi-dev libssl-dev
152152

153-
If you want to install python 3.13 on CentOS, please install python 3.13 from the source code after installing 'Development Tools'.
153+
If you want to install python 3.14 on CentOS, please install python 3.14 from the source code after installing 'Development Tools'.
154154

155155
Downloading and Configuring
156156
---------------------------

elastalert/prometheus_wrapper.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@ def start(self):
2929

3030
def metrics_run_rule(self, rule, endtime, starttime=None):
3131
""" Increment counter every time rule is run """
32+
result = None
3233
try:
3334
self.prom_scrapes.labels(rule['name']).inc()
35+
result = self.run_rule(rule, endtime, starttime)
3436
finally:
35-
return self.run_rule(rule, endtime, starttime)
37+
pass
38+
return result
3639

3740
def metrics_writeback(self, doc_type, body, rule=None, match_body=None):
3841
""" Update various prometheus metrics accoording to the doc_type """
@@ -53,4 +56,5 @@ def metrics_writeback(self, doc_type, body, rule=None, match_body=None):
5356
elif doc_type == 'silence':
5457
self.prom_alerts_silenced.labels(body['rule_name']).inc()
5558
finally:
56-
return res
59+
pass
60+
return res

requirements-dev.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
flake8
33
flake8-absolute-import
44
pre-commit
5-
pylint==3.3.3
6-
pytest==8.3.4
7-
pytest-cov==6.0.0
8-
pytest-xdist==3.6.1
5+
pylint==4.0.2
6+
pytest==8.4.2
7+
pytest-cov==7.0.0
8+
pytest-xdist==3.8.0
99
setuptools
10-
sphinx==8.1.3
10+
sphinx==8.2.3
1111
sphinx_rtd_theme==3.0.2
12-
tox==4.23.2
12+
tox==4.32.0

requirements.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
apscheduler>=3.11.0,<4.0
22
aws-requests-auth>=0.4.3
3-
boto3>=1.35.92
4-
cffi>=1.17.1
3+
boto3>=1.40.59
4+
cffi>=2.0.0
55
croniter>=6.0.0
66
elasticsearch==7.10.1
77
envparse>=0.2.0
88
exotel==0.1.5
9-
Jinja2>=3.1.5
10-
jira>=3.8.0
9+
Jinja2>=3.1.6
10+
jira>=3.10.5
1111
jsonpointer>=3.0.0
12-
jsonschema>=4.23.0
13-
prettytable>=3.12.0
12+
jsonschema>=4.25.1
13+
prettytable>=3.16.0
1414
prison>=0.2.1
15-
prometheus-client>=0.21.1
15+
prometheus-client>=0.23.1
1616
python-dateutil>=2.9.0.post0
17-
PyYAML>=6.0.2
17+
PyYAML>=6.0.3
1818
py-zabbix>=1.1.7
19-
requests>=2.32.3
19+
requests>=2.32.5
2020
sortedcontainers>=2.4.0
2121
statsd-tags==3.2.1.post1
2222
stomp.py>=8.2.0
23-
tencentcloud-sdk-python>=3.0.1295
23+
tencentcloud-sdk-python>=3.0.1479
2424
texttable>=1.7.0
25-
twilio>=9.4.1
25+
twilio>=9.8.4

setup.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
"Discussion Forum": "https://github.com/jertel/elastalert2/discussions",
2222
},
2323
classifiers=[
24+
'Programming Language :: Python :: 3.12',
2425
'Programming Language :: Python :: 3.13',
26+
'Programming Language :: Python :: 3.14',
2527
'License :: OSI Approved :: Apache Software License',
2628
'Operating System :: OS Independent',
2729
],
@@ -33,30 +35,30 @@
3335
package_data={'elastalert': ['schema.yaml', 'es_mappings/**/*.json']},
3436
python_requires='>=3.12',
3537
install_requires=[
36-
'apscheduler>=3.10.4,<4.0',
38+
'apscheduler>=3.11.0,<4.0',
3739
'aws-requests-auth>=0.4.3',
38-
'boto3>=1.34.54',
39-
'cffi>=1.16.0',
40-
'croniter>=2.0.2',
40+
'boto3>=1.40.59',
41+
'cffi>=2.0.0',
42+
'croniter>=6.0.0',
4143
'elasticsearch==7.10.1',
4244
'envparse>=0.2.0',
4345
'exotel==0.1.5',
44-
'Jinja2>=3.1.3',
45-
'jira>=3.6.0',
46-
'jsonpointer>=2.4',
47-
'jsonschema>=4.21.1',
48-
'prettytable>=3.10.0',
46+
'Jinja2>=3.1.6',
47+
'jira>=3.10.5',
48+
'jsonpointer>=3.0.0',
49+
'jsonschema>=4.25.1',
50+
'prettytable>=3.16.0',
4951
'prison>=0.2.1',
50-
'prometheus_client>=0.20.0',
52+
'prometheus_client>=0.23.1',
5153
'python-dateutil>=2.9.0.post0',
52-
'PyYAML>=6.0.1',
54+
'PyYAML>=6.0.3',
5355
'py-zabbix>=1.1.7',
5456
'requests>=2.31.0',
5557
'sortedcontainers>=2.4.0',
5658
'statsd-tags==3.2.1.post1',
57-
'stomp.py>=8.1.0',
58-
'tencentcloud-sdk-python>=3.0.1098',
59+
'stomp.py>=8.2.0',
60+
'tencentcloud-sdk-python>=3.0.1479',
5961
'texttable>=1.7.0',
60-
'twilio>=8.13.0',
62+
'twilio>=9.8.4',
6163
]
6264
)

tests/Dockerfile-test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.13-slim
1+
FROM python:3.14-slim
22

33
RUN apt update && apt upgrade -y
44
RUN apt install -y gcc libffi-dev

tests/pytest.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ markers =
33
elasticsearch: mark a test as using elasticsearch.
44
filterwarnings =
55
ignore::pytest.PytestUnhandledThreadExceptionWarning
6+
ignore:cannot collect 'test.*' because it is not a function
7+
ignore:cannot collect 'test_.*' because it is not a function

tests/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
project = elastalert
3-
envlist = py313,docs
3+
envlist = py314,docs
44
setupdir = ..
55

66
[testenv]

0 commit comments

Comments
 (0)