Skip to content

Commit 1a45d0b

Browse files
committed
cif3 output bot: require py < 3.12 and deprecate
fixes certtools#2543 See https://lists.cert.at/pipermail/intelmq-users/2024-December/000474.html for more information.
1 parent 15d0439 commit 1a45d0b

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
#### Experts
3131

3232
#### Outputs
33+
- `intelmq.bots.outputs.cif3.output`:
34+
- The requirement can only be installed on Python version < 3.12.
35+
- Add a check on the Python version and exit if incompatible.
36+
- Add a deprecation warning (PR#2544 by Sebastian Wagner)
3337

3438
### Documentation
3539

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ Please refer to the change log for a full list of changes.
1616
### Requirements
1717
Python 3.8 or newer is required.
1818

19+
## Bots
20+
#### CIF 3 API
21+
The CIF 3 API Output bot is not compatible with Python version greater or equal to 3.12 and will be removed in the future due to lack of maintenance.
22+
See https://lists.cert.at/pipermail/intelmq-users/2024-December/000474.html for more information.
23+
1924
### Tools
2025

2126
### Data Format
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-License-Identifier: AGPL-3.0-or-later
2-
# SPDX-FileCopyrightText: 2022 REN-ISAC
2+
# SPDX-FileCopyrightText: 2022 REN-ISAC, 2024 Institute for Common Good Technology
33

4-
cifsdk>=3.0.0rc4,<4.0
4+
cifsdk>=3.0.0rc4,<4.0; python_version < '3.12'

intelmq/bots/outputs/cif3/output.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
JsonLib = None
3333

3434
from datetime import datetime
35+
from sys import version_info
3536
from typing import Optional, List
3637

3738
from intelmq.lib.bot import OutputBot
@@ -91,6 +92,9 @@ class CIF3OutputBot(OutputBot):
9192
_is_multithreadable = False
9293

9394
def init(self):
95+
raise DeprecationWarning("The CIFv3 API is deprecated and will be remove in IntelMQ version 4.0. See https://lists.cert.at/pipermail/intelmq-users/2024-December/000474.html")
96+
if version_info >= (3, 12):
97+
raise ValueError("This bot is not compatible with Python >= 3.12. See https://lists.cert.at/pipermail/intelmq-users/2024-December/000474.html")
9498
try:
9599
cifsdk_version = int(get_cifsdk_version().get('version').split('.')[0])
96100
except NameError:

0 commit comments

Comments
 (0)