Skip to content

Commit 05c8ca6

Browse files
committed
bug: relief jinja2 version restriction
jinja2 version 3 did not introduce breaking changes, so we can remove the version restriction add the requirement also for the jinja expert fix error message on the required library in the jinja expert
1 parent af60b58 commit 05c8ca6

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,15 @@ CHANGELOG
7575
- `intelmq.bots.experts.truncate_by_delimiter.expert`: Cut string if its length is higher than a maximum length (PR#1967 by Marius Karotkis).
7676
- `intelmq.bots.experts.remove_affix`: Remove prefix or postfix strings from a field (PR#1965 by Marius Karotkis).
7777
- `intelmq.bots.experts.asn_lookup.expert`: Fixes update-database script on the last few days of a month (PR#2121 by Filip Pokorný, fixes #2088).
78+
- `intelmq.bots.experts.jinja2.expert`: Lift restriction on requirement jinja2 < 3 (PR#2158 by Sebastian Wagner).
7879

7980
#### Outputs
8081
- Removed `intelmq.bots.outputs.postgresql`: this bot was marked as deprecated in 2019 announced to be removed in version 3 of IntelMQ (PR#2045 by Birger Schacht).
8182
- Added `intelmq.bots.outputs.rpz_file.output` to create RPZ files (PR#1962 by Marius Karotkis).
8283
- Added `intelmq.bots.outputs.bro_file.output` to create Bro intel formatted files (PR#1963 by Marius Karotkis).
83-
- `intelmq.bots.outputs.templated_smtp.output`: Add new function `from_json()` (which just calls `json.loads()` in the standard Python environment), meaning the Templated SMTP output bot can take strings containing JSON documents and do the formatting itself (PR#2120 by Karl-Johan Karlsson).
84+
- `intelmq.bots.outputs.templated_smtp.output`:
85+
- Add new function `from_json()` (which just calls `json.loads()` in the standard Python environment), meaning the Templated SMTP output bot can take strings containing JSON documents and do the formatting itself (PR#2120 by Karl-Johan Karlsson).
86+
- Lift restriction on requirement jinja2 < 3 (PR#2158 by Sebastian Wagner).
8487

8588
### Documentation
8689
- Feeds: Add documentation for newly supported dataplane feeds, see above (PR#2102 by Mikk Margus Möll).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX-FileCopyrightText: 2022 Sebastian Wagner <sebix@sebix.at>
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
3+
4+
jinja2>=2.11

intelmq/bots/experts/jinja/expert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class JinjaExpertBot(Bot):
3232

3333
def init(self):
3434
if not Template:
35-
raise MissingDependencyError("Library 'jinja2' is required, please install it.")
35+
raise MissingDependencyError("jinja2")
3636

3737
for field, template in self.fields.items():
3838
if template.startswith("file:///"):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-FileCopyrightText: 2021 Linköping University <https://liu.se/>
22
# SPDX-License-Identifier: AGPL-3.0-or-later
33

4-
jinja2>=2.11,<3
4+
jinja2>=2.11

0 commit comments

Comments
 (0)