6
6
import pandas as pd
7
7
8
8
import xray
9
- from .pycompat import basestring , iteritems , PY3
9
+ from .pycompat import basestring , iteritems
10
10
11
11
12
12
def alias_warning (old_name , new_name , stacklevel = 2 ):
@@ -218,8 +218,6 @@ class Frozen(Mapping):
218
218
immutable. If you really want to modify the mapping, the mutable version is
219
219
saved under the `mapping` attribute.
220
220
"""
221
- __slots__ = ['mapping' ]
222
-
223
221
def __init__ (self , mapping ):
224
222
self .mapping = mapping
225
223
@@ -238,11 +236,6 @@ def __contains__(self, key):
238
236
def __repr__ (self ):
239
237
return '%s(%r)' % (type (self ).__name__ , self .mapping )
240
238
241
- if not PY3 :
242
- def __getstate__ (self ):
243
- return self .__dict__
244
-
245
-
246
239
def FrozenOrderedDict (* args , ** kwargs ):
247
240
return Frozen (OrderedDict (* args , ** kwargs ))
248
241
@@ -252,8 +245,6 @@ class SortedKeysDict(MutableMapping):
252
245
items in sorted order by key but is otherwise equivalent to the underlying
253
246
mapping.
254
247
"""
255
- __slots__ = ['mapping' ]
256
-
257
248
def __init__ (self , mapping = None ):
258
249
self .mapping = {} if mapping is None else mapping
259
250
@@ -281,19 +272,13 @@ def __repr__(self):
281
272
def copy (self ):
282
273
return type (self )(self .mapping .copy ())
283
274
284
- if not PY3 :
285
- def __getstate__ (self ):
286
- return self .__dict__
287
-
288
275
289
276
class ChainMap (MutableMapping ):
290
277
"""Partial backport of collections.ChainMap from Python>=3.3
291
278
292
279
Don't return this from any public APIs, since some of the public methods
293
280
for a MutableMapping are missing (they will raise a NotImplementedError)
294
281
"""
295
- __slots__ = ['maps' ]
296
-
297
282
def __init__ (self , * maps ):
298
283
self .maps = maps
299
284
@@ -317,10 +302,6 @@ def __iter__(self):
317
302
def __len__ (self ):
318
303
raise NotImplementedError
319
304
320
- if not PY3 :
321
- def __getstate__ (self ):
322
- return self .__dict__
323
-
324
305
325
306
class NDArrayMixin (object ):
326
307
"""Mixin class for making wrappers of N-dimensional arrays that conform to
0 commit comments