Commit graph

51 commits

Author SHA1 Message Date
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
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
Pramukta Kumar
10cd2d2ebf calling the default function upon integer overflow in the fallback routine 2015-03-17 15:05:04 -04:00
INADA Naoki
4576b94b6c fallback: Add some comment to Unpacker members. 2015-01-27 14:04:32 +09:00
Bas Westerbaan
a71a24d86a Fix #124
When using Unpacker as an iterator, after each yield, the internal
buffer (_fb_buffer) was compacted by reallocation (done by _fb_consume).
When dealing with a lot of small objects, this is very ineffecient.
Thus in commit 7eb371f827 the pure python
fallback only reallocated the complete buffer when the iteration stops.
When halfway there happens to be data missing in the buffer, we rollback
the buffer to the state before this failed call, and raise an OutOfData.
This rollback, done by _fb_rollback, did not consider the possibility
that the buffer was *not* reallocated.  This commit corrects that.
2015-01-26 20:34:31 +01: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
Xiaojie Lin
d5e9ac9316 add support for pypy3 2014-11-14 14:47:54 +11:00
Bas Westerbaan
0532ea87fb fallback: fix BufferFull with sloppy consume 2014-06-15 22:45:30 +02:00
Bas Westerbaan
b334d441c3 fallback: _fb_read: do a big read, when we need a big read 2014-06-14 18:42:02 +02:00
Bas Westerbaan
952eb9fc53 fallback: add some comments to _fb_read 2014-06-14 18:34:17 +02:00
Bas Westerbaan
7eb371f827 fallback: do not reset the buffer completely in between of iterations 2014-06-14 18:30:38 +02:00
Bas Westerbaan
ba8cf1c402 fallback: _fb_consume: improve performance with pypy 2014-06-14 18:26:30 +02:00
Bas Westerbaan
56cf384159 fallback: set default read_size to 4096 2014-06-14 18:25:57 +02:00
Bas Westerbaan
67391fd60e fallback: add missing update of _fb_buf_n 2014-06-14 18:25:34 +02:00
INADA Naoki
ef5d93d4ea Fix size limit on pack_array_header and pack_map_header. 2014-03-26 11:05:53 +09:00
INADA Naoki
eb3537ab50 Merge branch 'pr/82' 2014-02-17 04:07:16 +09:00
INADA Naoki
7effb4aac6 fix 2014-02-17 04:05:04 +09:00
Sergey Zhuravlev
11a3b1561a fixed support of python3 2014-02-12 23:09:23 +04: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
Sergey Zhuravlev
48ca2d700d Added support of bytearrays to msgpack/fallback.py 2013-12-15 16:22:39 +00:00
INADA Naoki
e3fee4db5f fallback: support packing ExtType 2013-10-21 00:59:22 +09:00
INADA Naoki
aa68c9b833 fallback: Support pack_ext_type. 2013-10-20 15:40:20 +09:00
INADA Naoki
7123341ca8 code refactoring. 2013-10-20 14:34:36 +09:00
INADA Naoki
d9439204c7 Add ext type support to fallback.Unpacker. 2013-10-17 11:29:36 +09:00
INADA Naoki
85eaff344b Add bin type support for fallback Unpacker. 2013-10-17 09:15:19 +09:00
INADA Naoki
84f6b10019 Add bin type support to pure Python packer. 2013-10-17 08:52:59 +09:00
INADA Naoki
171c538113 refactoring. 2013-10-17 08:44:25 +09:00
YAMAMOTO Takashi
56dbf7f9be fix more comment typos 2013-05-07 13:56:39 +09:00
YAMAMOTO Takashi
0c3fecf91b fix a typo in a comment 2013-05-01 12:15:12 +09:00
INADA Naoki
3ce005cf37 better packer docstring 2013-02-26 09:20:44 +09:00
INADA Naoki
1e38bfa123 fallback: refactor 2013-02-25 18:23:42 +09:00
INADA Naoki
38a9ad98c9 Revert skipping reserved byte. 2013-02-23 18:11:46 +09:00
INADA Naoki
f0fd90a759 Fix exception incompatibility. 2013-02-22 17:41:52 +09:00
INADA Naoki
d766820421 Fix easy bug. 2013-02-21 16:55:42 +09:00
INADA Naoki
9524033194 skip reserved byte. 2013-02-21 14:01:12 +09:00
Alex Gaynor
3f12846d40 On PyPy, preallocate lists
When deserealizing arrays, preallocate the resulting list at the correct size.
2013-02-16 12:08:14 -08:00
INADA Naoki
a865f8f7e9 Use _private names for non public data members. (fix #44) 2013-02-04 15:14:30 +09:00
INADA Naoki
22920baae6 Fix minor bugs and tuning unpacking dict. 2013-02-03 00:20:00 +09:00
INADA Naoki
8d6a387dff fallback: Support Python 3. 2013-01-29 15:10:22 +09:00
INADA Naoki
328369e52e pep8 friendly. 2013-01-29 14:33:37 +09:00
Bas Westerbaan
4cde7f080c fallback: _fb_read: add fast-path 2013-01-29 03:46:07 +01:00
Bas Westerbaan
d91a0d3d68 Revert "fallback: Use mmap objects instead of strings to unpack"
See next commit.

This reverts commit 770fed6b7f.
2013-01-29 03:45:17 +01:00
Bas Westerbaan
770fed6b7f fallback: Use mmap objects instead of strings to unpack
Signed-off-by: Bas Westerbaan <bas@westerbaan.name>
2013-01-29 03:44:44 +01:00
Bas Westerbaan
d2f549a470 fallback: add actual rollback and add a testcase for it
Signed-off-by: Bas Westerbaan <bas@westerbaan.name>
2013-01-29 02:58:26 +01:00
Bas Westerbaan
fb81f80d14 fallback: bugfix in next() 2013-01-29 02:47:41 +01:00
Bas Westerbaan
94925acb12 fallback: do not use dynamic format strings for struct.(un)pack
Increases performance on PyPy.
2013-01-29 02:15:29 +01:00
Bas Westerbaan
af9c9ca2c9 fallback: performance: write(a+b) -> write(a); write(b) 2013-01-29 02:01:34 +01:00
Bas Westerbaan
b940802032 fallback: two fixes for raising ExtraData 2013-01-28 22:29:23 +01:00
Bas Westerbaan
69ba3c9bf9 fallback: use __pypy__.builders.StringBuilder when available
This increases performance *a lot* on PyPy.

Signed-off-by: Bas Westerbaan <bas@westerbaan.name>
2013-01-28 13:43:39 +01:00