[PR #190] [MERGED] fix: read YAML templates as UTF-8 #3754

Closed
opened 2026-07-12 09:15:34 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/reconurge/flowsint/pull/190
Author: @Ghraven
Created: 6/13/2026
Status: Merged
Merged: 6/18/2026
Merged by: @dextmorgn

Base: mainHead: fix/yaml-loader-utf8


📝 Commits (1)

  • 38c7a72 fix: read YAML templates as UTF-8

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 flowsint-core/src/flowsint_core/templates/loader/yaml_loader.py (+1 -1)

📄 Description

What changed

This updates the YAML template loader to open template files with an explicit encoding="utf-8".

Problem

open(filename) depends on the host system's default text encoding. On systems where the default encoding is not UTF-8, YAML templates containing non-ASCII text can fail to load or decode differently than intended.

Before / after

Before: template loading used the platform default encoding.

After: template loading consistently reads YAML templates as UTF-8 across platforms.

Verification

  • AUTH_SECRET=0123456789abcdef0123456789abcdef REDIS_URL=redis://localhost:6379/0 uv run pytest flowsint-core/tests/templates/test_loader.py → 40 passed
  • uv run python -m compileall flowsint-core/src/flowsint_core/templates/loader/yaml_loader.py
  • git diff --check

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/reconurge/flowsint/pull/190 **Author:** [@Ghraven](https://github.com/Ghraven) **Created:** 6/13/2026 **Status:** ✅ Merged **Merged:** 6/18/2026 **Merged by:** [@dextmorgn](https://github.com/dextmorgn) **Base:** `main` ← **Head:** `fix/yaml-loader-utf8` --- ### 📝 Commits (1) - [`38c7a72`](https://github.com/reconurge/flowsint/commit/38c7a72cb1c9ec68d84ae7fac03e1404ccb472a4) fix: read YAML templates as UTF-8 ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `flowsint-core/src/flowsint_core/templates/loader/yaml_loader.py` (+1 -1) </details> ### 📄 Description ## What changed This updates the YAML template loader to open template files with an explicit `encoding="utf-8"`. ## Problem `open(filename)` depends on the host system's default text encoding. On systems where the default encoding is not UTF-8, YAML templates containing non-ASCII text can fail to load or decode differently than intended. ## Before / after Before: template loading used the platform default encoding. After: template loading consistently reads YAML templates as UTF-8 across platforms. ## Verification - `AUTH_SECRET=0123456789abcdef0123456789abcdef REDIS_URL=redis://localhost:6379/0 uv run pytest flowsint-core/tests/templates/test_loader.py` → 40 passed - `uv run python -m compileall flowsint-core/src/flowsint_core/templates/loader/yaml_loader.py` - `git diff --check` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-12 09:15:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/flowsint#3754