Commit graph

52 commits

Author SHA1 Message Date
INADA Naoki
1bf62ba6f8
PendingDeprecationWarning -> DeprecationWarning (#321) 2018-11-09 21:39:25 +09:00
INADA Naoki
3b80233592
unpacker: Make default size limit smaller (#319)
To avoid DoS attack, make default size limit smaller.

Fixes #295
2018-11-08 22:21:44 +09:00
INADA Naoki
ae3a6ba0b0
Deprecate implementation module's unpack() (#290) 2018-02-23 15:41:21 +09:00
INADA Naoki
fbaa1360be Fix #285 again 2018-02-23 11:35:09 +09:00
INADA Naoki
9455fccc52 Revert "Move unpack() from each implementation to __init__. (#286)"
This reverts commit da902f9c1d.
2018-02-23 11:32:26 +09:00
INADA Naoki
da902f9c1d
Move unpack() from each implementation to __init__. (#286)
Fixes #285
2018-02-22 00:55:32 +09:00
INADA Naoki
2644cbdcb7
Use cython's cast for converting encoding and errors (#279)
It is little faster on Python 3 because we can skip temporary bytes object
2018-02-05 11:44:17 +09:00
INADA Naoki
9fdb83719d
Undeprecate unicode_errors (#278) 2018-02-05 02:19:48 +09:00
INADA Naoki
5569a4efcd
s/raw_as_bytes/raw/g (#276)
fixes #273
2018-01-12 19:22:36 +09:00
INADA Naoki
5534d0c7af
Add raw_as_bytes option to Unpacker. (#265) 2018-01-11 17:02:41 +09:00
INADA Naoki
43137d6bd2
Deprecate write_bytes option in Unpacker. (#262)
Fixes #197
2018-01-05 20:19:04 +09:00
jfolz
a8d9162ca6 Unpacker: add tell() (#227) 2017-04-30 02:33:20 +09:00
INADA Naoki
2481c64cf1 Merge branch 'release-0.4' 2017-01-12 18:17:00 +09:00
TW
e3fea94509 fix typos and other cosmetic issues (#214)
cosmetic issues:
- reST headlines' underline length needs to match the headline length
  (looks like somebody is / was using a proportional font)
- Cython code lines do not need to be terminated with a semicolon
- always use triple-double-quotes for docstrings
2017-01-11 12:04:23 +09:00
folz
2b63e9fbbb enable unpacking from memoryview 2016-06-13 15:37:33 +02:00
INADA Naoki
6b113a6fb3 Use Python's memory API (#185) 2016-04-30 17:07:14 +09:00
INADA Naoki
3dad39811d Deprecate PackExceptions 2016-02-14 14:29:34 +09:00
palaviv
1183eff688 reraising ValueError from unpack.h as UnpackValueError 2016-02-12 15:37:39 +02:00
INADA Naoki
b6e962d0a6 Merge pull request #163 from ThomasWaldmann/master
fix typos
2015-12-10 17:42:15 +09:00
Thomas Waldmann
9c6584ee10 fix typos 2015-12-09 13:53:42 +01:00
INADA Naoki
7d900371c8 Fix compile error 2015-11-09 02:09:39 +09:00
INADA Naoki
f7d3715f2c Add missing params to unpack() 2015-11-09 02:00:48 +09:00
INADA Naoki
35a69ac9c2 Decrease refcnt when error happend while unpacking
Fixes #152
2015-11-08 12:43:54 +09:00
INADA Naoki
e9ab4d8824 Fix warnings
fixes #146
2015-11-07 16:52:58 +09:00
Johannes Dollinger
4eb4c7a994 Accept ext_hook for unpack() 2015-07-27 20:29:43 +02:00
INADA Naoki
2985f4d865 Fix error when use unicode_literal in Python 2 2015-01-25 02:35:57 +09:00
INADA Naoki
75ce78dd15 Add max_<type>_len option to unpacker. (fixes #97).
Fix build error on 32bit environment (fixes #102).
2015-01-25 01:41:21 +09:00
Alexey Popravka
d850e56dd0 Unpacker's ext_hook fixed + tests 2014-03-24 15:31:06 +02:00
INADA Naoki
6d80569b9b Unpacker: maintain refcnt (fix #67). 2014-02-13 09:58:38 +09:00
INADA Naoki
9d61f24387 Feed data from file before _unpack() 2014-02-13 03:10:51 +09:00
INADA Naoki
f322ed4e1b Merge pull request #84 from wbolster/exception-type-cleanups
Always raise TypeError for wrong argument types
2014-02-13 01:19:33 +09:00
Wouter Bolsterlee
dd65341e0d Cosmetic changes to fix Cython warnings
Put declarations on separate line to avoid warnings like this:

  Non-trivial type declarators in shared declaration (e.g. mix
  of pointers and values). Each pointer declaration should be
  on its own line.
2014-02-11 21:05:15 +01:00
Wouter Bolsterlee
77046b839d Always raise TypeError for wrong argument types
The code that checks whether hooks are callable() (and some other type
checks) should always raise TypeError on failure. Before this change,
both ValueError and TypeError were used in an inconsistent way (C
extension and Python implementation were not the same).
2014-02-11 20:42:58 +01:00
INADA Naoki
96bcd76f49 Packing ExtType and some cleanup 2013-10-20 20:28:32 +09:00
INADA Naoki
aa68c9b833 fallback: Support pack_ext_type. 2013-10-20 15:40:20 +09:00
INADA Naoki
27f0cba8a5 Merge branch 'master' of https://github.com/antocuni/msgpack-python into newspec
Conflicts:
	msgpack/fallback.py
	msgpack/unpack.h
	msgpack/unpack_define.h
	msgpack/unpack_template.h
2013-10-20 15:08:31 +09:00
Antonio Cuni
56dd1650a4 implement unpacking for all the fixtext formats 2013-10-19 17:27:16 +02:00
Antonio Cuni
ff858387d3 implement unpack_one also for the cython version, and add a test for it 2013-10-19 01:49:03 +02:00
INADA Naoki
85eaff344b Add bin type support for fallback Unpacker. 2013-10-17 09:15:19 +09:00
YAMAMOTO Takashi
3dbb2d1e7e fix compilation errors 2013-06-03 13:53:43 +09:00
INADA Naoki
956f55ecdf Stop using const_void_ptr typedef.
New Cython supports const natively.
2013-05-19 12:32:33 +09:00
INADA Naoki
bbe86e7a92 Revert "Use new buffer interface."
This reverts commit 085db7f8dc.

Conflicts:
	msgpack/_unpacker.pyx
2013-05-19 12:30:23 +09:00
YAMAMOTO Takashi
63b9fa5843 fix a compilation error
msgpack/_unpacker.pyx: In function 'PyObject* __pyx_pf_7msgpack_9_unpacker_unpac
kb(PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*, PyObject*, PyObje
ct*)':
msgpack/_unpacker.pyx:111:70: error: invalid cast from type 'Py_buffer' to type 'char*'
2013-05-16 12:58:00 +09:00
INADA Naoki
085db7f8dc Use new buffer interface. 2013-04-08 10:57:21 +09:00
INADA Naoki
18215b01bb Unpacker.feed() uses new buffer interface. 2013-04-08 10:52:11 +09:00
INADA Naoki
0faa1bb558 Remove unnecessary type declaration. 2013-04-08 01:57:37 +09:00
INADA Naoki
c49489cd37 remove some macros. 2013-02-27 21:12:20 +09:00
INADA Naoki
5176e92d99 Fix typeerror. 2013-02-26 09:55:13 +09:00
INADA Naoki
8e13598a36 docs: better unpacker docstring. 2013-02-26 09:49:25 +09:00
INADA Naoki
f0fd90a759 Fix exception incompatibility. 2013-02-22 17:41:52 +09:00