gh-97781: Apply changes from importlib_metadata 5. (GH-97785)

* gh-97781: Apply changes from importlib_metadata 5.

* Apply changes from upstream

* Apply changes from upstream.
This commit is contained in:
Jason R. Coombs 2022-10-06 15:25:24 -04:00 committed by GitHub
parent 2b5f1360ea
commit 8af04cdef2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 88 additions and 302 deletions

View file

@ -1,8 +1,6 @@
import re
import json
import pickle
import unittest
import warnings
import importlib.metadata
try:
@ -260,14 +258,6 @@ class TestEntryPoints(unittest.TestCase):
"""EntryPoints should be hashable"""
hash(self.ep)
def test_json_dump(self):
"""
json should not expect to be able to dump an EntryPoint
"""
with self.assertRaises(Exception):
with warnings.catch_warnings(record=True):
json.dumps(self.ep)
def test_module(self):
assert self.ep.module == 'value'