Skip to content

Commit 440d7c7

Browse files
committed
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 <[email protected]>
1 parent 4b2a771 commit 440d7c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/publicsuffix2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(self, psl_file=None, idna=True):
8383
"""
8484
# Note: we test for None as we accept empty lists as inputs
8585
if psl_file is None or isinstance(psl_file, str):
86-
with codecs.open(psl_file or PSL_FILE, 'r', encoding='utf8') as psl:
86+
with open(psl_file or PSL_FILE, 'r', encoding='utf8') as psl:
8787
psl = psl.readlines()
8888
else:
8989
# assume file-like

0 commit comments

Comments
 (0)