You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_textmode is set to be by default "U" in pager/deps/path3.py. "U" mode was removed in Python 3.11 so that breaks methods such as text and others where encoding is not provided.
# Universal newline support
_textmode = 'U'
if hasattr(__builtins__, 'file') and not hasattr(file, 'newlines'):
_textmode = 'r'
# ...
def text(self, encoding=None, errors='strict'):
""" ... """
if encoding is None:
# 8-bit
f = self.open(_textmode)
Exception:
File "/Users/karolynagy/.virtualenvs/test/lib/python3.11/site-packages/paver/deps/path3.py", line 582, in text
f = self.open(_textmode)
^^^^^^^^^^^^^^^^^^^^
File "/Users/karolynagy/.virtualenvs/test/lib/python3.11/site-packages/paver/deps/path3.py", line 539, in open
return open(self, mode)
^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'U'
One fix to provide encoding when calling text method works. For example:
_textmode
is set to be by default "U" inpager/deps/path3.py
. "U" mode was removed in Python 3.11 so that breaks methods such astext
and others where encoding is not provided.Exception:
One fix to provide encoding when calling text method works. For example:
However it would be good if the method didn't fail without parameters.
The text was updated successfully, but these errors were encountered: