Skip to content
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 vendored packaging module to include new ABI suffix #585

Closed
tonybaloney opened this issue Nov 13, 2023 · 7 comments
Closed

Update vendored packaging module to include new ABI suffix #585

tonybaloney opened this issue Nov 13, 2023 · 7 comments

Comments

@tonybaloney
Copy link

Wheel currently fails to build on free-threaded builds of CPython 3.13 because the fix to add the t suffix in the ABI in packaging was only recently merged and doesn't exist on the vendored copy in the wheel project.

pypa/packaging#728

Please can you update the version in wheel (example shown below with installing flask)

pip install flask
/home/anthonyshaw/cpython/.venv-main/lib/python3.13/site-packages/pip/_internal/metadata/importlib/_envs.py:111: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pip._vendor.pkg_resources import find_distributions
Collecting flask
  Obtaining dependency information for flask from https://files.pythonhosted.org/packages/36/42/015c23096649b908c809c69388a805a571a3bea44362fe87e33fc3afa01f/flask-3.0.0-py3-none-any.whl.metadata
  Using cached flask-3.0.0-py3-none-any.whl.metadata (3.6 kB)
Collecting Werkzeug>=3.0.0 (from flask)
  Obtaining dependency information for Werkzeug>=3.0.0 from https://files.pythonhosted.org/packages/c3/fc/254c3e9b5feb89ff5b9076a23218dafbc99c96ac5941e900b71206e6313b/werkzeug-3.0.1-py3-none-any.whl.metadata
  Using cached werkzeug-3.0.1-py3-none-any.whl.metadata (4.1 kB)
Collecting Jinja2>=3.1.2 (from flask)
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
/home/anthonyshaw/cpython/.venv-main/lib/python3.13/site-packages/pip/_internal/metadata/importlib/_dists.py:74: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
Collecting itsdangerous>=2.1.2 (from flask)
  Using cached itsdangerous-2.1.2-py3-none-any.whl (15 kB)
Collecting click>=8.1.3 (from flask)
  Obtaining dependency information for click>=8.1.3 from https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl.metadata
  Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Collecting blinker>=1.6.2 (from flask)
  Obtaining dependency information for blinker>=1.6.2 from https://files.pythonhosted.org/packages/fa/2a/7f3714cbc6356a0efec525ce7a0613d581072ed6eb53eb7b9754f33db807/blinker-1.7.0-py3-none-any.whl.metadata
  Using cached blinker-1.7.0-py3-none-any.whl.metadata (1.9 kB)
Collecting MarkupSafe>=2.0 (from Jinja2>=3.1.2->flask)
  Using cached MarkupSafe-2.1.3.tar.gz (19 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Using cached flask-3.0.0-py3-none-any.whl (99 kB)
Using cached blinker-1.7.0-py3-none-any.whl (13 kB)
Using cached click-8.1.7-py3-none-any.whl (97 kB)
Using cached werkzeug-3.0.1-py3-none-any.whl (226 kB)
Building wheels for collected packages: MarkupSafe
  Building wheel for MarkupSafe (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for MarkupSafe (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [83 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-313-pydebug
      creating build/lib.linux-x86_64-cpython-313-pydebug/markupsafe
      copying src/markupsafe/__init__.py -> build/lib.linux-x86_64-cpython-313-pydebug/markupsafe
      copying src/markupsafe/_native.py -> build/lib.linux-x86_64-cpython-313-pydebug/markupsafe
      running egg_info
      writing src/MarkupSafe.egg-info/PKG-INFO
      writing dependency_links to src/MarkupSafe.egg-info/dependency_links.txt
      writing top-level names to src/MarkupSafe.egg-info/top_level.txt
      reading manifest file 'src/MarkupSafe.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      no previously-included directories found matching 'docs/_build'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      adding license file 'LICENSE.rst'
      writing manifest file 'src/MarkupSafe.egg-info/SOURCES.txt'
      copying src/markupsafe/_speedups.c -> build/lib.linux-x86_64-cpython-313-pydebug/markupsafe
      copying src/markupsafe/_speedups.pyi -> build/lib.linux-x86_64-cpython-313-pydebug/markupsafe
      copying src/markupsafe/py.typed -> build/lib.linux-x86_64-cpython-313-pydebug/markupsafe
      running build_ext
      building 'markupsafe._speedups' extension
      creating build/temp.linux-x86_64-cpython-313-pydebug
      creating build/temp.linux-x86_64-cpython-313-pydebug/src
      creating build/temp.linux-x86_64-cpython-313-pydebug/src/markupsafe
      gcc -pthread -fno-strict-overflow -Wsign-compare -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -Og -Wall -fPIC -I/home/anthonyshaw/cpython/.venv-main/include -I/home/anthonyshaw/cpython/Include -I/home/anthonyshaw/cpython -c src/markupsafe/_speedups.c -o build/temp.linux-x86_64-cpython-313-pydebug/src/markupsafe/_speedups.o
      gcc -pthread -shared build/temp.linux-x86_64-cpython-313-pydebug/src/markupsafe/_speedups.o -o build/lib.linux-x86_64-cpython-313-pydebug/markupsafe/_speedups.cpython-313td-x86_64-linux-gnu.so
      installing to build/bdist.linux-x86_64/wheel
      running install
      running install_lib
      creating build/bdist.linux-x86_64
      creating build/bdist.linux-x86_64/wheel
      creating build/bdist.linux-x86_64/wheel/markupsafe
      copying build/lib.linux-x86_64-cpython-313-pydebug/markupsafe/_speedups.c -> build/bdist.linux-x86_64/wheel/markupsafe
      copying build/lib.linux-x86_64-cpython-313-pydebug/markupsafe/_speedups.pyi -> build/bdist.linux-x86_64/wheel/markupsafe
      copying build/lib.linux-x86_64-cpython-313-pydebug/markupsafe/_speedups.cpython-313td-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/markupsafe
      copying build/lib.linux-x86_64-cpython-313-pydebug/markupsafe/__init__.py -> build/bdist.linux-x86_64/wheel/markupsafe
      copying build/lib.linux-x86_64-cpython-313-pydebug/markupsafe/py.typed -> build/bdist.linux-x86_64/wheel/markupsafe
      copying build/lib.linux-x86_64-cpython-313-pydebug/markupsafe/_native.py -> build/bdist.linux-x86_64/wheel/markupsafe
      running install_egg_info
      Copying src/MarkupSafe.egg-info to build/bdist.linux-x86_64/wheel/MarkupSafe-2.1.3-py3.13.egg-info
      running install_scripts
      Traceback (most recent call last):
        File "/home/anthonyshaw/cpython/.venv-main/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/anthonyshaw/cpython/.venv-main/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 "/home/anthonyshaw/cpython/.venv-main/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-wnxiqzpz/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 434, in build_wheel
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-wnxiqzpz/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-wnxiqzpz/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-wnxiqzpz/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 65, in <module>
        File "<string>", line 41, in run_setup
        File "/tmp/pip-build-env-wnxiqzpz/overlay/lib/python3.13/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-wnxiqzpz/overlay/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-wnxiqzpz/overlay/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-wnxiqzpz/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-wnxiqzpz/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-wnxiqzpz/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-wnxiqzpz/overlay/lib/python3.13/site-packages/wheel/bdist_wheel.py", line 406, in run
          impl_tag, abi_tag, plat_tag = self.get_tag()
                                        ^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-wnxiqzpz/overlay/lib/python3.13/site-packages/wheel/bdist_wheel.py", line 356, in get_tag
          tag in supported_tags
      AssertionError: would build wheel with unsupported tag ('cp313', 'cp313td', 'linux_x86_64')
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for MarkupSafe
Failed to build MarkupSafe
ERROR: Could not build wheels for MarkupSafe, which is required to install pyproject.toml-based projects
/home/anthonyshaw/cpython/.venv-main/lib/python3.13/site-packages/pip/_internal/self_outdated_check.py:232: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
  current_time=datetime.datetime.utcnow(),
@tonybaloney
Copy link
Author

CC @colesbury @brettcannon

@henryiii
Copy link
Contributor

Shouldn't there be a packaging release with the fix first?

@brettcannon
Copy link
Member

Shouldn't there be a packaging release with the fix first?

That would be my suggestion since that will shake out any bugs rather quickly before you put in the effort to physically copy over any code.

@mayeut
Copy link
Member

mayeut commented Dec 29, 2023

xref pypa/packaging#755

@hugovk
Copy link
Contributor

hugovk commented Mar 10, 2024

Done in 92921a0 🚀

@agronholm
Copy link
Contributor

I would've cut a release already, but I noticed that the test workflow had an issue which had masked test failures on Windows, and I'm trying to resolve those now.

@agronholm
Copy link
Contributor

There's a new wheel release out now with the latest packaging vendored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants