Skip to content

Commit

Permalink
cif3 output bot: require py < 3.12 and deprecate
Browse files Browse the repository at this point in the history
  • Loading branch information
sebix committed Dec 1, 2024
1 parent 15d0439 commit 1a45d0b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
#### Experts

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

### Documentation

Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ Please refer to the change log for a full list of changes.
### Requirements
Python 3.8 or newer is required.

## Bots
#### CIF 3 API
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.
See https://lists.cert.at/pipermail/intelmq-users/2024-December/000474.html for more information.

### Tools

### Data Format
Expand Down
4 changes: 2 additions & 2 deletions intelmq/bots/outputs/cif3/REQUIREMENTS.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# SPDX-FileCopyrightText: 2022 REN-ISAC
# SPDX-FileCopyrightText: 2022 REN-ISAC, 2024 Institute for Common Good Technology

cifsdk>=3.0.0rc4,<4.0
cifsdk>=3.0.0rc4,<4.0; python_version < '3.12'
4 changes: 4 additions & 0 deletions intelmq/bots/outputs/cif3/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
JsonLib = None

from datetime import datetime
from sys import version_info
from typing import Optional, List

from intelmq.lib.bot import OutputBot
Expand Down Expand Up @@ -91,6 +92,9 @@ class CIF3OutputBot(OutputBot):
_is_multithreadable = False

def init(self):
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")
if version_info >= (3, 12):
raise ValueError("This bot is not compatible with Python >= 3.12. See https://lists.cert.at/pipermail/intelmq-users/2024-December/000474.html")
try:
cifsdk_version = int(get_cifsdk_version().get('version').split('.')[0])
except NameError:
Expand Down

0 comments on commit 1a45d0b

Please sign in to comment.