0001-Fix-Python-deprecation-warning.patch

text/plain

Filename: 0001-Fix-Python-deprecation-warning.patch
Type: text/plain
Part: 0
Message: Unicode update and some tooling improvements

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch 0001
Subject: Fix Python deprecation warning
File+
contrib/unaccent/generate_unaccent_rules.py 1 1
From 1c5286f900c0411ca648193d831a81d666bb8421 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Thu, 26 Feb 2026 10:24:07 +0100
Subject: [PATCH 1/6] Fix Python deprecation warning

Starting with Python 3.14, contrib/unaccent/generate_unaccent_rules.py
complains

    DeprecationWarning: codecs.open() is deprecated. Use open() instead.

This makes that change.  This works for all Python 3.x versions.
---
 contrib/unaccent/generate_unaccent_rules.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/unaccent/generate_unaccent_rules.py b/contrib/unaccent/generate_unaccent_rules.py
index 40822d0c176..827fa6766df 100644
--- a/contrib/unaccent/generate_unaccent_rules.py
+++ b/contrib/unaccent/generate_unaccent_rules.py
@@ -236,7 +236,7 @@ def main(args):
     charactersSet = set()
 
     # read file UnicodeData.txt
-    with codecs.open(
+    with open(
       args.unicodeDataFilePath, mode='r', encoding='UTF-8',
       ) as unicodeDataFile:
         # read everything we need into memory
-- 
2.53.0