Menu

#3 setup.py build method is deprecated and will be removed

1.0
open
nobody
None
2026-01-02
2026-01-02
No

Installing ruamel.yaml.clibz with pip produces the following deprecation message:

DEPRECATION: Building 'ruamel.yaml.clibz' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the --use-pep517 option, (possibly combined with --no-build-isolation), or adding a pyproject.toml file to the source tree of 'ruamel.yaml.clibz'. Discussion can be found at https://github.com/pypa/pip/issues/6334

The install method apparently still uses that legacy mechanism which will go away.
Although, I could not find it in this repo.

Discussion

  • Anthon van der Neut

    I am not sure why you get that message. I think this might have to with setuptools and wheel not being installed. Which version where you using (I uploaded a newer version that includes a the pyproject.toml cruft (which AFAICT cannot even make a distinction between the dependencies for creating a sdist (no compilation needed) and a wheel ( compilation needed).
    It is a downgrade I could live without.

     
  • Andreas Maier

    Andreas Maier - 2026-01-02

    Hi Anthon. Thanks for the fast reply!

    I am specifying it in the pip requirements file of my package and in a pip constraints file:

    In requirements.txt:

    ruamel.yaml>=0.18.17
    ruamel.yaml.clibz>=0.3.3

    In constraints.txt:

    ruamel.yaml==0.18.17
    ruamel.yaml.clibz==0.3.3

    The pip wheel cache must not contain a wheel file for ruamel.yaml.clibz:

    pip cache list | grep ruamel.yaml.clibz

    The package must be uninstalled:

    pip uninstall -y ruamel.yaml ruamel.yaml.clibz

    I can then reproduce the deprecation message using:

    pip install -r requirements.txt -c constraints.txt

    I then repeated it with the latest released versions of these two packages (0.19.0 and 0.3.7) and the deprecation message disappeared.

    The reason I did not want to use 0.3.7 is because it failed for me on Windows (see the other issue in your tracker).

    So I still need to find a version combination that works on all Python versions and all OS platforms, but generally it seems that the error went away with the newer versions.

     
  • Andreas Maier

    Andreas Maier - 2026-01-02

    The deprecation message appears up to 0.3.5 and is not present starting with 0.3.6.

     
  • Anthon van der Neut

    0.3.6 is when I introduced the dependency on setuptools (via the added pyproject.toml), 0.3.7 was needed because I forgot to update the version number in the 0.3.6 README %-)
    It has been a long day.

     

Log in to post a comment.

MongoDB Logo MongoDB