Skip to content

python2 support #2

Open
Open
@rrauenza

Description

@rrauenza

Would you be open to supporting python 2.7?

It looks like the only issues are the calls to super(). Python2 requires the (current classname, self) to be passed, but you can just 'from builtins import (super,)' at the top.

The other issue is dictionary keys are lists in python2 so you can't do set operations on them -- You can fix this by changing the code to:

  to_constraints = set(getattr(to_model._meta, self.option_name, {}).keys())
  from_constraints = set(getattr(from_model._meta, self.option_name, {}).keys())

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