The packaging lib currently does exactly that, given a specifier like >1.7 ittransforms it to >1.7 and !=1.7.*. The PEP even calls out the fact that amaintenance release of the same series should not match and if you want it tomatch then you should add a zero yourself.