pkg_resources is a package that is unavailable in python 3.12, unless
setuptools is explicitely installed. Turns out, there are replacement
functions coming from importlib_resources, which can be obtained from
the importlib-resources pypi package. This package will be installed
with tutor starting from 17.0.2.
And while we're at it:
* Fix an issue with development mode OAUTH2
* Fix the OAUTH2 LMS configuration variables; it wasn't possible to
change them in production
We were sometimes facing the following issue during build:
171.0 Traceback (most recent call last):
171.0 File "/openedx/venv/bin/nodeenv", line 8, in <module>
171.0 sys.exit(main())
171.0 File "/openedx/venv/lib/python3.8/site-packages/nodeenv.py",
line 1104, in main
171.0 create_environment(env_dir, args)
171.0 File "/openedx/venv/lib/python3.8/site-packages/nodeenv.py",
line 980, in create_environment
171.0 install_node(env_dir, src_dir, args)
171.0 File "/openedx/venv/lib/python3.8/site-packages/nodeenv.py",
line 739, in install_node
171.0 install_node_wrapped(env_dir, src_dir, args)
171.0 File "/openedx/venv/lib/python3.8/site-packages/nodeenv.py",
line 762, in install_node_wrapped
171.0 download_node_src(node_url, src_dir, args)
171.0 File "/openedx/venv/lib/python3.8/site-packages/nodeenv.py",
line 602, in download_node_src
171.0 with ctx as archive:
171.0 File "/opt/pyenv/versions/3.8.15/lib/python3.8/contextlib.py",
line 113, in __enter__
171.0 return next(self.gen)
171.0 File "/openedx/venv/lib/python3.8/site-packages/nodeenv.py",
line 573, in tarfile_open
171.0 tf = tarfile.open(*args, **kwargs)
171.0 File "/opt/pyenv/versions/3.8.15/lib/python3.8/tarfile.py", line
1601, in open
171.0 saved_pos = fileobj.tell()
171.0 AttributeError: 'bytes' object has no attribute 'tell'
This is an issue that is caused by some network failure and is
incorrectly managed by nodeenv 1.7.0. We reolve the issue (in some
cases) by upgrading nodeenv.