-
-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #31306: sage.repl: Replace use of SAGE_EXTCODE by importlib.reso…
…urces We eliminate direct reading of files from the package directories of sagelib by using `importlib.resources` (available since python 3.7) - `git grep 'SAGE_EXTCODE' src/sage` - `git grep '__file__' src/sage` This will help make sagelib `zip_safe` (https://setuptools.readthedocs.i o/en/latest/userguide/miscellaneous.html#setting-the-zip-safe-flag) In this ticket, we take care of `sage.repl`, moving data needed by its doctests from `SAGE_EXTCODE` (= `src/sage/ext_data`) into the package directory. (Thus, we avoid a dependency on support for resources in namespace packages brought by Python 3.10(?) or the backport package `importlib-resources`, see python/importlib_resources#196) Follow-up tickets will deal with other parts of the library. In the end, the directory `src/sage/ext_data` will be eliminated. References: - https://docs.python.org/3/library/importlib.html#module- importlib.resources - https://importlib-resources.readthedocs.io/en/latest/migration.html - https://importlib-resources.readthedocs.io/en/latest/using.html URL: https://trac.sagemath.org/31306 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): Dima Pasechnik
- Loading branch information
Showing
23 changed files
with
27 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters