Skip to content

Commit

Permalink
add deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
papajohn committed Jan 29, 2016
1 parent 11e90c8 commit 25ce478
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions datascience/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import itertools
import numbers
import urllib.parse
import warnings

import numpy as np
import matplotlib
Expand Down Expand Up @@ -206,7 +207,7 @@ def __init__(self, labels=None, _other=None, formatter=_formats.default_formatte
self.formatter = formatter

if _other is not None:
# TODO add deprecated warning
warnings.warn("deprecated", DeprecationWarning)
columns, labels = labels, _other
columns = columns if columns is not None else []
labels = labels if labels is not None else []
Expand Down Expand Up @@ -242,7 +243,7 @@ def empty(cls, labels=None):
Returns:
A new instance of ``Table``.
"""
# TODO Add deprecated warning
warnings.warn("deprecated", DeprecationWarning)
if labels is None:
return cls()
values = [[] for label in labels]
Expand Down Expand Up @@ -396,7 +397,7 @@ def labels(self):
@property
def column_labels(self):
"""Return a tuple of column labels."""
# TODO Add deprecated warning
warnings.warn("deprecated", DeprecationWarning)
return self.labels

@property
Expand Down Expand Up @@ -1231,7 +1232,7 @@ def relabeled(self, label, new_label):
return copy

def with_relabeling(self, *args):
# TODO Add deprecated warning
warnings.warn("deprecated", DeprecationWarning)
return self.relabeled(*args)

def bin(self, **vargs):
Expand Down

0 comments on commit 25ce478

Please sign in to comment.