From 096905495f5193a33d11b8ceab050baaca48adf9 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 14 May 2025 08:24:44 -0400 Subject: [PATCH] use pep639 license Removed the "license classifier" from setup.cfg for SQLAlchemy 2.0, which eliminates loud deprecation warnings when building the package. SQLAlchemy 2.1 will use a full :pep:`639` configuration in pyproject.toml while SQLAlchemy 2.0 remains using ``setup.cfg`` for setup. for main, also bumping setuptools to 77.0.3 as we no longer have py3.7, 3.8 to worry about Change-Id: If732dca7f9b57a4c6a789a68ecc77f0293be4786 --- doc/build/changelog/unreleased_20/use_pep639.rst | 9 +++++++++ pyproject.toml | 7 +++---- 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 doc/build/changelog/unreleased_20/use_pep639.rst diff --git a/doc/build/changelog/unreleased_20/use_pep639.rst b/doc/build/changelog/unreleased_20/use_pep639.rst new file mode 100644 index 0000000000..ff73d87728 --- /dev/null +++ b/doc/build/changelog/unreleased_20/use_pep639.rst @@ -0,0 +1,9 @@ +.. change:: + :tags: bug, installation + + Removed the "license classifier" from setup.cfg for SQLAlchemy 2.0, which + eliminates loud deprecation warnings when building the package. SQLAlchemy + 2.1 will use a full :pep:`639` configuration in pyproject.toml while + SQLAlchemy 2.0 remains using ``setup.cfg`` for setup. + + diff --git a/pyproject.toml b/pyproject.toml index 4365a9a7f0..dd1ac6de5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] build-backend = "setuptools.build_meta" requires = [ - "setuptools>=61.0", + "setuptools>=77.0.3", "cython>=3; platform_python_implementation == 'CPython'", # Skip cython when using pypy ] @@ -11,11 +11,11 @@ name = "SQLAlchemy" description = "Database Abstraction Library" readme = "README.rst" authors = [{name = "Mike Bayer", email = "mike_mp@zzzcomputing.com"}] -license = {text = "MIT"} +license = "MIT" +license-files = ["LICENSE"] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", @@ -100,7 +100,6 @@ postgresql_psycopgbinary = ["sqlalchemy[postgresql-psycopgbinary]"] [tool.setuptools] include-package-data = true -license-files = ["LICENSE"] [tool.setuptools.packages.find] where = ["lib"] -- 2.47.2