Skip to content

Commit 94a9420

Browse files
committed
pandas.msgpack pandas.io.msgpack
1 parent 0de97de commit 94a9420

27 files changed

+45
-43
lines changed

asv_bench/benchmarks/binary_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ def setup(self):
107107
self.s = Series(date_range('20010101', periods=self.N, freq='T', tz='US/Eastern'))
108108
self.ts = self.s[self.halfway]
109109

110-
self.s2 = Series(date_range('20010101', periods=self.N, freq='s', tz='US/Eastern'))
110+
self.s2 = Series(date_range('20010101', periods=self.N, freq='s', tz='US/Eastern'))

asv_bench/benchmarks/panel_methods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ def time_shift(self):
2121
self.panel.shift(1)
2222

2323
def time_shift_minor(self):
24-
self.panel.shift(1, axis='minor')
24+
self.panel.shift(1, axis='minor')

doc/source/whatsnew/v0.20.0.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,15 +451,17 @@ New Behavior:
451451
Extension Modules Moving
452452
^^^^^^^^^^^^^^^^^^^^^^^^
453453

454-
Some formerly public extension modules have been moved and/or renamed. These are deprecated from the public API. (:issue:`12588`)
454+
Some formerly public extension modules have been moved and/or renamed. These are all removed from the public API.
455+
If indicated, a deprecation warning will be issued if you reference that module. (:issue:`12588`)
455456

456457
.. csv-table::
457-
:header: "Previous Location", "New Location"
458-
:widths: 35, 35
458+
:header: "Previous Location", "New Location", "Deprecated", "Removed"
459+
:widths: 30, 30, 4, 4
459460

460-
"pandas.json", "pandas.io.json.libjson"
461-
"pandas.parser", "pandas.io.libparsers"
462-
"pandas.io.sas.saslib", "pandas.io.sas.libsas"
461+
"pandas.json", "pandas.io.json.libjson", "X", ""
462+
"pandas.parser", "pandas.io.libparsers", "X", ""
463+
"pandas.io.sas.saslib", "pandas.io.sas.libsas", "", "X"
464+
"pandas.msgpack", "pandas.io.msgpack", "", "X"
463465

464466

465467
.. _whatsnew_0200.api_breaking.groupby_describe:

pandas/msgpack/__init__.py renamed to pandas/io/msgpack/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from collections import namedtuple
44

5-
from pandas.msgpack.exceptions import * # noqa
6-
from pandas.msgpack._version import version # noqa
5+
from pandas.io.msgpack.exceptions import * # noqa
6+
from pandas.io.msgpack._version import version # noqa
77

88

99
class ExtType(namedtuple('ExtType', 'code data')):
@@ -19,8 +19,8 @@ def __new__(cls, code, data):
1919

2020
import os # noqa
2121

22-
from pandas.msgpack._packer import Packer # noqa
23-
from pandas.msgpack._unpacker import unpack, unpackb, Unpacker # noqa
22+
from pandas.io.msgpack._packer import Packer # noqa
23+
from pandas.io.msgpack._unpacker import unpack, unpackb, Unpacker # noqa
2424

2525

2626
def pack(o, stream, **kwargs):

pandas/msgpack/_packer.pyx renamed to pandas/io/msgpack/_packer.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ from libc.stdlib cimport *
66
from libc.string cimport *
77
from libc.limits cimport *
88

9-
from pandas.msgpack.exceptions import PackValueError
10-
from pandas.msgpack import ExtType
9+
from pandas.io.msgpack.exceptions import PackValueError
10+
from pandas.io.msgpack import ExtType
1111

1212

13-
cdef extern from "../src/msgpack/pack.h":
13+
cdef extern from "../../src/msgpack/pack.h":
1414
struct msgpack_packer:
1515
char* buf
1616
size_t length

pandas/msgpack/_unpacker.pyx renamed to pandas/io/msgpack/_unpacker.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ from libc.stdlib cimport *
1111
from libc.string cimport *
1212
from libc.limits cimport *
1313

14-
from pandas.msgpack.exceptions import (BufferFull, OutOfData,
14+
from pandas.io.msgpack.exceptions import (BufferFull, OutOfData,
1515
UnpackValueError, ExtraData)
16-
from pandas.msgpack import ExtType
16+
from pandas.io.msgpack import ExtType
1717

1818

19-
cdef extern from "../src/msgpack/unpack.h":
19+
cdef extern from "../../src/msgpack/unpack.h":
2020
ctypedef struct msgpack_user:
2121
bint use_list
2222
PyObject* object_hook
File renamed without changes.
File renamed without changes.

pandas/io/packers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
from pandas.core.internals import BlockManager, make_block, _safe_reshape
6565
import pandas.core.internals as internals
6666

67-
from pandas.msgpack import Unpacker as _Unpacker, Packer as _Packer, ExtType
67+
from pandas.io.msgpack import Unpacker as _Unpacker, Packer as _Packer, ExtType
6868
from pandas.util._move import (
6969
BadMove as _BadMove,
7070
move_into_mutable_buffer as _move_into_mutable_buffer,

pandas/tests/api/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class TestPDApi(Base, tm.TestCase):
3333
# top-level sub-packages
3434
lib = ['api', 'compat', 'computation', 'core',
3535
'indexes', 'formats', 'pandas',
36-
'test', 'tools', 'tseries', 'msgpack', 'sparse',
36+
'test', 'tools', 'tseries', 'sparse',
3737
'types', 'util', 'options', 'io']
3838

3939
# top-level packages that are c-imports, should rename to _*

pandas/tests/msgpack/test_buffer.py renamed to pandas/tests/io/msgpack/test_buffer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding: utf-8
22

3-
from pandas.msgpack import packb, unpackb
3+
from pandas.io.msgpack import packb, unpackb
44

55

66
def test_unpack_buffer():

pandas/tests/msgpack/test_case.py renamed to pandas/tests/io/msgpack/test_case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding: utf-8
22

3-
from pandas.msgpack import packb, unpackb
3+
from pandas.io.msgpack import packb, unpackb
44

55

66
def check(length, obj):

pandas/tests/msgpack/test_except.py renamed to pandas/tests/io/msgpack/test_except.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# coding: utf-8
22

33
import unittest
4-
from pandas.msgpack import packb, unpackb
4+
from pandas.io.msgpack import packb, unpackb
55

66

77
class DummyException(Exception):

pandas/tests/msgpack/test_extension.py renamed to pandas/tests/io/msgpack/test_extension.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import print_function
22
import array
3-
import pandas.msgpack as msgpack
4-
from pandas.msgpack import ExtType
3+
import pandas.io.msgpack as msgpack
4+
from pandas.io.msgpack import ExtType
55

66

77
def test_pack_ext_type():

pandas/tests/msgpack/test_format.py renamed to pandas/tests/io/msgpack/test_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding: utf-8
22

3-
from pandas.msgpack import unpackb
3+
from pandas.io.msgpack import unpackb
44

55

66
def check(src, should, use_list=0):

pandas/tests/msgpack/test_limits.py renamed to pandas/tests/io/msgpack/test_limits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
unicode_literals)
44
import pandas.util.testing as tm
55

6-
from pandas.msgpack import packb, unpackb, Packer, Unpacker, ExtType
6+
from pandas.io.msgpack import packb, unpackb, Packer, Unpacker, ExtType
77

88

99
class TestLimits(tm.TestCase):

pandas/tests/msgpack/test_newspec.py renamed to pandas/tests/io/msgpack/test_newspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding: utf-8
22

3-
from pandas.msgpack import packb, unpackb, ExtType
3+
from pandas.io.msgpack import packb, unpackb, ExtType
44

55

66
def test_str8():

pandas/tests/msgpack/test_obj.py renamed to pandas/tests/io/msgpack/test_obj.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# coding: utf-8
22

33
import unittest
4-
from pandas.msgpack import packb, unpackb
4+
from pandas.io.msgpack import packb, unpackb
55

66

77
class DecodeError(Exception):

pandas/tests/msgpack/test_pack.py renamed to pandas/tests/io/msgpack/test_pack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import struct
66
from pandas import compat
77
from pandas.compat import u, OrderedDict
8-
from pandas.msgpack import packb, unpackb, Unpacker, Packer
8+
from pandas.io.msgpack import packb, unpackb, Unpacker, Packer
99

1010

1111
class TestPack(unittest.TestCase):

pandas/tests/msgpack/test_read_size.py renamed to pandas/tests/io/msgpack/test_read_size.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Test Unpacker's read_array_header and read_map_header methods"""
2-
from pandas.msgpack import packb, Unpacker, OutOfData
2+
from pandas.io.msgpack import packb, Unpacker, OutOfData
33
UnexpectedTypeException = ValueError
44

55

pandas/tests/msgpack/test_seq.py renamed to pandas/tests/io/msgpack/test_seq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# coding: utf-8
22

33
import io
4-
import pandas.msgpack as msgpack
4+
import pandas.io.msgpack as msgpack
55

66
binarydata = bytes(bytearray(range(256)))
77

pandas/tests/msgpack/test_sequnpack.py renamed to pandas/tests/io/msgpack/test_sequnpack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import unittest
44

55
from pandas import compat
6-
from pandas.msgpack import Unpacker, BufferFull
7-
from pandas.msgpack import OutOfData
6+
from pandas.io.msgpack import Unpacker, BufferFull
7+
from pandas.io.msgpack import OutOfData
88

99

1010
class TestPack(unittest.TestCase):

pandas/tests/msgpack/test_subtype.py renamed to pandas/tests/io/msgpack/test_subtype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding: utf-8
22

3-
from pandas.msgpack import packb
3+
from pandas.io.msgpack import packb
44
from collections import namedtuple
55

66

pandas/tests/msgpack/test_unpack.py renamed to pandas/tests/io/msgpack/test_unpack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from io import BytesIO
22
import sys
3-
from pandas.msgpack import Unpacker, packb, OutOfData, ExtType
3+
from pandas.io.msgpack import Unpacker, packb, OutOfData, ExtType
44
import pandas.util.testing as tm
55
import pytest
66

pandas/tests/msgpack/test_unpack_raw.py renamed to pandas/tests/io/msgpack/test_unpack_raw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Tests for cases where the user seeks to obtain packed msgpack objects"""
22

33
import io
4-
from pandas.msgpack import Unpacker, packb
4+
from pandas.io.msgpack import Unpacker, packb
55

66

77
def test_write_bytes():

setup.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -548,23 +548,23 @@ def pxd(name):
548548
else:
549549
macros = [('__LITTLE_ENDIAN__', '1')]
550550

551-
packer_ext = Extension('pandas.msgpack._packer',
551+
packer_ext = Extension('pandas.io.msgpack._packer',
552552
depends=['pandas/src/msgpack/pack.h',
553553
'pandas/src/msgpack/pack_template.h'],
554554
sources = [srcpath('_packer',
555555
suffix=suffix if suffix == '.pyx' else '.cpp',
556-
subdir='msgpack')],
556+
subdir='io/msgpack')],
557557
language='c++',
558558
include_dirs=['pandas/src/msgpack'] + common_include,
559559
define_macros=macros,
560560
extra_compile_args=extra_compile_args)
561-
unpacker_ext = Extension('pandas.msgpack._unpacker',
561+
unpacker_ext = Extension('pandas.io.msgpack._unpacker',
562562
depends=['pandas/src/msgpack/unpack.h',
563563
'pandas/src/msgpack/unpack_define.h',
564564
'pandas/src/msgpack/unpack_template.h'],
565565
sources = [srcpath('_unpacker',
566566
suffix=suffix if suffix == '.pyx' else '.cpp',
567-
subdir='msgpack')],
567+
subdir='io/msgpack')],
568568
language='c++',
569569
include_dirs=['pandas/src/msgpack'] + common_include,
570570
define_macros=macros,
@@ -630,6 +630,7 @@ def pxd(name):
630630
'pandas.io',
631631
'pandas.io.json',
632632
'pandas.io.sas',
633+
'pandas.io.msgpack',
633634
'pandas.formats',
634635
'pandas.sparse',
635636
'pandas.stats',
@@ -646,10 +647,10 @@ def pxd(name):
646647
'pandas.tests.io.json',
647648
'pandas.tests.io.parser',
648649
'pandas.tests.io.sas',
650+
'pandas.tests.io.msgpack',
649651
'pandas.tests.groupby',
650652
'pandas.tests.series',
651653
'pandas.tests.formats',
652-
'pandas.tests.msgpack',
653654
'pandas.tests.scalar',
654655
'pandas.tests.sparse',
655656
'pandas.tests.tseries',
@@ -659,7 +660,6 @@ def pxd(name):
659660
'pandas.tools',
660661
'pandas.tseries',
661662
'pandas.types',
662-
'pandas.msgpack',
663663
'pandas.util.clipboard'
664664
],
665665
package_data={'pandas.tests': ['data/*.csv'],

0 commit comments

Comments
 (0)