A list of file with deprecation

58 views
Skip to first unread message

David Ayotte

unread,
Sep 13, 2022, 9:58:09 AM9/13/22
to sage-devel
Hello,

In order to lighten up the atmosphere from github migration and "+1/2", I wrote a small script that search through $SAGE_SRC and looks if one of the following three functions is called:
  1. deprecated_function_alias
  2. deprecation
  3. deprecation_cython
(See this for more info on these functions).

I then listed the trac ticket in ascending order and the file where one of the three functions above gets called. See the attached file for the result.

I don't claim to catch ALL possible tickets as my script don't format exceptions like "deprecation(ticket_number, "...")" (i.e. a variable "ticket_number" was used instead of a 5-digits number).

I hope this list could be useful for some of you, since according to the developer's guide:

> Deprecated code can only be removed one year after the first stable release in which it appeared.

I have a question: given a trac ticket number, is there a way of recover the "Merge In" field of the ticket with the command line? I'd like to automatically add this info to the list.

I also think that this list could be helpful in a potential move to github.

Any comments or ideas on how to improve this list is more than welcome!

Best,

David A.
trac_tickets_ascending.txt

Vincent Delecroix

unread,
Sep 13, 2022, 12:15:32 PM9/13/22
to sage-...@googlegroups.com
> I have a question: given a trac ticket number, is there a way of recover the "Merge In" field of the ticket with the command line? I'd like to automatically add this info to the list.

For that purpose, the git trac command line tool is very helpful
```
$ git trac find 1aeab526b544f3559028767fb8e79e3a4690b476
Commit has been merged in Updated SageMath version to 8.6.beta0.
commit 68e69a31793d44e5a537ee23ff36fbb304fd3cb1
Merge: b17d624e3e 714417176c
Author: Release Manager <rel...@sagemath.org>
Date: Sun Dec 23 00:56:30 2018 +0100

Trac #26846: py3: fix sparse graph isomorphism

URL: https://trac.sagemath.org/26846
Reported by: chapoton
Ticket author(s): Frédéric Chapoton
Reviewer(s): David Coudert
```

Best
Vincent

Marc Mezzarobba

unread,
Sep 13, 2022, 12:18:21 PM9/13/22
to sage-...@googlegroups.com
David Ayotte wrote:
> I have a question: given a trac ticket number, is there a way of
> recover the "Merge In" field of the ticket with the command line? I'd
> like to automatically add this info to the list.

In case they differ, do you want the contents of this field as it
appears on trac, or the first sage version that includes the ticket?
If the latter, something like

git describe --contains $(git log --author=rel...@sagemath.org --grep="^Trac #33607" --pretty='%H') --exclude='*beta*' --exclude='*rc*' --candidates=0

should do the job.

--
Marc

David Ayotte

unread,
Sep 13, 2022, 1:03:19 PM9/13/22
to sage-devel
Thanks to you both Vincent and Marc. 

@Marc: Yes I mainly only want the first Sage version that includes the ticket, in order to be able to evaluate how long the depreciation have been in effect. The command you wrote returns an error:

~/sage$ git describe --contains $(git log --author=rel...@sagemath.org --grep="^Trac #25848" --pretty='%H') --exclude='*beta*' --exclude='*rc*' --candidates=0
fatal: cannot describe '4c9486b75fb02b14a21278bb69e44998c5045ccd'

However, I might be able to recover the info using the git trac command as suggested by Vincent.

Best,

David A.

Marc Mezzarobba

unread,
Sep 13, 2022, 1:16:51 PM9/13/22
to sage-...@googlegroups.com
David Ayotte wrote:
> ~/sage$ git describe --contains $(git log --author=rel...@sagemath.org
^^^^^^
Could it be that whatever you are using to read sage-devel censors email
addresses and that you copy-pasted the censored version of release at
sagemath.org?

> --grep="^Trac #25848" --pretty='%H') --exclude='*beta*'
> --exclude='*rc*' --candidates=0
> fatal: cannot describe '4c9486b75fb02b14a21278bb69e44998c5045ccd'

--
Marc Mezzarobba

David Ayotte

unread,
Sep 13, 2022, 2:57:15 PM9/13/22
to sage-devel
Oups, yes exactly! 🙃

Best.

David A.

Reply all
Reply to author
Forward
0 new messages