Skip to content

Commit 9c2aa50

Browse files
committed
deprecate unused and untested scrapy.utils.datatypes.MultiValueDict
1 parent 7070dae commit 9c2aa50

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

scrapy/utils/datatypes.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,22 @@
77

88
import copy
99
import six
10+
import warnings
1011
from collections import OrderedDict
1112

13+
from scrapy.exceptions import ScrapyDeprecationWarning
14+
1215

1316
class MultiValueDictKeyError(KeyError):
14-
pass
17+
def __init__(self, *args, **kwargs):
18+
warnings.warn(
19+
"scrapy.utils.datatypes.MultiValueDictKeyError is deprecated "
20+
"and will be removed in future releases.",
21+
category=ScrapyDeprecationWarning,
22+
stacklevel=2
23+
)
24+
super(MultiValueDictKeyError, self).__init__(*args, **kwargs)
25+
1526

1627
class MultiValueDict(dict):
1728
"""
@@ -31,6 +42,10 @@ class MultiValueDict(dict):
3142
single name-value pairs.
3243
"""
3344
def __init__(self, key_to_list_mapping=()):
45+
warnings.warn("scrapy.utils.datatypes.MultiValueDict is deprecated "
46+
"and will be removed in future releases.",
47+
category=ScrapyDeprecationWarning,
48+
stacklevel=2)
3449
dict.__init__(self, key_to_list_mapping)
3550

3651
def __repr__(self):

0 commit comments

Comments
 (0)