Skip to content

Commit 6a4583d

Browse files
authored
Deprecate pallets stubs (#5424)
Part of #5423 * Support new metadata fields in check_consistent
1 parent ceb308d commit 6a4583d

File tree

7 files changed

+8
-3
lines changed

7 files changed

+8
-3
lines changed

stubs/Flask/METADATA.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
version = "0.1"
22
python2 = true
33
requires = ["types-Jinja2", "types-Werkzeug", "types-click"]
4+
obsolete_since = "2.0"

stubs/Jinja2/METADATA.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
version = "0.1"
22
python2 = true
33
requires = ["types-MarkupSafe"]
4+
obsolete_since = "3.0"

stubs/MarkupSafe/METADATA.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
version = "0.1"
22
python2 = true
3+
obsolete_since = "2.0"

stubs/Werkzeug/METADATA.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
version = "0.1"
22
python2 = true
33
requires = []
4+
obsolete_since = "2.0"

stubs/click/METADATA.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
version = "0.1"
22
python2 = true
3+
obsolete_since = "8.0"

stubs/itsdangerous/METADATA.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
version = "0.1"
22
python2 = true
3+
obsolete_since = "2.0"

tests/check_consistent.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
{"stdlib/@python2/builtins.pyi", "stdlib/@python2/__builtin__.pyi"},
2222
{"stdlib/threading.pyi", "stdlib/_dummy_threading.pyi"},
2323
]
24+
metadata_keys = {"version", "python2", "python3", "requires", "extra_description", "obsolete_since"}
2425

2526

2627
def assert_stubs_only(directory):
@@ -161,9 +162,7 @@ def check_metadata():
161162
major, minor = version.split(".")
162163
assert major.isdigit() and minor.isdigit(), msg
163164
for key in data:
164-
assert key in {
165-
"version", "python2", "python3", "requires"
166-
}, f"Unexpected key {key} for {distribution}"
165+
assert key in metadata_keys, f"Unexpected key {key} for {distribution}"
167166
assert isinstance(data.get("python2", False), bool), f"Invalid python2 value for {distribution}"
168167
assert isinstance(data.get("python3", True), bool), f"Invalid python3 value for {distribution}"
169168
assert isinstance(data.get("requires", []), list), f"Invalid requires value for {distribution}"

0 commit comments

Comments
 (0)