-
-
Notifications
You must be signed in to change notification settings - Fork 641
Open
Labels
Description
For Sage 10.4, all of the following features can be used
Python 3.6 features (https://docs.python.org/3.10/whatsnew/3.6.html):
- pathlib
- static typing
- add typing annotations in permutations #32058 add typing annotations in permutations
- Developer manual: Section on typing annotations #32067 Developer manual: Section on typing annotations
- Add a bit of typing to manifold code #29775 Add a bit of typing to manifold code
- Python 3 typing/protocols/ABCs and categories #30381 Python 3 typing/protocols/ABCs
- Type hints (__annotations__) and coercion/categories/Cython #30511 Type hints (
__annotations__
) and coercion/Cython
- native namespace packages - Modify find_python_sources to support modularization of sagelib by native namespace packages (PEP 420) #28925
yield from
- use yield from in poset code #29857- f-strings (formatted strings)
- keyword-only parameters (Enforce keyword-only parameters, with deprecation #16607, sage_getargspec mishandles keyword-only arguments #31309)
- new import machinery - Make .sage modules importable #27074 (Make
.sage
modules importable) __matmul__
(infix@
operator) - Add support for __matmul__ in the coercion model #22760from ..a import b
- ...?
Python 3.7 features (https://docs.python.org/3.10/whatsnew/3.7.html)
-
importlib.resources (sage.repl: Replace use of SAGE_EXTCODE by importlib.resources #31306)
-
from
futureimport annotations
(Add more typing information to manifold package #31006)
Python 3.8 features (https://docs.python.org/3.10/whatsnew/3.8.html)
- assignment expressions
:=
(https://docs.python.org/3.10/whatsnew/3.8.html#assignment-expressions) - positional-only parameters (PEP 570)
f'{expr=}'
https://docs.python.org/3.10/whatsnew/3.8.html#f-strings-support-for-self-documenting-expressions-and-debugging- PEP 590: Vectorcall: a fast calling protocol for CPython https://docs.python.org/3.10/whatsnew/3.8.html#pep-590-vectorcall-a-fast-calling-protocol-for-cpython
functools.cached_property()
https://docs.python.org/3.10/whatsnew/3.8.html#functoolspprint(sort_dicts=False)
shutil.copytree(dirs_exist_ok=True)
https://docs.python.org/3.10/whatsnew/3.8.html#shutilas_integer_ratio
,__index__
special method (https://docs.python.org/3.10/whatsnew/3.8.html#other-language-changes)math.dist
,hypot
,prod
,perm
,comb
,isqrt
https://docs.python.org/3.10/whatsnew/3.8.html#mathtyping.TypedDict
,typing.Literal
,Final
,Protocol
https://docs.python.org/3.10/whatsnew/3.8.html#typing
Python 3.9 features (https://docs.python.org/3.10/whatsnew/3.9.html)
Features introduced in Python 3.10 or later cannot be used in Sage yet because we support system Python 3.9.x
Python 3.10 features (https://docs.python.org/3.10/whatsnew/3.10.html):
Python 3.11 features (https://docs.python.org/3.11/whatsnew/3.11.html):
Python 3.12 features (https://docs.python.org/3.12/whatsnew/3.12.html):
Python 3.13 features (https://docs.python.org/3.13/whatsnew/3.13.html):
See also
- Meta-ticket: improve compatibility with the Python library and Python packages #29728: Meta-ticket: improve compatibility with the Python library
- Adopt the “time window-based” policy for support of Python versions from NEP 29 #30384: Adopt the “time window-based” policy for support of Python versions from NEP 29
- Drop Python 3.6 support #30551 Drop Python 3.6 support
CC: @fchapoton @dimpase @jhpalmieri @tobiasdiez @tscrim @nthiery @slel @nbruin
Component: python3
Keywords: sd109
Issue created by migration from https://trac.sagemath.org/ticket/29756