From 440d7c79171c7ae2fc01096601ef75ff9ea1ac8a Mon Sep 17 00:00:00 2001 From: stefan6149846 <96178532+stefan6419846@users.noreply.github.com> Date: Thu, 4 Sep 2025 21:26:33 +0200 Subject: [PATCH] Replace codecs.open by open The reason is a deprecation warning introduced with Python 3.14: ``` /opt/hostedtoolcache/Python/3.14.0-rc.2/x64/lib/python3.14/site-packages/publicsuffix2/__init__.py:86: DeprecationWarning: codecs.open() is deprecated. Use open() instead. with codecs.open(psl_file or PSL_FILE, 'r', encoding='utf8') as psl: ``` --- Signed-off-by: stefan6419846 <96178532+stefan6419846@users.noreply.github.com> --- src/publicsuffix2/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/publicsuffix2/__init__.py b/src/publicsuffix2/__init__.py index 6c1d088..d101838 100644 --- a/src/publicsuffix2/__init__.py +++ b/src/publicsuffix2/__init__.py @@ -83,7 +83,7 @@ def __init__(self, psl_file=None, idna=True): """ # Note: we test for None as we accept empty lists as inputs if psl_file is None or isinstance(psl_file, str): - with codecs.open(psl_file or PSL_FILE, 'r', encoding='utf8') as psl: + with open(psl_file or PSL_FILE, 'r', encoding='utf8') as psl: psl = psl.readlines() else: # assume file-like