Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta-ticket: Review of Python 3 features that sagelib should use systematically #29756

Open
mkoeppe opened this issue May 29, 2020 · 38 comments
Open

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented May 29, 2020

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):

Python 3.7 features (https://docs.python.org/3.10/whatsnew/3.7.html)

Python 3.8 features (https://docs.python.org/3.10/whatsnew/3.8.html)

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


CC: @fchapoton @dimpase @jhpalmieri @tobiasdiez @tscrim @nthiery @slel @nbruin

Component: python3

Keywords: sd109

Issue created by migration from https://trac.sagemath.org/ticket/29756

@mkoeppe mkoeppe added this to the sage-9.2 milestone May 29, 2020
@mkoeppe

This comment has been minimized.

@egourgoulhon
Copy link
Member

comment:2

About types, has a general policy been discussed on sage-devel?

@dimpase
Copy link
Member

dimpase commented Jun 2, 2020

comment:3

typing is a standard Python 3 module, and it allows one to catch more errors.. Why would one have anything against it?

@kcrisman
Copy link
Member

kcrisman commented Jun 3, 2020

comment:4

typing is a standard Python 3 module, and it allows one to catch more errors.. Why would one have anything against it?

Are there reasons (e.g. performance) not to use it in certain circumstances?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 3, 2020

comment:5

I created this ticket as a place for discussions of these new features to make sure that we use them systematically in the Sage library, rather than in an ad-hoc way.

For example, for typing, I think there are opportunities to integrate it with the various dynamically generated classes that come in from the category system, as I noted in #29775.

@tobiasdiez
Copy link
Contributor

comment:6

There shouldn't be any performance issues with typing as it is deactivated on runtime (the only additional overhead is the import of the typing package).
See also the discussion here https://realpython.com/python-type-checking/#pros-and-cons

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@slel

This comment has been minimized.

@slel

This comment has been minimized.

@slel
Copy link
Member

slel commented Jul 13, 2020

comment:11

Regarding f-strings, see this comment:

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mwageringel
Copy link

comment:18

Replying to @egourgoulhon:

About types, has a general policy been discussed on sage-devel?

+1 for using typing. Return types in particular are useful for tab-completion on the result of function calls. For example

sage: "hello".upper().lower().upper()

this tab-completes without evaluating the code (i.e. without setting IPython's IPCompleter.greedy config option).

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Sep 5, 2020
@mkoeppe

This comment has been minimized.

@mwageringel

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 24, 2021

comment:29

Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Mar 24, 2021
@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Apr 7, 2022
@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Aug 31, 2022
@mkoeppe

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants