1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

Replace codecs.open() with open() since codecs.open() deprecated in Python 3.14

This commit is contained in:
Alexander Smorkalov
2026-05-24 16:54:39 +03:00
parent 00d19e1c63
commit 852c3d2fb9
4 changed files with 11 additions and 13 deletions
+1 -2
View File
@@ -3,7 +3,6 @@
import sys, re, os.path, errno, fnmatch
import json
import logging
import codecs
from shutil import copyfile
from pprint import pformat
from string import Template
@@ -589,7 +588,7 @@ class JavaWrapperGenerator(object):
content = f.read()
if content == buf:
return
with codecs.open(path, "w", "utf-8") as f:
with open(path, "w", encoding="utf-8") as f:
f.write(buf)
updated_files += 1