-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Meta-ticket: Replace imports from sage.*.all for namespace packages #34201
Milestone
Comments
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.
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.
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
Commit: |
Author: Matthias Koeppe |
This comment has been minimized.
This comment has been minimized.
vbraun
pushed a commit
that referenced
this issue
Feb 12, 2023
The new command `sage --fiximports` replaces imports from `sage.PAC.KAGE.all` by more specific imports when `sage.PAC.KAGE` is an implicit namespace package. Part of Meta-ticket #34201 URL: https://trac.sagemath.org/34945 Reported by: mkoeppe Ticket author(s): Alex Chandler, Matthias Koeppe Reviewer(s): Matthias Koeppe, Alex Chandler
Removed branch from ticket description; replaced by PR #35110 |
vbraun
pushed a commit
that referenced
this issue
Jul 1, 2023
…attern <!-- Please provide a concise, informative and self-explanatory title. --> <!-- Don't put issue numbers in the title. Put it in the Description below. --> <!-- For example, instead of "Fixes #12345", use "Add a new method to multiply two integers" --> ### 📚 Description Per #35095, parts of `sage.geometry` will be shipped in sagemath- modules, sagemath-polyhedra, and sagemath-symbolics. Hence we replace imports from `sage.geometry...all`. <!-- Describe your changes here in detail. --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> - Continuation of #34201 - Cherry-picked from #35095 - Part of #29705 <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x ]`. --> - [x] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #35798 Reported by: Matthias Köppe Reviewer(s): David Coudert
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is work toward modularization, see https://doc.sagemath.org/html/en/developer/packaging_sage_library.html#module-level-runtime-dependencies and #29705.
Tickets:
The branch here on the ticket merges the above tickets and makes violations an error again.
Tools:
Find them with
./sage -tox -e relint
- but the list of .all modules that it complains about differs from what actually became a namespace package in Remove __init__.py files for subpackages designated to be namespace packages #33011; this is updated in Remove imports from sage.all and sage.rings.all in sage.rings #34189. (See also tox -e relint: Do not complain about imports from sage.categories.all #33202)import_statements: Accept more flexible input #34426
Refactoring tool to fix modularization anti-patterns #34945
Other tools (not used):
https://github.com/asottile/reorder_python_imports with option
--replace-import
... but it rewrites all imports in a peculiar style (one import line for each imported name)https://pypi.org/project/import-linter/ - this could replace our use of relint for complaining about .all imports
CC: @GMS103 @alexchandler100
Component: refactoring
Author: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/34201
The text was updated successfully, but these errors were encountered: