-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
Replace use of module_list and OptionalExtension by extending find_python_sources #29701
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Commit: |
Last 10 new commits:
|
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:15
No longer on top of #28925, so no namespace package are involved any more for this ticket. |
This comment has been minimized.
This comment has been minimized.
Author: Matthias Koeppe |
This comment has been minimized.
This comment has been minimized.
comment:57
Back to positive. |
comment:58
Thanks! |
comment:59
|
comment:60
Replying to @vbraun:
Are you sure? I thought it would have come from either #30240 or #30260 since they both touch "distance_regular". |
comment:61
#30260 is broken. It is confused about whether it wants |
comment:63
Replying to @mkoeppe:
it used to be broken, but IMHO it's fixed by #30240 comment:32 |
comment:64
Replying to @dimpase:
Unfortunately Volker merged before that. |
comment:67
Replying to @Ivo-Maffei:
That's alright -- thanks for the fast reaction and fix! |
comment:68
|
comment:69
Might have been from #29950 |
comment:70
Yes, it's #29950 that broke it. |
Changed branch from u/mkoeppe/replace_use_of_module_list_optionalextension to |
The implementation of sage.misc.package_dir.read_distributions uses the function `Cython.Utils.open_source_file()` to open a file instead of `io.open()`. This function was introduced in sagemath#29701 (b582789). The only difference between `open_source_file()` and `io.open()` is that the former will open the file as binary to check the encoding. But all our files should be utf-8 so we don't need this trick.
The implementation of sage.misc.package_dir.read_distributions uses the function `Cython.Utils.open_source_file()` to open a file instead of `io.open()`. This function was introduced in sagemath#29701 (b582789). The only difference between `open_source_file()` and `io.open()` is that the former will open the file as binary to check the encoding. But all our files should be utf-8 so we don't need this trick.
…dist The implementation of sage.misc.package_dir.read_distributions uses the function `Cython.Utils.open_source_file()` to open a file instead of `io.open()`. This function was introduced in sagemath#29701 (b582789). The only difference between `open_source_file()` and `io.open()` is that the former will open the file as binary to check the encoding. But all our files should be utf-8 so we don't need this trick. In case I’m mistaken and there is a reason this trick is really necessary (@mkoeppe?) it seems better to include a version of open_source_file(), for two main reasons: (a) we don’t pull the whole of Cython just for a trivial function; (b) changes in Cython don’t affect sagemath (this is not a documented function of Cython, afaict) ### 📝 Checklist - [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. URL: sagemath#37290 Reported by: Gonzalo Tornaría Reviewer(s): Gonzalo Tornaría, Matthias Köppe
We add two new features to
find_python_sources
: finding Cython extensions, and filtering by "distributions".We remove the use of
module_list
, finding Cython extensions instead in the source tree. (This is prepared by #29706 and follow-up tickets by moving Extension options to directives in the source files.)We remove
OptionalExtension
s as follows. We map installed packages to "distributions" (for example,tdlib
->sage-tdlib
) and then filter by distribution.Follow-up tickets:
module_list.py
(not done on this ticket to avoid possible merge conflicts), deprecateOptionalExtension
(which may be in use by user packages?)CC: @kiwifb @isuruf @videlec @dcoudert @dimpase @kliem @vbraun
Component: refactoring
Author: Matthias Koeppe
Branch/Commit:
55c3fbc
Reviewer: Jonathan Kliem
Issue created by migration from https://trac.sagemath.org/ticket/29701
The text was updated successfully, but these errors were encountered: