gh-37014: Upgrade database_knotinfo to version 2024.2.1
<!-- ^^^^^
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"
-->
<!-- 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". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->
The upgrade is necessary by two reasons:
1. Since version [2023.10.1](https://github.com/soehms/database_knotinfo
/releases/tag/2023.10.1) knots with 13 crossings have been added to the
database. The new data could not be used entirely, firstly because of
missing adaptions on the Sage side and secondly because the HOMFLY-PT
data has been incompatible on the KnotInfo side. The latter has been
fixed in version 2024.1.1.
2. The old table columns `khovanov_polynomial` and
`khovanov_polynomial_torsion` have been removed from the database for
knots. Since these have been kept in Sage 10.1 for optional usage this
breaks compatiblity with [2024.1.1](https://github.com/soehms/database_k
notinfo/releases/tag/2024.1.1) completely.
This PR restores compatibility with the current content of the database
in both cases.
Furthermore it adds `KnotInfo` and `KnotInfoSeries` to the global
namespace, even in the case where only the demo part of the database is
present. I made the former restriction because I unnecessarily feared
this could affect the startup-time of Sage.
Finally I changed a couple of inline doctest tags `# optional
database_knotinfo` to according block-scoped tags. Note, that this
causes 2 doctest-warnings:
```
**********************************************************************
File "src/sage/knots/link.py", line 4070, in
sage.knots.link.Link.get_knotinfo
Warning: Variable 'KnotInfo' referenced here was set only in doctest
marked '# optional - database_knotinfo'
K = KnotInfo.K10_25
**********************************************************************
File "src/sage/knots/link.py", line 4104, in
sage.knots.link.Link.get_knotinfo
Warning: Variable 'KnotInfo' referenced here was set only in doctest
marked '# optional - database_knotinfo'
L.get_knotinfo(mirror_version=False) == KnotInfo.K0_1
```
But I think these warnings are baseless, since `KnotInfo` is in the
global namespace. I guess this is a bug in doctest functionality.
### :memo: 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! -->
<!-- Feel free to remove irrelevant items. -->
- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation accordingly.
### :hourglass: 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: https://github.com/sagemath/sage/pull/37014
Reported by: Sebastian Oehms
Reviewer(s): Sebastian Oehms, Travis Scrimshaw