Skip to content

Commit

Permalink
bug: relief jinja2 version restriction
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sebix committed Mar 5, 2022
1 parent 39b0261 commit ce60fd4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,15 @@ CHANGELOG
- `intelmq.bots.experts.remove_affix`: Remove prefix or postfix strings from a field (PR#1965 by Marius Karotkis).
- `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).
- `intelmq.bots.experts.threshold.expert`: Correctly use the standard parameter `redis_cache_ttl` instead of the previously used parameter `timeout` (PR#2155 by Karl-Johan Karlsson).
- `intelmq.bots.experts.jinja2.expert`: Lift restriction on requirement jinja2 < 3 (PR#2158 by Sebastian Wagner).

#### Outputs
- 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).
- Added `intelmq.bots.outputs.rpz_file.output` to create RPZ files (PR#1962 by Marius Karotkis).
- Added `intelmq.bots.outputs.bro_file.output` to create Bro intel formatted files (PR#1963 by Marius Karotkis).
- `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).
- `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).
- Lift restriction on requirement jinja2 < 3 (PR#2158 by Sebastian Wagner).

### Documentation
- Feeds: Add documentation for newly supported dataplane feeds, see above (PR#2102 by Mikk Margus Möll).
Expand Down
4 changes: 4 additions & 0 deletions intelmq/bots/experts/jinja/REQUIREMENTS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: 2022 Sebastian Wagner <[email protected]>
# SPDX-License-Identifier: AGPL-3.0-or-later

jinja2>=2.11
2 changes: 1 addition & 1 deletion intelmq/bots/experts/jinja/expert.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class JinjaExpertBot(Bot):

def init(self):
if not Template:
raise MissingDependencyError("Library 'jinja2' is required, please install it.")
raise MissingDependencyError("jinja2")

for field, template in self.fields.items():
if template.startswith("file:///"):
Expand Down
2 changes: 1 addition & 1 deletion intelmq/bots/outputs/templated_smtp/REQUIREMENTS.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 Linköping University <https://liu.se/>
# SPDX-License-Identifier: AGPL-3.0-or-later

jinja2>=2.11,<3
jinja2>=2.11

0 comments on commit ce60fd4

Please sign in to comment.