Skip to content

Commit

Permalink
Separate properties module (#17590)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel authored and jreback committed Sep 22, 2017
1 parent 8276a42 commit 9732af2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 0 additions & 1 deletion pandas/_libs/lib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1907,5 +1907,4 @@ cdef class BlockPlacement:


include "reduce.pyx"
include "properties.pyx"
include "inference.pyx"
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

from cython cimport Py_ssize_t

from cpython cimport (
PyDict_Contains, PyDict_GetItem, PyDict_GetItem, PyDict_SetItem)
PyDict_Contains, PyDict_GetItem, PyDict_SetItem)


cdef class cache_readonly(object):
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import numpy as np
import pandas as pd

from pandas._libs import tslib, lib
from pandas._libs import tslib, lib, properties
from pandas.core.dtypes.common import (
_ensure_int64,
_ensure_object,
Expand Down Expand Up @@ -258,7 +258,7 @@ def _setup_axes(cls, axes, info_axis=None, stat_axis=None, aliases=None,
if build_axes:

def set_axis(a, i):
setattr(cls, a, lib.AxisProperty(i))
setattr(cls, a, properties.AxisProperty(i))
cls._internal_names_set.add(a)

if axes_are_reversed:
Expand Down
2 changes: 1 addition & 1 deletion pandas/util/_decorators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pandas.compat import callable, signature
from pandas._libs.lib import cache_readonly # noqa
from pandas._libs.properties import cache_readonly # noqa
import types
import warnings
from textwrap import dedent
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def get_tag(self):
cmdclass['build_src'] = DummyBuildSrc
cmdclass['build_ext'] = CheckingBuildExt

lib_depends = ['reduce', 'inference', 'properties']
lib_depends = ['reduce', 'inference']


def srcpath(name=None, suffix='.pyx', subdir='src'):
Expand Down Expand Up @@ -478,6 +478,7 @@ def pxd(name):
ext_data = {
'_libs.lib': {'pyxfile': '_libs/lib',
'depends': lib_depends + tseries_depends},
'_libs.properties': {'pyxfile': '_libs/properties', 'include': []},
'_libs.hashtable': {'pyxfile': '_libs/hashtable',
'pxdfiles': ['_libs/hashtable'],
'depends': (['pandas/_libs/src/klib/khash_python.h']
Expand Down

0 comments on commit 9732af2

Please sign in to comment.