Skip to content

Commit 42b5416

Browse files
committed
various Period related name changes, release note
1 parent bfa8066 commit 42b5416

File tree

10 files changed

+23
-22
lines changed

10 files changed

+23
-22
lines changed

doc/source/whatsnew/v0.16.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ Performance
208208
- Performance and memory usage improvements in ``merge`` when key space exceeds ``int64`` bounds (:issue:`9151`)
209209
- Performance improvements in multi-key ``groupby`` (:issue:`9429`)
210210
- Performance improvements in ``MultiIndex.sortlevel`` (:issue:`9445`)
211+
- Cythonized ``Period`` (:issue:`9440`)
211212

212213
Bug Fixes
213214
~~~~~~~~~

pandas/period.pyx renamed to pandas/src/period.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ cdef bint PY2 = version_info[0] == 2
3636
cdef int64_t NPY_NAT = util.get_nat()
3737

3838

39-
cdef extern from "period.h":
39+
cdef extern from "period_helper.h":
4040
ctypedef struct date_info:
4141
int64_t absdate
4242
double abstime

pandas/src/period.c renamed to pandas/src/period_helper.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "period.h"
1+
#include "period_helper.h"
22

33

44
/*
File renamed without changes.

pandas/tests/test_tseries.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pandas.util.testing as tm
88
from pandas.compat import range, lrange, zip
99
import pandas.lib as lib
10-
import pandas.period as period
10+
import pandas._period as period
1111
import pandas.algos as algos
1212

1313

pandas/tseries/frequencies.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import pandas.core.common as com
1313
import pandas.lib as lib
1414
import pandas.tslib as tslib
15-
import pandas.period as period
15+
import pandas._period as period
1616
from pandas.tslib import Timedelta
1717

1818
class FreqGroup(object):

pandas/tseries/index.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from pandas.lib import Timestamp
2929
import pandas.lib as lib
3030
import pandas.tslib as tslib
31-
import pandas.period as period
31+
import pandas._period as period
3232
import pandas.algos as _algos
3333
import pandas.index as _index
3434

pandas/tseries/period.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
from pandas.tseries.tools import parse_time_string
1313
import pandas.tseries.offsets as offsets
1414

15-
from pandas.period import Period
16-
import pandas.period as period
17-
from pandas.period import (
15+
from pandas._period import Period
16+
import pandas._period as period
17+
from pandas._period import (
1818
get_period_field_arr,
1919
_validate_end_alias,
2020
_quarter_to_myear,

pandas/tseries/tests/test_tslib.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
import numpy as np
44

55
from pandas import tslib
6-
from pandas import period
6+
import pandas._period as period
77
import datetime
88

99
from pandas.core.api import Timestamp, Series, Timedelta
1010
from pandas.tslib import get_timezone
11-
from pandas.period import period_asfreq, period_ordinal
11+
from pandas._period import period_asfreq, period_ordinal
1212
from pandas.tseries.index import date_range
1313
from pandas.tseries.frequencies import get_freq
1414
import pandas.tseries.offsets as offsets

setup.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ def pxd(name):
445445

446446
tseries_depends = ['pandas/src/datetime/np_datetime.h',
447447
'pandas/src/datetime/np_datetime_strings.h',
448-
'pandas/src/period.h']
448+
'pandas/src/period_helper.h']
449449

450450

451451
# some linux distros require it
@@ -461,24 +461,24 @@ def pxd(name):
461461
'depends': tseries_depends,
462462
'sources': ['pandas/src/datetime/np_datetime.c',
463463
'pandas/src/datetime/np_datetime_strings.c',
464-
'pandas/src/period.c']},
465-
period=dict(pyxfile='period',
466-
depends=tseries_depends,
467-
sources=['pandas/src/datetime/np_datetime.c',
464+
'pandas/src/period_helper.c']},
465+
_period={'pyxfile': 'src/period',
466+
'depends': tseries_depends,
467+
'sources': ['pandas/src/datetime/np_datetime.c',
468468
'pandas/src/datetime/np_datetime_strings.c',
469-
'pandas/src/period.c']),
469+
'pandas/src/period_helper.c']},
470470
index={'pyxfile': 'index',
471471
'sources': ['pandas/src/datetime/np_datetime.c',
472472
'pandas/src/datetime/np_datetime_strings.c']},
473473
algos={'pyxfile': 'algos',
474474
'depends': [srcpath('generated', suffix='.pyx'),
475475
srcpath('join', suffix='.pyx')]},
476-
parser=dict(pyxfile='parser',
477-
depends=['pandas/src/parser/tokenizer.h',
478-
'pandas/src/parser/io.h',
479-
'pandas/src/numpy_helper.h'],
480-
sources=['pandas/src/parser/tokenizer.c',
481-
'pandas/src/parser/io.c'])
476+
parser={'pyxfile': 'parser',
477+
'depends': ['pandas/src/parser/tokenizer.h',
478+
'pandas/src/parser/io.h',
479+
'pandas/src/numpy_helper.h'],
480+
'sources': ['pandas/src/parser/tokenizer.c',
481+
'pandas/src/parser/io.c']}
482482
)
483483

484484
extensions = []

0 commit comments

Comments
 (0)