-
-
Notifications
You must be signed in to change notification settings - Fork 565
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
Remove all the "is_[A-Z].*" from global namespace #14329
Comments
comment:1
Do you mean |
comment:2
Arrgghhh! regexp!! There, the current modification should suffice. On a serious note, what I do mean is all the "is_Vector", "is_Polynomial", "is_Matrix", and what not. The patch will be trivial but tiresome. I don't know any means of listing and testing whether they give a deprecation warning automatically. So, it has to be a slow, manual, and visual process. |
This comment has been minimized.
This comment has been minimized.
is_[A-Z]*
from global namespace
comment:3
import re
from subprocess import check_output, STDOUT, CalledProcessError
for x in globals().keys():
if re.match("is_[A-Z]", x) is not None:
try:
output = check_output(['sage', '-c', x + '(None)'], stderr=STDOUT)
except CalledProcessError as e:
output = e.output
if re.match(".*DeprecationWarning", output) is not None:
print x is a hack but should work. |
comment:4
(cc me) |
comment:5
This is a duplicate of #12824. |
comment:6
I was definitely not advocating removing the functions themselves. They can still be used internally. Is it desired that the functions themselves are removed? |
comment:7
Since they've already been deprecated (from the global namespace in #10107), the trivial ones can be removed since we don't really want to use them IMO (a extra unnecessary python function call). Perhaps we could just use this ticket to explicitly remove these functions only from the global namespace (as a step towards #12824)? |
comment:8
Yes. That was my intention. :-) |
comment:9
Ah okay, then this patch would just be a matter of finding which |
comment:11
As a first step I propose #15076 |
This comment has been minimized.
This comment has been minimized.
comment:13
step 1) should be ok and is wating for review at #15076 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:24
There are still dozens of |
This comment has been minimized.
This comment has been minimized.
comment:25
Replying to @pjbruin:
Looks like you are completely right! I don't remember why I thought we were done. Btw many of the imports that were supposed to be removed as part of steps 1)-3) are still there (or were added back?). |
Changed author from Marc Mezzarobba to none |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
comment:28
Work in progress, only partially tested, expect forced pushes! |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
Author: Marc Mezzarobba |
This comment has been minimized.
This comment has been minimized.
comment:30
This time there are no Note that I did not remove |
Reviewer: Peter Bruin |
comment:31
I would be in favour of removing |
Changed branch from u/mmezzarobba/14329-remove_is_foo to |
Remove all the
is_[A-Z].*
from global namespace. They have been deprecated for over two years.step 1) remove the imports of is_* from rings/all.py (#15076)
step 2) remove the imports of is_* from matrix/all.py (#15098)
step 3) idem for modules/all.py and structure/all.py (#15333)
step 4) remove otherwise unused (i.e., not re-imported) imports of is_[A-Z]* (this ticket)
step 5) remove the remaining imports of is_[A-Z]* (this ticket)
Depends on #15076
Depends on #15098
Depends on #15333
Component: performance
Author: Marc Mezzarobba
Branch/Commit:
b948874
Reviewer: Peter Bruin
Issue created by migration from https://trac.sagemath.org/ticket/14329
The text was updated successfully, but these errors were encountered: