Skip to content

Commit ff0cf4f

Browse files
Merge branch 'sagemath:develop' into improve_code_style
2 parents 865b243 + b002b63 commit ff0cf4f

File tree

240 files changed

+2475
-1784
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+2475
-1784
lines changed

.ci/create-changes-html.sh

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,27 @@ for block in diff_blocks:
6262
match = re.search(r'^diff --git a/(.*) b/\1', block, flags=re.MULTILINE)
6363
if match:
6464
doc = match.group(1)
65-
path = 'html/' + doc
6665
file_path = os.path.join('$DOC_REPOSITORY', doc)
67-
with open(file_path, 'r') as file:
68-
content = file.readlines()
66+
try:
67+
with open(file_path, 'r') as file:
68+
content = file.readlines()
69+
except FileNotFoundError:
70+
content = []
6971
count = 0
7072
for line in block.splitlines():
7173
if line.startswith('@@ -'):
72-
line_number = int(re.search(r'@@ -(\d+)', line).group(1))
73-
for i in range(line_number, -1, -1):
74-
if content[i].startswith('<'):
75-
count += 1
76-
content[i] = f'<span id="hunk{count}" style="visibility: hidden;"></span>' + content[i]
77-
break
78-
with open(file_path, 'w') as file:
79-
file.writelines(content)
74+
search_result = re.search(r'@@ -(\d+),(\d+) \+(\d+),(\d+)', line)
75+
if search_result:
76+
line_number = int(search_result.group(3))
77+
for i in range(line_number - 1, -1, -1):
78+
if content[i].startswith('<'):
79+
count += 1
80+
content[i] = f'<span id="hunk{count}" style="visibility: hidden;"></span>' + content[i]
81+
break
82+
if content:
83+
with open(file_path, 'w') as file:
84+
file.writelines(content)
85+
path = 'html/' + doc
8086
hunks = '&nbsp;'.join(f'<a href="{path}#hunk{i+1}" class="hunk" target="_blank">#{i + 1}</a>' for i in range(count))
8187
out_blocks.append(f'<p class="diff"><a href="{path}">{doc}</a>&nbsp;' + hunks + '&emsp;</p>'
8288
+ '\n<pre><code class="language-diff">'

.github/sync_labels.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ def __init__(self, url, actor):
141141
self._commits = None
142142
self._commit_date = None
143143
self._bot_login = None
144+
self._gh_version = None
144145

145146
s = url.split('/')
146147
self._owner = s[3]
@@ -235,13 +236,30 @@ def bot_login(self):
235236
"""
236237
if self._bot_login:
237238
return self._bot_login
238-
cmd = 'gh auth status'
239239
from subprocess import run
240+
cmd = 'gh version'
241+
capt = run(cmd, shell=True, capture_output=True)
242+
self._gh_version = str(capt.stdout).split('\\n')[0]
243+
info('version: %s' % self._gh_version)
244+
cmd = 'gh auth status'
240245
capt = run(cmd, shell=True, capture_output=True)
241-
l = str(capt.stderr).split()
242-
if not 'as' in l:
243-
l = str(capt.stdout).split()
244-
self._bot_login = l[l.index('as')+1]
246+
errtxt = str(capt.stderr)
247+
outtxt = str(capt.stdout)
248+
debug('auth status err: %s' % errtxt)
249+
debug('auth status out: %s' % outtxt)
250+
def read_login(txt, position_mark):
251+
for t in txt:
252+
for p in position_mark:
253+
# the output text has changed from as to account
254+
# around version 2.40.0
255+
l = t.split()
256+
if p in l:
257+
return l[l.index(p)+1]
258+
self._bot_login = read_login([errtxt, outtxt], ['account', 'as'])
259+
if not self._bot_login:
260+
self._bot_login = default_bot
261+
warning('Bot is unknown')
262+
return self._bot_login
245263
if self._bot_login.endswith('[bot]'):
246264
self._bot_login = self._bot_login.split('[bot]')[0]
247265
info('Bot is %s' % self._bot_login)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"sage_setup.clean": {
3+
"failed": true
4+
},
5+
"sage.combinat.cluster_algebra_quiver.quiver": {
6+
"failed": true
7+
},
8+
"sage.geometry.cone": {
9+
"failed": true
10+
},
11+
"sage.groups.matrix_gps.finitely_generated_gap": {
12+
"failed": true
13+
},
14+
"sage.interfaces.expect": {
15+
"failed": true
16+
},
17+
"sage.libs.gap.element": {
18+
"failed": true
19+
},
20+
"sage.libs.singular.singular": {
21+
"failed": true
22+
},
23+
"sage.matrix.matrix2": {
24+
"failed": true
25+
},
26+
"sage.matrix.matrix_integer_sparse": {
27+
"failed": true
28+
},
29+
"sage.misc.lazy_import": {
30+
"failed": true
31+
},
32+
"sage.misc.weak_dict": {
33+
"failed": true
34+
},
35+
"sage.modular.modform.l_series_gross_zagier": {
36+
"failed": true
37+
},
38+
"sage.rings.function_field.drinfeld_modules.morphism": {
39+
"failed": true
40+
},
41+
"sage.rings.polynomial.multi_polynomial_ideal": {
42+
"failed": true
43+
},
44+
"sage.rings.polynomial.multi_polynomial_libsingular": {
45+
"failed": true
46+
},
47+
"sage.rings.polynomial.skew_polynomial_finite_field": {
48+
"failed": true
49+
},
50+
"sage.tests.gap_packages": {
51+
"failed": true
52+
}
53+
}

.github/workflows/ci-conda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
- name: Test
9393
if: success() || failure()
9494
shell: bash -l {0}
95-
run: ./sage -t --all -p0
95+
run: ./sage -t --all --baseline-stats-path=.github/workflows/ci-conda-known-test-failures.json -p0
9696

9797
- name: Print logs
9898
if: always()

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: SageMath
44
abstract: SageMath is a free open-source mathematics software system.
55
authors:
66
- name: "The SageMath Developers"
7-
version: 10.3.beta2
7+
version: 10.3.beta3
88
doi: 10.5281/zenodo.593563
9-
date-released: 2023-12-13
9+
date-released: 2023-12-18
1010
repository-code: "https://github.com/sagemath/sage"
1111
url: "https://www.sagemath.org/"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,8 @@ For installation of `sage` in python using `pip` you need to install `sagemath-s
424424

425425
$ python3 -m pip install sage_conf
426426
$ ls $(sage-config SAGE_SPKG_WHEELS)
427-
$ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl
428-
$ python3 -m pip install sagemath-standard
427+
$ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl sage_setup
428+
$ python3 -m pip install --no-build-isolation sagemath-standard
429429

430430
You need to install `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels, you can install the sage library, `sagemath-standard`.
431431

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SageMath version 10.3.beta2, Release Date: 2023-12-13
1+
SageMath version 10.3.beta3, Release Date: 2023-12-18

build/bin/sage-dist-helpers

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,6 @@ sdh_pip_install() {
289289

290290
sdh_pip_editable_install() {
291291
echo "Installing $PKG_NAME (editable mode)"
292-
# Until https://github.com/sagemath/sage/issues/34209 switches us to PEP 660 editable wheels
293-
export SETUPTOOLS_ENABLE_FEATURES=legacy-editable
294292
python3 -m pip install --verbose --no-deps --no-index --no-build-isolation --isolated --editable "$@" || \
295293
sdh_die "Error installing $PKG_NAME"
296294
}

build/bin/sage-spkg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ fi
341341
PKG_BASE_VER=`echo $PKG_VER | sed 's/\.p[0-9][0-9]*$//'`
342342
if [ -f "$PKG_SCRIPTS/checksums.ini" ]; then
343343
# Normal/wheel package
344-
PKG_NAME_UPSTREAM=`lookup_param tarball "$PKG_SCRIPTS/checksums.ini" | sed "s/VERSION/$PKG_BASE_VER/"`
344+
PKG_NAME_UPSTREAM=`lookup_param tarball "$PKG_SCRIPTS/checksums.ini"`
345345
fi
346346

347347
# Set the $SAGE_DESTDIR variable to be passed to the spkg-install
@@ -396,11 +396,11 @@ ensure_pkg_src() { ###############################################
396396
if [ ! -f "$PKG_SRC" ]; then
397397
if [ -n "$PKG_NAME_UPSTREAM" ]; then
398398
# Normal or wheel package
399-
if ! sage-download-file $SAGE_DOWNLOAD_FILE_OPTIONS "$PKG_NAME_UPSTREAM"; then
400-
error_msg "Error downloading $PKG_NAME_UPSTREAM"
399+
PKG_SRC=$(sage-package download $SAGE_DOWNLOAD_FILE_OPTIONS $PKG_BASE)
400+
if [ $? != 0 ]; then
401+
error_msg "Error downloading tarball of $PKG_BASE"
401402
exit 1
402403
fi
403-
PKG_SRC="$SAGE_DISTFILES/$PKG_NAME_UPSTREAM"
404404
# Do a final check that PKG_SRC is a file with an absolute path
405405
cd /
406406
if [ ! -f "$PKG_SRC" ]; then

build/pkgs/4ti2/checksums.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
tarball=4ti2-VERSION.tar.gz
1+
tarball=4ti2-${VERSION}.tar.gz
22
sha1=3d41f30ea3ef94c293eae30c087494269fc1a6b9
33
md5=1215872325ddfc561865ecb22b2bccb2
44
cksum=2439180289
5-
upstream_url=https://github.com/4ti2/4ti2/releases/download/Release_1_6_10/4ti2-1.6.10.tar.gz
5+
upstream_url=https://github.com/4ti2/4ti2/releases/download/Release_${VERSION_MAJOR}_${VERSION_MINOR}_${VERSION_MICRO}/4ti2-${VERSION}.tar.gz

0 commit comments

Comments
 (0)