-
Notifications
You must be signed in to change notification settings - Fork 10
Minimum Python Version
The minimum Python version required for Marrow projects, including WebCore, has been bumped to Python 3.6, released December 23, 2016.
Reason as to why everything's been bumped up to 3.6: we have begun utilizing some of the features introduced in that version and prior Python 3 versions extensively, such as literal string interpolation / format strings. The benefits / things to keep in mind for 3.6 include:
-
PEP 468, preserving keyword argument order.
-
PEP 487, simpler customization of class creation. The availability of
__init_subclass__obsoletes marrow.schema's implementation of the same base functionality in the__attributed__@classmethodcallback. -
PEP 498, literal string interpolation. "Format strings" or "f-strings". Praise be to baby {romulus} and {remus}, yes.
-
PEP 506, adding a secrets module to the standard library. Please stop using the "random" module for anything important.
-
PEP 520, preserving class attribute (and dictionary!) definition order. Obsoletes marrow.schema's
__sequence__implementation of that functionality, and the need for ordered mappings (e.g.Attributes) to be pre-calculated. -
PEP 526, syntax for variable annotations (provisional).
-
PEP 528 (console encoding) and PEP 529 (filesystem encoding) defaulting to
utf-8welcomes Microsoft Windows into the wider internet ecosystem on encoding standardization. -
PEP 525 asynchronous generators and PEP 530 asynchronous comprehensions.
From older versions; 3.5:
-
PEP 484 type hints and the introduction of the
typingmodule. -
PEP 448 additional unpacking generalizations. (Multiple argument unpacks in one invocation.)
-
.hex()methods onbytes,bytearray, andmemoryviewinstances. -
collections.OrderedDictis now C-backed, 4x-100x faster. -
tracebackmodule enhancements.
From older versions; 3.4:
From older versions; 3.3:
-
Core
ipaddresstype. -
venvintroduced.
From older versions; 3.2: