Skip to content

Regression in 4.43.1 from swapping codecs.open() with open() #4040

@mdmintz

Description

@mdmintz

Regression in 4.43.1 from swapping codecs.open() with open()


In #4037, codecs.open() was swapped with open() to prevent deprecation warnings on Python 3.14.
However, it appears that the arg ordering is different between the methods, because that led to:

html_file = open(html_file_path, "w+", "utf-8")
TypeError: 'str' object cannot be interpreted as an integer

That was working correctly with codecs.open():

html_file = codecs.open(html_file_path, "w+", "utf-8")

I have to go back and edit the args / kwargs so that encoding and mode are specified. Eg:

html_file = open(html_file_path, mode="w+", encoding="utf-8")

There are probably several areas of code that are affected.

Metadata

Metadata

Assignees

Labels

bugUh oh... Something needs to be fixed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions