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

Fix warnings when generating Python dist #210

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

mitya57
Copy link
Contributor

@mitya57 mitya57 commented Mar 3, 2025

When calling make dist_libstemmer_python in the current master, these two warnings are printed:

/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py:79: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!

and

/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py:124: SetuptoolsDeprecationWarning: bdist_wheel.universal is deprecated
!!

        ********************************************************************************
        With Python 2.7 end-of-life, support for building universal wheels
        (i.e., wheels that support both Python 2 and Python 3)
        is being obviated.
        Please discontinue using this option, or if you still need it,
        file an issue with pypa/setuptools describing your use case.

        By 2025-Aug-30, you need to update your project and remove deprecated calls
        or your builds will no longer be supported.
        ********************************************************************************

!!

This PR has the minimal changes required to fix these warnings.

If you agree, I can improve our Python packaging further in the next PRs:

  • Drop support for Python 2 completely and modernize the code using pyupgrade tool.
  • Move the build system metadata from setup.py and setup.cfg to pyproject.toml. There is a dynamic part of metadata (list of languages), but we can either keep that part in setup.py (and move the static part only), or make pyproject.toml generated by GNUmakefile.

mitya57 added 2 commits March 4, 2025 00:31
Quoting the warning message:

> With Python 2.7 end-of-life, support for building universal wheels
> (i.e., wheels that support both Python 2 and Python 3)
> is being obviated.
> Please discontinue using this option, or if you still need it,
> file an issue with pypa/setuptools describing your use case.
>
> By 2025-Aug-30, you need to update your project and remove deprecated calls
> or your builds will no longer be supported.
@ojwb ojwb merged commit ec661b9 into snowballstem:master Mar 4, 2025
18 checks passed
@ojwb
Copy link
Member

ojwb commented Mar 4, 2025

I think it's reasonable to drop Python 2 support here at this point - after all I proposed we stop actively supporting Python 2 about 3½ years ago (https://lists.tartarus.org/pipermail/snowball-discuss/2021-August/001721.html) and have had no negative feedback at all.

Also if anyone really wants to use current snowball to generate code to use with Python 2, the generated code should still be compatible - they'll just need to manage putting the generated files somewhere that their Python 2 interpreter can find them.

@mitya57 mitya57 deleted the fix-python-warnings branch March 4, 2025 09:56
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

Successfully merging this pull request may close these issues.

2 participants