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

sage.structure: Remove some module-level imports #29883

Closed
mkoeppe opened this issue Jun 17, 2020 · 17 comments
Closed

sage.structure: Remove some module-level imports #29883

mkoeppe opened this issue Jun 17, 2020 · 17 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Jun 17, 2020

Depends on #29892
Depends on #29873

CC: @tscrim

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: a75ea75

Reviewer: Travis Scrimshaw

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

@mkoeppe mkoeppe added this to the sage-9.2 milestone Jun 17, 2020
@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 17, 2020

@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 17, 2020

New commits:

5fe64b1sage.structure.factorization: Make import of sage.rings.integer.Integer local to methods
eb841desage.structure.sequence: Make import of sage.misc.latex local to the latex method
e45b305sage.structure.factorization: Make import of sage.misc.misc_c.prod local to methods
d353497sage.structure.formal_sum, .parent_gens: Fixup: Remove imports

@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 17, 2020

Commit: d353497

@tscrim
Copy link
Collaborator

tscrim commented Jun 17, 2020

comment:3

These are all okay with me. I am very slightly worried about the Factorization.__pow__, but I doubt anyone is calling that in a sufficiently tight loop for the import to affect that, unless you are calling x^0 or x^1 a lot with x being a factorization. So it is probably fine.

Green patchbot => positive review.

@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 18, 2020

Dependencies: #29892

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2020

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

a5453bfFixup: Add src/sage/misc/call.py
64c5701lazy_import from sage.misc.call with deprecation
65414f7Fix imports and one deprecation warning
b9314d4sage.misc.call: Add standard header information, add to reference manual
6024ffdsrc/sage/misc/call.py: register_unpickle_override for call_method
ab4e0fdMove sage.misc.misc.coeff_repr, repr_lincomb to new module sage.misc.repr
07e0baasage.structure.parent_gens: Remove imports
646042bsage.structure.sequence: Make import of sage.misc.latex local to the latex method
6517828sage.structure.factorization: Make import of sage.rings.integer.Integer local to methods
54fabfcsage.structure.factorization: Make import of sage.misc.misc_c.prod local to methods

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2020

Changed commit from d353497 to 54fabfc

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2020

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

3f5b6eaMove sage.misc.misc.coeff_repr, repr_lincomb to new module sage.misc.repr
97199ddsage.structure.parent_gens: Remove imports
bb4c6a8sage.structure.sequence: Make import of sage.misc.latex local to the latex method
0820283sage.structure.factorization: Make import of sage.rings.integer.Integer local to methods
7991b64sage.structure.factorization: Make import of sage.misc.misc_c.prod local to methods

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2020

Changed commit from 54fabfc to 7991b64

@mkoeppe
Copy link
Member Author

mkoeppe commented Jul 2, 2020

Changed dependencies from #29892 to #29892, #29873

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 2, 2020

Changed commit from 7991b64 to a75ea75

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 2, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

08fedfasrc/sage/combinat/root_system/type_dual.py: Remove unused variable to fix pyflakes warning
05efc11sage.misc.repr.coeff_repr: Add doctest, adapted from sage.misc.latex.coeff_repr
538323bsrc/sage/misc/call.py: Fix block syntax in docstring
b5f63a5src/sage/misc/call.py: Returns should be Return
2c77d17Merge branch 't/29892/move_sage_misc_misc_coeff_repr__repr_lincomb_to_new_module_sage_misc_repr' into t/29883/sage_structure__remove_some_module_level_imports
f3afd30sage.categories.crystals: Make import of sage.misc.latex local to a method
6433a56sage.categories: Make imports from sage.rings, .sets, .combinat, .plot, .matrix local to methods
5c20de7Merge branch 't/16351/move_searchforest_code_to_sage_sets_recursively_enumerated_set_pyx' into t/29873/sage_categories_remove_module_level_imports
27f2dabsrc/sage/misc/call.py: Add coding directive
a75ea75Merge branch 't/29873/sage_categories_remove_module_level_imports' into t/29883/sage_structure__remove_some_module_level_imports

@mkoeppe
Copy link
Member Author

mkoeppe commented Jul 2, 2020

comment:11

Merged in some tickets to take care of (unrelated) patchbot warnings

@tscrim
Copy link
Collaborator

tscrim commented Jul 2, 2020

comment:12

Green patchbot => positive review.

@tscrim
Copy link
Collaborator

tscrim commented Jul 2, 2020

Reviewer: Travis Scrimshaw

@mkoeppe
Copy link
Member Author

mkoeppe commented Jul 3, 2020

comment:13

this pyflakes warning looks like an actual bug to me (not from changes on this ticket)

src/sage/categories/finite_dimensional_algebras_with_basis.py:1449:29 undefined name 'x'

... that should be fixed on another ticket.

@vbraun
Copy link
Member

vbraun commented Jul 8, 2020

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