U file attribute was deprecated around 3.3 diff --git a/sopel/plugins/handlers.py b/sopel/plugins/handlers.py index 76902aa..944f6c3 100644 --- a/sopel/plugins/handlers.py +++ b/sopel/plugins/handlers.py @@ -432,7 +432,7 @@ class PyFilePlugin(PyModulePlugin): # TODO: switch to ``importlib`` when Python2 support is dropped. if self.module_type == imp.PY_SOURCE: with open(self.path) as mod: - description = ('.py', 'U', self.module_type) + description = ('.py', 'r', self.module_type) mod = imp.load_module(self.name, mod, self.path, description) elif self.module_type == imp.PKG_DIRECTORY: description = ('', '', self.module_type)