ericvsmith / dataclasses

Apache License 2.0
584 stars 53 forks source link

Problems with py37 #153

Open jph00 opened 4 years ago

jph00 commented 4 years ago

With the new py version restriction, pip will now as a result install dataclasses 0.6 if install is attempted on py37, since this is the last available version that satisfies this constraint. This might be a problem, since it shadows the builtin version. The reason this comes up is packaging a module the depends on dataclasses, but only python>=3.6, becomes tricky to do correctly. I believe the correct line is:

dataclasses>='0.7';python_version<'3.7'

Ideally, I think it would be nice if this dataclasses module simply returns the builtin python module if it's available (although I'm not sure how to implement that in practice!) If this isn't possible/desirable, perhaps you could add to the readme/docs something about how to install only on python<3.7 (e.g. using the above line)?

sethmlarson commented 3 years ago

Another idea would be to yank all releases before 0.7. That way pip doesn't try to resolve any of these versions unless specifically requested.