Commit
2 years ago
gh-35277: `sage.rings.polynomial.polynomial_ring[_constructor]`: Handle missing implementation modules <!-- ^^^^^ 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 --> We modify the `__init__` methods of univariate polynomial implementation classes so that they all take an `implementation` keyword (and pass it on to their `super`). We guard the imports of implementation classes in the `PolynomialRing` constructor with `try... except ImportError` and fall back to alternative implementations unless a specific implementation was requested. <!-- 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" --> This is 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. - [ ] 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: ... --> URL: https://github.com/sagemath/sage/pull/35277 Reported by: Matthias Kรถppe Reviewer(s): Marc Mezzarobba
Author
Release Manager
Loading