Skip to content

Commit f064d44

Browse files
committed
Declare license via (the accepted) PEP 639.
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
1 parent 93e0caa commit f064d44

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

jsonschema/tests/test_cli.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -881,11 +881,8 @@ def test_useless_error_format(self):
881881

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

890887
def test_version(self):
891888
version = subprocess.check_output(

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ source = "vcs"
99
name = "jsonschema"
1010
description = "An implementation of JSON Schema validation for Python"
1111
requires-python = ">=3.9"
12-
license = {text = "MIT"}
12+
license = "MIT"
13+
license-files = ["COPYING"]
1314
keywords = [
1415
"validation",
1516
"data validation",
@@ -23,7 +24,6 @@ authors = [
2324
classifiers = [
2425
"Development Status :: 5 - Production/Stable",
2526
"Intended Audience :: Developers",
26-
"License :: OSI Approved :: MIT License",
2727
"Operating System :: OS Independent",
2828
"Programming Language :: Python",
2929
"Programming Language :: Python :: 3.9",

0 commit comments

Comments
 (0)