-
-
Notifications
You must be signed in to change notification settings - Fork 401
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.polynomial.polynomial_ring[_constructor]
: Handle missing implementation modules
#35277
Conversation
โฆons are missing
โฆ keyword arg to all constructors
โฆation' to super __init__
โฆplementation_repr
Documentation preview for this PR is ready! ๐ |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #35277 +/- ##
===========================================
- Coverage 88.62% 88.61% -0.02%
===========================================
Files 2148 2148
Lines 398653 398715 +62
===========================================
+ Hits 353308 353314 +6
- Misses 45345 45401 +56
... and 25 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. โ View full report in Codecov by Sentry. |
Can you say a bit more about why you want to do that? I suppose it makes sense, but I am a bit concerned about Maybe we could issue a warning when the default implementation for some base ring cannot be used due to a failing import. Would that be too intrusive? |
The main purpose of the modularization is to enable users/developers to use small parts of Sage that do not depend on many external libraries.
I don't think we need a run-time warning. The existing doctests already make sure that in a full installation of Sage, everything is in order. |
Ok, thanks. I suppose we can add warnings later if it does prove too confusing. |
Thank you! |
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> ### ๐ Description <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If it resolves an open issue, please link to the issue here. For example "Closes #1337" --> Using the ABC `sage.rings.number_field.number_field_base.NumberField` Deprecating `is_NumberField`. Part of: - #29705 ### ๐ Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I have made sure that the title is self-explanatory and the description concisely explains the PR. - [x] I have linked an issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### โ Dependencies <!-- List all open pull requests that this PR logically depends on --> <!-- - #xyz: short description why this is a dependency - #abc: ... --> - Depends on #35277 URL: #35283 Reported by: Matthias Kรถppe Reviewer(s): Marc Mezzarobba
๐ Description
We modify the
__init__
methods of univariate polynomial implementation classes so that they all take animplementation
keyword (and pass it on to theirsuper
).We guard the imports of implementation classes in the
PolynomialRing
constructor withtry... except ImportError
and fall back to alternative implementations unless a specific implementation was requested.This is part of:
๐ Checklist
โ Dependencies