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.{rings,modules,geometry}: Replace imports from sage.*.all for namespace packages #34947

Closed
mkoeppe opened this issue Jan 29, 2023 · 15 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Jan 29, 2023

Using ./sage -fiximports from #34945.

Also remove trailing whitespace in the affected files.

Part of Meta-ticket #34201

CC: @alexchandler100 @tscrim @videlec

Component: refactoring

Author: Alex Chandler

Branch/Commit: u/mkoeppe/sage__rings_modules_geometry___replace_imports_from_sage___all_for_namespace_packages @ 9a212f4

Reviewer: Travis Scrimshaw, Matthias Koeppe

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

@mkoeppe mkoeppe added this to the sage-9.8 milestone Jan 29, 2023
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 29, 2023

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 29, 2023

New commits:

f1b7dc1sage -fiximports src/sage/{rings,modules,geometry}

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 29, 2023

Commit: f1b7dc1

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 29, 2023

Reviewer: tscrim, vdelecroix

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 29, 2023

Changed reviewer from tscrim, vdelecroix to none

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 29, 2023

comment:5

Lint and Build&Test failures are unrelated.

@mkoeppe mkoeppe modified the milestones: sage-9.8, sage-9.9 Jan 29, 2023
@tscrim
Copy link
Collaborator

tscrim commented Jan 30, 2023

comment:7

One essentially trivial thing:

-from sage.arith.misc import factor
-from sage.arith.misc import primitive_root
-from sage.arith.misc import CRT_basis
+from sage.arith.misc import factor, primitive_root, CRT_basis

(I am not a fan of the from sage.rings.integer_ring import Z as ZZ whereas ZZ is included there, but that is even more trivial than the above.)
Modulo that LGTM.

@tscrim
Copy link
Collaborator

tscrim commented Jan 30, 2023

Reviewer: Travis Scrimshaw

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 30, 2023

Changed commit from f1b7dc1 to 9a212f4

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 30, 2023

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

6cceac9src/sage/rings/polynomial: Consolidate some imports from the same module
9a212f4git grep -l -E ' (Q as QQ|Z as ZZ)' | xargs sed -i.bak 's/ Q as QQ/ QQ/;s/ Z as ZZ/ ZZ/;'

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 30, 2023

Changed reviewer from Travis Scrimshaw to Travis Scrimshaw, Matthias Koeppe

@tscrim
Copy link
Collaborator

tscrim commented Jan 30, 2023

comment:10

Thanks.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 30, 2023

comment:11

Thanks, Travis!

mkoeppe added a commit to mkoeppe/sage that referenced this issue Feb 12, 2023
vbraun pushed a commit that referenced this issue Feb 12, 2023
….*.all for namespace packages

Using `./sage -fiximports` from #34945.

Also remove trailing whitespace in the affected files.

Part of Meta-ticket #32414

URL: https://trac.sagemath.org/34947
Reported by: mkoeppe
Ticket author(s): Alex Chandler
Reviewer(s): Travis Scrimshaw, Matthias Koeppe
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 13, 2023

Merged in 10.0.beta0

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

2 participants