File tree 3 files changed +0
-40
lines changed
3 files changed +0
-40
lines changed Original file line number Diff line number Diff line change 8
8
import pathlib
9
9
import operator
10
10
import textwrap
11
- import warnings
12
11
import functools
13
12
import itertools
14
13
import posixpath
@@ -187,17 +186,6 @@ def _for(self, dist):
187
186
self .dist = dist
188
187
return self
189
188
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
-
201
189
def __reduce__ (self ):
202
190
return (
203
191
self .__class__ ,
Original file line number Diff line number Diff line change 1
1
import re
2
2
import textwrap
3
3
import unittest
4
- import warnings
5
4
import importlib
6
5
7
6
from . import fixtures
@@ -116,23 +115,6 @@ def test_entry_points_missing_name(self):
116
115
def test_entry_points_missing_group (self ):
117
116
assert entry_points (group = 'missing' ) == ()
118
117
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
-
136
118
def test_metadata_for_this_package (self ):
137
119
md = metadata ('egginfo-pkg' )
138
120
assert md ['author' ] == 'Steven Ma'
Original file line number Diff line number Diff line change 1
1
import re
2
- import json
3
2
import pickle
4
3
import textwrap
5
4
import unittest
6
- import warnings
7
5
import importlib
8
6
import importlib_metadata
9
7
import pyfakefs .fake_filesystem_unittest as ffs
@@ -243,14 +241,6 @@ def test_hashable(self):
243
241
"""EntryPoints should be hashable"""
244
242
hash (self .ep )
245
243
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
-
254
244
def test_module (self ):
255
245
assert self .ep .module == 'value'
256
246
You can’t perform that action at this time.
0 commit comments