Skip to content

CLN: remove relative imports #3827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions pandas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@
__docformat__ = 'restructuredtext'

try:
from . import hashtable, tslib, lib
except Exception: # pragma: no cover
import sys
e = sys.exc_info()[1] # Py25 and Py3 current exception syntax conflict
print e
if 'No module named lib' in str(e):
raise ImportError('C extensions not built: if you installed already '
'verify that you are not importing from the source '
'directory')
else:
raise
from pandas import hashtable, tslib, lib
except ImportError as e: # pragma: no cover
module = str(e).lstrip('cannot import name ') # hack but overkill to use re
raise ImportError("C extensions: {0} not built".format(module))

from datetime import datetime
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion pandas/algos.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ cdef extern from "src/headers/math.h":
double fabs(double)
int signbit(double)

from . import lib
from pandas import lib

include "skiplist.pyx"

Expand Down
8 changes: 3 additions & 5 deletions pandas/index.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import numpy as np

cimport tslib
from hashtable cimport *
from . import algos, tslib, hashtable as _hash
from .tslib import Timestamp
from pandas import algos, tslib, hashtable as _hash
from pandas.tslib import Timestamp

from datetime cimport (get_datetime64_value, _pydatetime_to_dts,
pandas_datetimestruct)
Expand All @@ -34,16 +34,14 @@ try:
import pytz
UTC = pytz.utc
have_pytz = True
except:
except ImportError:
have_pytz = False

PyDateTime_IMPORT

cdef extern from "Python.h":
int PySlice_Check(object)

# int PyList_Check(object)
# int PyTuple_Check(object)

cdef inline is_definitely_invalid_key(object val):
if PyTuple_Check(val):
Expand Down