-
-
Notifications
You must be signed in to change notification settings - Fork 516
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.repl: Replace use of SAGE_EXTCODE by importlib.resources #31306
Comments
This comment has been minimized.
This comment has been minimized.
Commit: |
Last 10 new commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Author: Matthias Koeppe |
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:13
The testsuite failures are unrelated |
comment:14
lgtm |
Reviewer: Dima Pasechnik |
comment:15
Thanks! |
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
|
comment:17
trivial merge |
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
|
Changed dependencies from #31386 to none |
comment:21
OK, Volker has started merging stuff for 9.6 including this. And I get
And it comes down to that block https://github.com/sagemath/sage-prod/blob/develop/src/sage/repl/rich_output/buffer.py#L139 - |
comment:22
I also have
because of the same thing. I guess it doesn't fail on user space build because you can safely |
comment:23
Follow up at #33256. |
comment:24
Wow, doctesting of |
comment:25
Replying to @dimpase:
Is it the |
comment:26
it's about /usr/lib |
Changed branch from u/mkoeppe/replace_use_of_sage_extcode_by_importlib_resources to |
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.io/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 fromSAGE_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 packageimportlib-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:
CC: @tobiasdiez @fchapoton @kiwifb @dimpase @soehms @tscrim
Component: refactoring
Author: Matthias Koeppe
Branch/Commit:
d925cd2
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/31306
The text was updated successfully, but these errors were encountered: