diff options
author | INADA Naoki <methane@users.noreply.github.com> | 2018-01-05 20:19:04 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-05 20:19:04 +0900 |
commit | 43137d6bd2cc841af775a9c8132e72d284b119e3 (patch) | |
tree | b0362f7d5963785358cb1a352ccb06ca2b6bede8 /msgpack/_unpacker.pyx | |
parent | 0e2021d3a3d1218ca191f4e802df0af3bbfaa51f (diff) | |
download | msgpack-python-43137d6bd2cc841af775a9c8132e72d284b119e3.tar.gz |
Deprecate write_bytes option in Unpacker. (#262)
Fixes #197
Diffstat (limited to 'msgpack/_unpacker.pyx')
-rw-r--r-- | msgpack/_unpacker.pyx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/msgpack/_unpacker.pyx b/msgpack/_unpacker.pyx index dabc5f7..564749e 100644 --- a/msgpack/_unpacker.pyx +++ b/msgpack/_unpacker.pyx @@ -458,6 +458,9 @@ cdef class Unpacker(object): cdef object obj cdef Py_ssize_t prev_head + if write_bytes is not None: + PyErr_WarnEx(DeprecationWarning, "`write_bytes` option is deprecated. Use `.tell()` instead.", 1) + if self.buf_head >= self.buf_tail and self.file_like is not None: self.read_from_file() |