Skip to content

Conversation

@kurtmckee
Copy link
Contributor

Hello! Thanks for your work on python-slugify!

slugify's packaging is using a number of deprecated constructs, and building and installing the package throws a number of deprecation warnings. This PR resolves all of the warnings that I was seeing.

  • Remove deprecated codecs.open() usage

    codecs.open() is deprecated and throws a DeprecationWarning:

    <string>:20: DeprecationWarning: codecs.open() is deprecated. Use open() instead.
    <string>:23: DeprecationWarning: codecs.open() is deprecated. Use open() instead.
    
  • Remove the unknown tests_require option

    The tests_require option throws a UserWarning:

    /.../site-packages/setuptools/_distutils/dist.py:289:
    UserWarning: Unknown distribution option: 'tests_require'
      warnings.warn(msg)
    
  • Resolve deprecated License trove classifier usage

    This resolves build warnings thrown by setuptools:

    /.../site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
    !!
    
            ********************************************************************************
            Please consider removing the following classifiers in favor of a SPDX license expression:
    
            License :: OSI Approved :: MIT License
    
            See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
            ********************************************************************************
    
    !!
    
  • Resolve deprecation warnings thrown when installing in editable mode

    Running pip install -e. displays the following deprecation warnings:

    DEPRECATION: Legacy editable install of python-slugify==8.0.4
    from file:///.../pr-python-slugify (setup.py develop) is deprecated.
    pip 25.3 will enforce this behaviour change.
    A possible replacement is to add a pyproject.toml
    or enable --use-pep517, and use setuptools >= 64.
    If the resulting installation is not behaving as expected,
    try using --config-settings editable_mode=compat.
    Please consult the setuptools documentation for more information.
    Discussion can be found at https://github.com/pypa/pip/issues/11457
    

With these changes, it's now possible to build and install the package without any warnings. Example:

# Building the package no longer throws warnings:
python -m pip install build
python -m build

# Installing in editable mode no longer throws warnings:
python -m pip install -e.

Warning

Running commands like python setup.py bdist_wheel is deprecated and may start failing at the end of this month. I strongly recommend migrating off of an executable setup.py file entirely, in favor of a declarative pyproject.toml file.

$ python setup.py bdist_wheel
...
/.../lib/python3.13/site-packages/setuptools/_distutils/cmd.py:90: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

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

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

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

!!

@kurtmckee
Copy link
Contributor Author

@Arian-Ott I'll update this to resolve the merge conflicts here, too.

`codecs.open()` is deprecated and throws a `DeprecationWarning`:

```
<string>:20: DeprecationWarning: codecs.open() is deprecated. Use open() instead.
<string>:23: DeprecationWarning: codecs.open() is deprecated. Use open() instead.
```
The `tests_require` option throws a `UserWarning`:

```
/.../site-packages/setuptools/_distutils/dist.py:289:
UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
```
This resolves build warnings thrown by setuptools:

```
/.../site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        ********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX license expression:

        License :: OSI Approved :: MIT License

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        ********************************************************************************

!!
```
Running `pip install -e.` displays the following deprecation warnings:

```
DEPRECATION: Legacy editable install of python-slugify==8.0.4
from file:///.../pr-python-slugify (setup.py develop) is deprecated.
pip 25.3 will enforce this behaviour change.
A possible replacement is to add a pyproject.toml
or enable --use-pep517, and use setuptools >= 64.
If the resulting installation is not behaving as expected,
try using --config-settings editable_mode=compat.
Please consult the setuptools documentation for more information.
Discussion can be found at pypa/pip#11457
```
@kurtmckee
Copy link
Contributor Author

@Arian-Ott Merge conflicts are fixed and the CHANGELOG has been updated with a summary.

@coveralls
Copy link

coveralls commented Jan 6, 2026

Coverage Status

coverage: 97.44%. remained the same
when pulling 733c5bb on kurtmckee:fix-build-process
into c54cc57 on un33k:master.

@Arian-Ott
Copy link
Collaborator

Arian-Ott commented Jan 6, 2026 via email

@Arian-Ott Arian-Ott merged commit 8b0ac21 into un33k:master Jan 7, 2026
2 checks passed
@kurtmckee kurtmckee deleted the fix-build-process branch January 7, 2026 13:07
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.

3 participants