Skip to content

Commit

Permalink
Declare license via (the accepted) PEP 639.
Browse files Browse the repository at this point in the history
The License field is deprecated, as is the trove classifier.

Note that pip show does not support properly detecting these yet,
but it will.

Note also that `pip-licenses` does not support PEP 639 (see
raimon49/pip-licenses#213) the implications of which are that we are
already broken (the `license_check` noxenv fails because of packages
already using the newer standard). This doesn't fix that yet. AFAICT no
tool exists that does this properly yet/now. So let's see... I guess we
reimplement that functionality?!

Refs: https://peps.python.org/pep-0639/
Refs: pypa/pip#13112
Refs: pypa/pip#6677
  • Loading branch information
Julian committed Dec 28, 2024
1 parent 93e0caa commit f064d44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions jsonschema/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,11 +881,8 @@ def test_useless_error_format(self):

class TestCLIIntegration(TestCase):
def test_license(self):
output = subprocess.check_output(
[sys.executable, "-m", "pip", "show", "jsonschema"],
stderr=subprocess.STDOUT,
)
self.assertIn(b"License: MIT", output)
our_metadata = metadata.metadata("jsonschema")
self.assertEqual(our_metadata.get("License-Expression"), "MIT")

def test_version(self):
version = subprocess.check_output(
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ source = "vcs"
name = "jsonschema"
description = "An implementation of JSON Schema validation for Python"
requires-python = ">=3.9"
license = {text = "MIT"}
license = "MIT"
license-files = ["COPYING"]
keywords = [
"validation",
"data validation",
Expand All @@ -23,7 +24,6 @@ authors = [
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.9",
Expand Down

0 comments on commit f064d44

Please sign in to comment.