File tree Expand file tree Collapse file tree 3 files changed +0
-40
lines changed
Expand file tree Collapse file tree 3 files changed +0
-40
lines changed Original file line number Diff line number Diff line change 88import pathlib
99import operator
1010import textwrap
11- import warnings
1211import functools
1312import itertools
1413import posixpath
@@ -187,17 +186,6 @@ def _for(self, dist):
187186 self .dist = dist
188187 return self
189188
190- def __iter__ (self ):
191- """
192- Supply iter so one may construct dicts of EntryPoints by name.
193- """
194- msg = (
195- "Construction of dict of EntryPoints is deprecated in "
196- "favor of EntryPoints."
197- )
198- warnings .warn (msg , DeprecationWarning )
199- return iter ((self .name , self ))
200-
201189 def __reduce__ (self ):
202190 return (
203191 self .__class__ ,
Original file line number Diff line number Diff line change 11import re
22import textwrap
33import unittest
4- import warnings
54import importlib
65
76from . import fixtures
@@ -116,23 +115,6 @@ def test_entry_points_missing_name(self):
116115 def test_entry_points_missing_group (self ):
117116 assert entry_points (group = 'missing' ) == ()
118117
119- def test_entry_points_dict_construction (self ):
120- """
121- Prior versions of entry_points() returned simple lists and
122- allowed casting those lists into maps by name using ``dict()``.
123- Capture this now deprecated use-case.
124- """
125- with warnings .catch_warnings (record = True ) as caught :
126- eps = dict (entry_points (group = 'entries' ))
127-
128- assert 'main' in eps
129- assert eps ['main' ] == entry_points (group = 'entries' )['main' ]
130-
131- # check warning
132- expected = next (iter (caught ))
133- assert expected .category is DeprecationWarning
134- assert "Construction of dict of EntryPoints is deprecated" in str (expected )
135-
136118 def test_metadata_for_this_package (self ):
137119 md = metadata ('egginfo-pkg' )
138120 assert md ['author' ] == 'Steven Ma'
Original file line number Diff line number Diff line change 11import re
2- import json
32import pickle
43import textwrap
54import unittest
6- import warnings
75import importlib
86import importlib_metadata
97import pyfakefs .fake_filesystem_unittest as ffs
@@ -243,14 +241,6 @@ def test_hashable(self):
243241 """EntryPoints should be hashable"""
244242 hash (self .ep )
245243
246- def test_json_dump (self ):
247- """
248- json should not expect to be able to dump an EntryPoint
249- """
250- with self .assertRaises (Exception ):
251- with warnings .catch_warnings (record = True ):
252- json .dumps (self .ep )
253-
254244 def test_module (self ):
255245 assert self .ep .module == 'value'
256246
You can’t perform that action at this time.
0 commit comments