Skip to content

Commit 9732af2

Browse files
jbrockmendeljreback
authored andcommitted
Separate properties module (#17590)
1 parent 8276a42 commit 9732af2

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

pandas/_libs/lib.pyx

-1
Original file line numberDiff line numberDiff line change
@@ -1907,5 +1907,4 @@ cdef class BlockPlacement:
19071907

19081908

19091909
include "reduce.pyx"
1910-
include "properties.pyx"
19111910
include "inference.pyx"

pandas/_libs/src/properties.pyx renamed to pandas/_libs/properties.pyx

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
2+
from cython cimport Py_ssize_t
3+
14
from cpython cimport (
2-
PyDict_Contains, PyDict_GetItem, PyDict_GetItem, PyDict_SetItem)
5+
PyDict_Contains, PyDict_GetItem, PyDict_SetItem)
36

47

58
cdef class cache_readonly(object):

pandas/core/generic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import numpy as np
1010
import pandas as pd
1111

12-
from pandas._libs import tslib, lib
12+
from pandas._libs import tslib, lib, properties
1313
from pandas.core.dtypes.common import (
1414
_ensure_int64,
1515
_ensure_object,
@@ -258,7 +258,7 @@ def _setup_axes(cls, axes, info_axis=None, stat_axis=None, aliases=None,
258258
if build_axes:
259259

260260
def set_axis(a, i):
261-
setattr(cls, a, lib.AxisProperty(i))
261+
setattr(cls, a, properties.AxisProperty(i))
262262
cls._internal_names_set.add(a)
263263

264264
if axes_are_reversed:

pandas/util/_decorators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from pandas.compat import callable, signature
2-
from pandas._libs.lib import cache_readonly # noqa
2+
from pandas._libs.properties import cache_readonly # noqa
33
import types
44
import warnings
55
from textwrap import dedent

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def get_tag(self):
437437
cmdclass['build_src'] = DummyBuildSrc
438438
cmdclass['build_ext'] = CheckingBuildExt
439439

440-
lib_depends = ['reduce', 'inference', 'properties']
440+
lib_depends = ['reduce', 'inference']
441441

442442

443443
def srcpath(name=None, suffix='.pyx', subdir='src'):
@@ -478,6 +478,7 @@ def pxd(name):
478478
ext_data = {
479479
'_libs.lib': {'pyxfile': '_libs/lib',
480480
'depends': lib_depends + tseries_depends},
481+
'_libs.properties': {'pyxfile': '_libs/properties', 'include': []},
481482
'_libs.hashtable': {'pyxfile': '_libs/hashtable',
482483
'pxdfiles': ['_libs/hashtable'],
483484
'depends': (['pandas/_libs/src/klib/khash_python.h']

0 commit comments

Comments
 (0)