1 """Deprecated - New code should avoid these"""
4 from ..compat
.compat_utils
import passthrough_module
6 # XXX: Implement this the same way as other DeprecationWarnings without circular import
7 passthrough_module(__name__
, '.._legacy', callback
=lambda attr
: warnings
.warn(
8 DeprecationWarning(f
'{__name__}.{attr} is deprecated'), stacklevel
=6))
16 def bytes_to_intlist(bs
):
19 if isinstance(bs
[0], int): # Python 3
22 return [ord(c
) for c
in bs
]
25 def intlist_to_bytes(xs
):
28 return struct
.pack('%dB' % len(xs
), *xs
)
31 compiled_regex_type
= type(re
.compile(''))