-
Notifications
You must be signed in to change notification settings - Fork 184
Description
Python 3.5 is now 5 years old, it is no longer being developed. There are no plans to make new releases past 3.5.9 that came out last month.
Some prominent Python libraries are starting to drop support for Python 3.5 (Django 3 for example).
Version of python3 on current stable Ubuntu is 3.6.9.
There are a number of annoying differences between Python 3.5 and newer Python3.6. Mostly to do with pathlib.Path
, those often come up in unit tests.
There are some places in the code that are special cased for python 3.5 (to do with unicode handling). For example here:
datacube-core/datacube/utils/documents.py
Lines 75 to 80 in dc162e3
def load_from_json(handle): | |
if PY35: | |
data = handle.read().decode('utf8') | |
yield json.loads(data) | |
else: | |
yield json.load(handle) |
Switching to 3.6+ only would also allow use of "f-Strings":
print(f"Value {x} is no good") # 3.6+
print("Value {} is no good".format(x)) # 3.5
Other important features that are only available in newer version of Python include
- Underscores in numeric constants
1_000_000
vs1000000
, code readability - Syntax for variable type annotations, becoming more important as we are adding
mypy
annotations to functions and methods - Some async improvements that we do not have current use for