Doesn't compile with Python 3.11 (milksnake)
xhochy opened this issue · 6 comments
This doesn't compile for Python 3.11 as milksnake
seems to be incompatible with it. See the following error from conda-forge/urlquote-feedstock#13 (comment)
2022-10-29T21:56:17.2852273Z Building wheels for collected packages: urlquote
2022-10-29T21:56:17.2859907Z Building wheel for urlquote (setup.py): started
2022-10-29T21:56:17.5972834Z Building wheel for urlquote (setup.py): finished with status 'error'
2022-10-29T21:56:17.6183182Z error: subprocess-exited-with-error
2022-10-29T21:56:17.6186360Z
2022-10-29T21:56:17.6187019Z × python setup.py bdist_wheel did not run successfully.
2022-10-29T21:56:17.6187636Z │ exit code: 1
2022-10-29T21:56:17.6188165Z ╰─> [74 lines of output]
2022-10-29T21:56:17.6188534Z running bdist_wheel
2022-10-29T21:56:17.6188880Z running build
2022-10-29T21:56:17.6189202Z running build_py
2022-10-29T21:56:17.6189680Z creating build/lib
2022-10-29T21:56:17.6190026Z creating build/lib/urlquote
2022-10-29T21:56:17.6190585Z copying urlquote/_native.py -> build/lib/urlquote
2022-10-29T21:56:17.6191209Z copying urlquote/quoting.py -> build/lib/urlquote
2022-10-29T21:56:17.6191801Z copying urlquote/_native__ffi.py -> build/lib/urlquote
2022-10-29T21:56:17.6192406Z copying urlquote/__init__.py -> build/lib/urlquote
2022-10-29T21:56:17.6192842Z Finished release [optimized] target(s) in 0.00s
2022-10-29T21:56:17.6193298Z copying dylib liburlquote.so
2022-10-29T21:56:17.6193674Z Traceback (most recent call last):
2022-10-29T21:56:17.6194086Z File "<string>", line 2, in <module>
2022-10-29T21:56:17.6194663Z File "<pip-setuptools-caller>", line 34, in <module>
2022-10-29T21:56:17.6195194Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/work/setup.py", line 21, in <module>
2022-10-29T21:56:17.6195652Z setup(
2022-10-29T21:56:17.6196776Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/setuptools/__init__.py", line 87, in setup
2022-10-29T21:56:17.6197684Z return distutils.core.setup(**attrs)
2022-10-29T21:56:17.6198066Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-10-29T21:56:17.6199245Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
2022-10-29T21:56:17.6200325Z return run_commands(dist)
2022-10-29T21:56:17.6200669Z ^^^^^^^^^^^^^^^^^^
2022-10-29T21:56:17.6201861Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
2022-10-29T21:56:17.6202860Z dist.run_commands()
2022-10-29T21:56:17.6204054Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
2022-10-29T21:56:17.6204951Z self.run_command(cmd)
2022-10-29T21:56:17.6206329Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/setuptools/dist.py", line 1217, in run_command
2022-10-29T21:56:17.6207287Z super().run_command(command)
2022-10-29T21:56:17.6208496Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
2022-10-29T21:56:17.6209379Z cmd_obj.run()
2022-10-29T21:56:17.6210523Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 299, in run
2022-10-29T21:56:17.6211523Z self.run_command('build')
2022-10-29T21:56:17.6212718Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
2022-10-29T21:56:17.6213616Z self.distribution.run_command(command)
2022-10-29T21:56:17.6214801Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/setuptools/dist.py", line 1217, in run_command
2022-10-29T21:56:17.6215687Z super().run_command(command)
2022-10-29T21:56:17.6216868Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
2022-10-29T21:56:17.6217734Z cmd_obj.run()
2022-10-29T21:56:17.6218897Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 132, in run
2022-10-29T21:56:17.6219896Z self.run_command(cmd_name)
2022-10-29T21:56:17.6221083Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
2022-10-29T21:56:17.6222069Z self.distribution.run_command(command)
2022-10-29T21:56:17.6223273Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/setuptools/dist.py", line 1217, in run_command
2022-10-29T21:56:17.6224158Z super().run_command(command)
2022-10-29T21:56:17.6225339Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
2022-10-29T21:56:17.6226214Z cmd_obj.run()
2022-10-29T21:56:17.6227357Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/milksnake/setuptools_ext.py", line 88, in run
2022-10-29T21:56:17.6228262Z func(base_path=base_path, inplace=False)
2022-10-29T21:56:17.6229464Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/milksnake/setuptools_ext.py", line 276, in build_cffi
2022-10-29T21:56:17.6230331Z ffi = make_ffi()
2022-10-29T21:56:17.6230656Z ^^^^^^^^^^
2022-10-29T21:56:17.6231807Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/milksnake/setuptools_ext.py", line 262, in make_ffi
2022-10-29T21:56:17.6232691Z from milksnake.ffi import make_ffi
2022-10-29T21:56:17.6233872Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/site-packages/milksnake/ffi.py", line 8, in <module>
2022-10-29T21:56:17.6234908Z _directive_re = re.compile(r'^\s*#.*?$(?m)')
2022-10-29T21:56:17.6235301Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-10-29T21:56:17.6236074Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/re/__init__.py", line 227, in compile
2022-10-29T21:56:17.6236899Z return _compile(pattern, flags)
2022-10-29T21:56:17.6237245Z ^^^^^^^^^^^^^^^^^^^^^^^^
2022-10-29T21:56:17.6238008Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/re/__init__.py", line 294, in _compile
2022-10-29T21:56:17.6238922Z p = _compiler.compile(pattern, flags)
2022-10-29T21:56:17.6239272Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-10-29T21:56:17.6240042Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/re/_compiler.py", line 743, in compile
2022-10-29T21:56:17.6240930Z p = _parser.parse(p, flags)
2022-10-29T21:56:17.6241269Z ^^^^^^^^^^^^^^^^^^^^^^^
2022-10-29T21:56:17.6242025Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/re/_parser.py", line 980, in parse
2022-10-29T21:56:17.6242883Z p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
2022-10-29T21:56:17.6243285Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-10-29T21:56:17.6244060Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/re/_parser.py", line 455, in _parse_sub
2022-10-29T21:56:17.6244931Z itemsappend(_parse(source, state, verbose, nested + 1,
2022-10-29T21:56:17.6245435Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022-10-29T21:56:17.6246265Z File "/home/conda/feedstock_root/build_artifacts/urlquote_1667080399617/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.11/re/_parser.py", line 841, in _parse
2022-10-29T21:56:17.6247295Z raise source.error('global flags not at the start '
2022-10-29T21:56:17.6247782Z re.error: global flags not at the start of the expression at position 9
2022-10-29T21:56:17.6248195Z [end of output]
Hi Uwe,
Thanks for caring.
Yeah, this might not even be specific to Python 3.11. Had to switch out milksnake
with maturin
in other artifacts as well. Especially for building manylinux wheels. Happy to merge a PR. Otherwise I can do so myself, might be a bit, before I get to it though. Another artifact which switched from milksnake
to maturin
is arrow-odbc-py
. It also embeds Rust in Python using cffi
. It is somewhat more complicated, though because it also has to make sure it links vs system libodbc.so
.
tl;dr
- We need to use
maturin
instead ofmilksnake
- Will do it myself, but if you need it fast, you shoud consider opeing a PR.
Updated the build system to maturin.
Added a GitHub action for testing, and one for releasing wheels to PyPi. Missing so far: Somebody with rights on the repository to add a PYPI_API_TOKEN and triggering a realease.
See issue #9 .
@xhochy I assume you would need a release to trigger the conda build against the new codebase. I am very confident that the current master should work fine with Python 3.11.
Currently I am not in the know wether our former colleagues are still using this, and how long it'll take to trigger a release.
@sebastianneubauer Could you help?
Cheers, Markus
Let me check what I can do! Great work, thanks a lot!!
@sebastian-neubauer-by
@pacman82
Thanks for taking care of this! This is a great library and it would be great to have it working on newer python versions
Thanks again for all involved here ❤️