-
Notifications
You must be signed in to change notification settings - Fork 866
Update build tools to allow building JS on Python 3.13 #13577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update build tools to allow building JS on Python 3.13 #13577
Conversation
Build Artifacts
|
nucleogenesis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got this error when installing dev requirements:
Collecting nodeenv==1.3.3 (from -r requirements/dev.txt (line 11))
Using cached nodeenv-1.3.3.tar.gz (34 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [39 lines of output]
/tmp/pip-install-a8w9zjyz/nodeenv_3237549d30fc4587a082b6a9497ca5f8/nodeenv.py:552: SyntaxWarning: invalid escape sequence '\.'
node_ver = opt.node.replace('.', '\.')
/tmp/pip-install-a8w9zjyz/nodeenv_3237549d30fc4587a082b6a9497ca5f8/nodeenv.py:553: SyntaxWarning: invalid escape sequence '\.'
rexp_string = "%s-v%s[^/]*/(README\.md|CHANGELOG\.md|LICENSE)"\
/tmp/pip-install-a8w9zjyz/nodeenv_3237549d30fc4587a082b6a9497ca5f8/nodeenv.py:937: SyntaxWarning: invalid escape sequence '\d'
VERSION_RE = re.compile('\d+\.\d+\.\d+')
/tmp/pip-install-a8w9zjyz/nodeenv_3237549d30fc4587a082b6a9497ca5f8/nodeenv.py:1113: SyntaxWarning: invalid escape sequence '\S'
ACTIVATE_BAT = """\
/tmp/pip-install-a8w9zjyz/nodeenv_3237549d30fc4587a082b6a9497ca5f8/nodeenv.py:1159: SyntaxWarning: invalid escape sequence '\S'
ACTIVATE_PS1 = """\
/tmp/pip-install-a8w9zjyz/nodeenv_3237549d30fc4587a082b6a9497ca5f8/nodeenv.py:1206: SyntaxWarning: invalid escape sequence '\.'
ACTIVATE_SH = """
/tmp/pip-install-a8w9zjyz/nodeenv_3237549d30fc4587a082b6a9497ca5f8/nodeenv.py:1334: SyntaxWarning: invalid escape sequence '\.'
ACTIVATE_FISH = """
Traceback (most recent call last):
File "/run/media/jacob/LE/krakens/kolibri/.test-vent/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
~~~~^^
File "/run/media/jacob/LE/krakens/kolibri/.test-vent/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/run/media/jacob/LE/krakens/kolibri/.test-vent/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-1_g0pgbo/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-1_g0pgbo/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "/tmp/pip-build-env-1_g0pgbo/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 512, in run_setup
super().run_setup(setup_script=setup_script)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-1_g0pgbo/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 317, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 11, in <module>
File "/tmp/pip-install-a8w9zjyz/nodeenv_3237549d30fc4587a082b6a9497ca5f8/nodeenv.py", line 24, in <module>
import pipes
ModuleNotFoundError: No module named 'pipes'
Updating the version for nodeenv in the dev reqs to 1.9.1 fixes the issue.
Note that I got that particular version number by doing pip install nodeenv in the 3.13 venv and seeing what it found.
Once I was able to install the dev requirements, Kolibri's dev server started up no problem
|
Updated - noting that I just loosened the version for nodeenv, as the most recent version (in spite of maintaining 2.7 support) does not support 3.6. |
nucleogenesis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-ran and smoke tested with success 👍
Summary
I realized after reviewing #13463 that our Python webpack JSON tool in kolibri-tools is not Python 3.13 compatible.
This updates this tooling to be Python 3.13 compatible by default, and then require backports on older Python versions.
References
Fixes #13548
Reviewer guidance
Create a Python 3.13 venv, make sure the yarn run devserver works on it.
Ensure the build still works on CI (in Python 3.6)!