Opened 2 years ago

Closed 23 months ago

#29883 closed enhancement (fixed)

sage.structure: Remove some module-level imports

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.2
Component: refactoring Keywords:
Cc: tscrim Merged in:
Authors: Matthias Koeppe Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: a75ea75 (Commits, GitHub, GitLab) Commit: a75ea758dd0e188461323ddf368ffa75bf932572
Dependencies: #29892, #29873 Stopgaps:

Status badges

Description


Change History (15)

comment:1 Changed 2 years ago by mkoeppe

  • Branch set to u/mkoeppe/sage_structure__remove_some_module_level_imports

comment:2 Changed 2 years ago by mkoeppe

  • Commit set to d35349733f621d88bd2fe46c83513dd18aa04c96
  • Status changed from new to needs_review

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

comment:3 Changed 2 years ago by tscrim

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.

comment:4 Changed 2 years ago by mkoeppe

  • Status changed from needs_review to needs_work

comment:5 Changed 2 years ago by mkoeppe

  • Dependencies set to #29892

comment:6 Changed 2 years ago by git

  • Commit changed from d35349733f621d88bd2fe46c83513dd18aa04c96 to 54fabfc364d0f64e1ca782429c1d471509da88a3

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

comment:7 Changed 2 years ago by mkoeppe

  • Status changed from needs_work to needs_review

comment:8 Changed 2 years ago by git

  • Commit changed from 54fabfc364d0f64e1ca782429c1d471509da88a3 to 7991b64e470950f9fba15394e73cb54b2c9b8566

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

comment:9 Changed 23 months ago by mkoeppe

  • Dependencies changed from #29892 to #29892, #29873

comment:10 Changed 23 months ago by git

  • Commit changed from 7991b64e470950f9fba15394e73cb54b2c9b8566 to a75ea758dd0e188461323ddf368ffa75bf932572

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

comment:11 Changed 23 months ago by mkoeppe

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

comment:12 Changed 23 months ago by tscrim

  • Reviewers set to Travis Scrimshaw

Green patchbot => positive review.

comment:13 Changed 23 months ago by mkoeppe

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.

comment:14 Changed 23 months ago by mkoeppe

  • Status changed from needs_review to positive_review

comment:15 Changed 23 months ago by vbraun

  • Branch changed from u/mkoeppe/sage_structure__remove_some_module_level_imports to a75ea758dd0e188461323ddf368ffa75bf932572
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.