Restrict the versions and add 3.1

~> 2.6 will match 2.7
Merge pull request #48 from richardc/patch-1

Restrict the versions and add 3.1