From 13843e1a613a11383903d75e306549aba7f496d1 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 7 Oct 2025 09:27:03 -0500 Subject: [PATCH 1/5] Remove deprecated `codecs.open()` usage `codecs.open()` is deprecated and throws a `DeprecationWarning`: ``` :20: DeprecationWarning: codecs.open() is deprecated. Use open() instead. :23: DeprecationWarning: codecs.open() is deprecated. Use open() instead. ``` --- setup.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 1d0e2d5..083f7a3 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,6 @@ import os import sys -from codecs import open from shutil import rmtree from setuptools import setup @@ -17,10 +16,10 @@ test_requires = [] about = {} -with open(os.path.join(here, package, '__version__.py'), 'r', 'utf-8') as f: +with open(os.path.join(here, package, '__version__.py'), 'r', encoding='utf-8') as f: exec(f.read(), about) -with open('README.md', 'r', 'utf-8') as f: +with open('README.md', 'r', encoding='utf-8') as f: readme = f.read() From d2b069438a32eaf9ee6f1fee1d37e1b183612e3d Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 7 Oct 2025 09:29:49 -0500 Subject: [PATCH 2/5] 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) ``` --- setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.py b/setup.py index 083f7a3..eff6a78 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,6 @@ install_requires = ['text-unidecode>=1.3'] extras_requires = {'unidecode': ['Unidecode>=1.1.1']} -test_requires = [] about = {} with open(os.path.join(here, package, '__version__.py'), 'r', encoding='utf-8') as f: @@ -65,7 +64,6 @@ def status(s): include_package_data=True, python_requires=python_requires, install_requires=install_requires, - tests_require=test_requires, extras_require=extras_requires, zip_safe=False, cmdclass={}, From 85b9be8111b3ea17a71e109c62be9c37e723e89f Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 7 Oct 2025 09:37:46 -0500 Subject: [PATCH 3/5] 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. ******************************************************************************** !! ``` --- setup.py | 1 - slugify/__version__.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index eff6a78..32f44dd 100755 --- a/setup.py +++ b/setup.py @@ -72,7 +72,6 @@ def status(s): 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Natural Language :: English', - 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.10', diff --git a/slugify/__version__.py b/slugify/__version__.py index 854038e..a9cd778 100644 --- a/slugify/__version__.py +++ b/slugify/__version__.py @@ -3,6 +3,6 @@ __author_email__ = 'info@neekware.com' __description__ = 'A Python slugify application that also handles Unicode' __url__ = 'https://github.com/un33k/python-slugify' -__license__ = 'MIT' +__license__ = 'SPDX-License-Identifier: MIT' __copyright__ = 'Copyright 2022 Val Neekman @ Neekware Inc.' __version__ = '8.0.4' From 406c65b8ae06b7ababcc1c624364b6b30cf67097 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 7 Oct 2025 09:40:18 -0500 Subject: [PATCH 4/5] 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 ``` --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index de62727..1c02bfe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,8 @@ +[build-system] +requires = ["setuptools>=61.2"] +build-backend = "setuptools.build_meta" + + # coverage # -------- From 733c5bbc5efd275b01799747d460447e94ef75d6 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 6 Jan 2026 16:49:27 -0600 Subject: [PATCH 5/5] Summarize the build warnings fixes in the CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 400399f..537460e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Test the project against both `unidecode` and `text_unidecode`. - Fix type annotation issues identified by mypy. - Run CI against pull requests. +- Fix package build warnings. ## 8.0.4