Commit 81a374d
Release Manager
gh-37290: sagemath-standard: don't require Cython to create sdist
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 #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: #37290
Reported by: Gonzalo Tornaría
Reviewer(s): Gonzalo Tornaría, Matthias KöppeFile tree
3 files changed
+5
-6
lines changed- build/pkgs/configure
- src/sage/misc
3 files changed
+5
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
| 121 | + | |
123 | 122 | | |
124 | 123 | | |
125 | 124 | | |
| |||
0 commit comments