Skip to content

usage of basestring in add_unique_check leads to a NameError Exception in py3 #11

Description

@ramanduh
 def add_unique_check(self, key,
                        code=UNIQUE_CHECK_FAILED,
                        message=MESSAGES[UNIQUE_CHECK_FAILED]):
        """
            Add a unique check on a single column or combination of columns.
    
            Arguments
            ---------
    
            `key` - a single field name (string) specifying a field in which all
            values are expected to be unique, or a sequence of field names (tuple
            or list of strings) specifying a compound key
    
            `code` - problem code to report if a record is not valid, defaults to
            `UNIQUE_CHECK_FAILED`
    
            `message` - problem message to report if a record is not valid
    
            """
    
>       if isinstance(key, basestring):
E       NameError: name 'basestring' is not defined

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions