bpo-43926: Cleaner metadata with PEP 566 JSON support. (GH-25565)

* bpo-43926: Cleaner metadata with PEP 566 JSON support.

* Add blurb

* Add versionchanged and versionadded declarations for changes to metadata.

* Use descriptor for PEP 566
This commit is contained in:
Jason R. Coombs 2021-05-02 17:03:40 -04:00 committed by GitHub
parent 0ad1e0384c
commit 37e0c7850d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 254 additions and 26 deletions

View file

@ -1,5 +1,6 @@
import os
import sys
import copy
import shutil
import pathlib
import tempfile
@ -108,6 +109,16 @@ class DistInfoPkg(OnSysPath, SiteDir):
super(DistInfoPkg, self).setUp()
build_files(DistInfoPkg.files, self.site_dir)
def make_uppercase(self):
"""
Rewrite metadata with everything uppercase.
"""
shutil.rmtree(self.site_dir / "distinfo_pkg-1.0.0.dist-info")
files = copy.deepcopy(DistInfoPkg.files)
info = files["distinfo_pkg-1.0.0.dist-info"]
info["METADATA"] = info["METADATA"].upper()
build_files(files, self.site_dir)
class DistInfoPkgWithDot(OnSysPath, SiteDir):
files: FilesDef = {