Page MenuHomePhabricator

[LNT] Declare support for Python 3.6+
ClosedPublic

Authored by thopre on Dec 5 2019, 12:07 PM.

Details

Summary

With all tests passing on Python 3.6, this commit declare support for
Python 3.6+. We can lower the requirement later if necessary.

Event Timeline

thopre created this revision.Dec 5 2019, 12:07 PM
PrzemekWirkus added inline comments.Dec 5 2019, 3:43 PM
setup.py
12
if sys.version_info[:2] < (3, 6) and sys.version_info[:2] != (2, 7):
                   ^^^^
131

I've learnt a new thing today :)

thopre marked 3 inline comments as done.Dec 5 2019, 3:51 PM
thopre added inline comments.
setup.py
12

The {:2] is not necessary here due to how comparison works on tuples (from https://docs.python.org/3/reference/expressions.html#value-comparisons):

Lexicographical comparison between built-in collections works as follows:

For two collections to compare equal, they must be of the same type, have the same length, and each pair of corresponding elements must compare equal (for example, [1,2] == (1,2) is false because the type is not the same).

Collections that support order comparison are ordered the same as their first unequal elements (for example, [1,2,x] <= [1,2,y] has the same value as x <= y). If a corresponding element does not exist, the shorter collection is ordered first (for example, [1,2] < [1,2,3] is true).

So any (3, 6, *) will be greater than (3, 6) and any (3, 5, *) will be smaller than (3, 6)

131

Are you aware of a more succint way?

PrzemekWirkus accepted this revision.Dec 7 2019, 3:04 PM
PrzemekWirkus added inline comments.
setup.py
131

No, this is the fist time I can this used this way.
That's why I wrote that I've learnt a new thing (this was no sarcasm, or anything, just new thing for me).

This revision is now accepted and ready to land.Dec 7 2019, 3:04 PM
thopre closed this revision.Dec 12 2019, 6:04 AM
thopre marked an inline comment as done.Dec 12 2019, 6:04 AM

Committed as e3f5ef6decd5a6eaa96b0286aa8798e951b0c640

thopre marked 2 inline comments as done.Dec 12 2019, 6:04 AM