Skip to content
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
8 changes: 1 addition & 7 deletions tableauserverclient/models/property_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
from functools import wraps
from ..datetime_helpers import parse_datetime

try:
basestring
except NameError:
# In case we are in python 3 the string check is different
basestring = str


def property_is_enum(enum_type):
def property_type_decorator(func):
Expand Down Expand Up @@ -134,7 +128,7 @@ def property_is_datetime(func):
def wrapper(self, value):
if isinstance(value, datetime.datetime):
return func(self, value)
if not isinstance(value, basestring):
if not isinstance(value, str):
raise ValueError(
"Cannot convert {} into a datetime, cannot update {}".format(value.__class__.__name__, func.__name__)
)
Expand Down
8 changes: 1 addition & 7 deletions tableauserverclient/server/endpoint/jobs_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@

import logging

try:
basestring
except NameError:
# In case we are in python 3 the string check is different
basestring = str

logger = logging.getLogger("tableau.endpoint.jobs")

class Jobs(Endpoint):
Expand All @@ -22,7 +16,7 @@ def baseurl(self):
@api(version="2.6")
def get(self, job_id=None, req_options=None):
# Backwards Compatibility fix until we rev the major version
if job_id is not None and isinstance(job_id, basestring):
if job_id is not None and isinstance(job_id, str):
import warnings

warnings.warn("Jobs.get(job_id) is deprecated, update code to use Jobs.get_by_id(job_id)")
Expand Down