Python 3 uses “Banker’s Rounding” which is defined like this: “Exact halfway cases are now rounded to the nearest even result instead of away from zero” - per What’s new in Python 3 .
In the case of 1.5, Python rounds to two because that is the nearest even result. If you apply that logic to 2.5, the nearest even value is also two!