Can not use interactive Console with trytond-console on Python 3.11
Traceback
❯ trytond-console -d tryton-env
/Users/hodeinavarro/Developer/.envs/tryton-env/lib/python3.11/site-packages/passlib/utils/__init__.py:854: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
from crypt import crypt as _crypt
/Users/hodeinavarro/Developer/.envs/tryton-env/lib/python3.11/site-packages/zeep/utils.py:1: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
import cgi
<frozen importlib._bootstrap>:1049: ImportWarning: PluginImportFixer.find_spec() not found; falling back to find_module()
/Users/hodeinavarro/Developer/.envs/tryton-env/lib/python3.11/site-packages/csb43/i18n/__init__.py:21: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
lc, encoding = locale.getdefaultlocale()
<frozen importlib._bootstrap>:1049: ImportWarning: PluginImportFixer.find_spec() not found; falling back to find_module()
Traceback (most recent call last):
File "/Users/hodeinavarro/Developer/.envs/tryton-env/bin/trytond-console", line 7, in <module>
exec(compile(f.read(), __file__, 'exec'))
File "/Users/hodeinavarro/Developer/tryton/tryton-env/trytond/bin/trytond-console", line 30, in <module>
console.run(options)
File "/Users/hodeinavarro/Developer/tryton/tryton-env/trytond/trytond/console.py", line 55, in run
console = Console(local, histsize=options.histsize)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hodeinavarro/Developer/tryton/tryton-env/trytond/trytond/console.py", line 21, in __init__
self.init_history(histfile, histsize)
File "/Users/hodeinavarro/Developer/tryton/tryton-env/trytond/trytond/console.py", line 32, in init_history
readline.read_history_file(histfile)
OSError: [Errno 22] Invalid argument
Versions
❯ python -V
Python 3.11.0
❯ pip -V
pip 22.3 from /Users/hodeinavarro/Developer/.envs/tryton-env/lib/python3.11/site-packages/pip (python 3.11)
❯ trytond-console --version
trytond-console 6.7.0
Using a new environment with Python 3.10 does not recreate this issue.