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

Deprecate imports in sage.tests.all: no need to important into global namespace #27337

Closed
jhpalmieri opened this issue Feb 21, 2019 · 12 comments
Closed

Comments

@jhpalmieri
Copy link
Member

The file sage/tests/all.py is imported into the global namespace, and it contains

from sage.modular.modsym.tests import Test as modsym
from sage.tests.arxiv_0812_2725 import *

There is no need for these imports, so deprecate them now so we can remove them later.

Component: misc

Author: John Palmieri

Branch/Commit: 965fe8f

Reviewer: Travis Scrimshaw

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

@jhpalmieri jhpalmieri added this to the sage-8.7 milestone Feb 21, 2019
@jhpalmieri
Copy link
Member Author

Branch: u/jhpalmieri/tests.all

@jhpalmieri
Copy link
Member Author

Commit: 8461f13

@jhpalmieri
Copy link
Member Author

New commits:

8461f13trac 27337: remove sage/tests/all.py

@tscrim
Copy link
Collaborator

tscrim commented Feb 22, 2019

Reviewer: Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Feb 22, 2019

comment:3

I am very tempted to outright remove them, but there is that part of me that says we should deprecate no matter what (when it is not a bug). I leave the final decision on that up to you, but I think it is fine to not deprecate as this does not seem to have a meaningful use being imported (perhaps I am wrong).

@jhpalmieri
Copy link
Member Author

comment:4

I can't quite imagine a serious use, but I guess our policy is that they should be deprecated. How do you deprecate an import? Convert to lazy_import? I'm not having much luck with that, but maybe I'll try again tomorrow.

@tscrim
Copy link
Collaborator

tscrim commented Feb 22, 2019

comment:5

Yes, and there is a deprecation parameter you can pass. For example in combinat/words/shuffle_product.py:

lazy_import('sage.combinat.shuffle', 'ShuffleProduct_overlapping', deprecation=15597)

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 22, 2019

Changed commit from 8461f13 to 965fe8f

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 22, 2019

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

965fe8ftrac 27337: deprecate imports in sage.tests.all

@jhpalmieri

This comment has been minimized.

@jhpalmieri jhpalmieri changed the title Remove sage.tests.all: no need to important into global namespace Deprecate imports in sage.tests.all: no need to important into global namespace Feb 22, 2019
@tscrim
Copy link
Collaborator

tscrim commented Feb 22, 2019

comment:8

Thank you.

@vbraun
Copy link
Member

vbraun commented Feb 25, 2019

Changed branch from u/jhpalmieri/tests.all to 965fe8f

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

3 participants