Open terwilliger42 opened 7 years ago
Not sure why this fails Travis for Python 2.6, but don't think it has anything to do with my change.
Would be awesome if someone merged it. My logs are rather unreadable because of tons of deprecation warnings. :/
@michcio1234 FYI: You can use Python's 'warnings' module to suppress these messages. Here's what we've done in the interim. This disables this specific warning only within the context manager.
import warnings
with warnings.catch_warnings():
# Filter out Thriftpy deprecation warnings
warnings.filterwarnings(action='ignore', message=r'tostring\(\) is deprecated. Use tobytes\(\) instead.', module='thriftpy.protocol.compact',
category=DeprecationWarning)
<thrift code here>
Fixes #302; calls appropriate array.tobytes / array.tostring depending on Python version.