Skip to content

Conversation

@tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Dec 23, 2024

Fixes #39163

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@github-actions
Copy link

github-actions bot commented Dec 23, 2024

Documentation preview for this PR (built with commit c9e4863; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

tobiasdiez and others added 11 commits December 24, 2024 12:00
```
In file included from build/cythonized/sage/graphs/base/boost_graph.cpp:1278:
build/cythonized/sage/graphs/base/boost_interface.cpp:119:34: error: non-constant-expression cannot be narrowed from type 'value_type' (aka 'unsigned long') to 'int' in initializer list [-Wc++11-narrowing-const-reference]
  119 | to_return.push_back({index[boost::source(*ei, graph)],
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/cythonized/sage/graphs/base/boost_graph.cpp:17503:29: note: in instantiation of member function 'BoostGraph<boost::vecS, boost::vecS, boost::directedS, boost::vecS, boost::property<boost::edge_weight_t, double>>::edge_list' requested here
 17503 |   __pyx_v_edges = __pyx_v_g.edge_list();
                                     ^
```

https://clang.llvm.org/docs/DiagnosticsReference.html#wc-11-narrowing-const-reference

To silence the error assign to a v_index outside of the
initializer list.
@tobiasdiez
Copy link
Contributor Author

tobiasdiez commented Sep 8, 2025

FAILED: [code=1] src/sage/libs/linbox/linbox_flint_interface.cpython-311-x86_64-linux-gnu.so.p/meson-generated_src_sage_libs_linbox_linbox_flint_interface.pyx.cpp.o
  ccache /usr/share/miniconda/envs/sage-dev/bin/x86_64-conda-linux-gnu-c++ -Isrc/sage/libs/linbox/linbox_flint_interface.cpython-311-x86_64-linux-gnu.so.p -Isrc/sage/libs/linbox -I../src/sage/libs/linbox -Isrc/sage/libs/flint -I../src/sage/libs/flint -I/usr/share/miniconda/envs/sage-dev/include/python3.11 -I/usr/share/miniconda/envs/sage-dev/include -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -O3 -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -fPIC -DDISABLE_COMMENTATOR -pthread -DFFLAS_COMPILED -DFFPACK_COMPILED -MD -MQ src/sage/libs/linbox/linbox_flint_interface.cpython-311-x86_64-linux-gnu.so.p/meson-generated_src_sage_libs_linbox_linbox_flint_interface.pyx.cpp.o -MF src/sage/libs/linbox/linbox_flint_interface.cpython-311-x86_64-linux-gnu.so.p/meson-generated_src_sage_libs_linbox_linbox_flint_interface.pyx.cpp.o.d -o src/sage/libs/linbox/linbox_flint_interface.cpython-311-x86_64-linux-gnu.so.p/meson-generated_src_sage_libs_linbox_linbox_flint_interface.pyx.cpp.o -c src/sage/libs/linbox/linbox_flint_interface.cpython-311-x86_64-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp
  In file included from /usr/share/miniconda/envs/sage-dev/include/givaro/givinteger.h:24,
                   from /usr/share/miniconda/envs/sage-dev/include/givaro/givrational.h:22,
                   from src/sage/libs/linbox/linbox_flint_interface.cpython-311-x86_64-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp:1145:
  /usr/share/miniconda/envs/sage-dev/include/givaro/random-integer.h: In member function 'Givaro::RandomIntegerIterator<_Unsigned, _Exact_Size>& Givaro::RandomIntegerIterator<_Unsigned, _Exact_Size>::operator=(const Givaro::RandomIntegerIterator<_Unsigned, _Exact_Size>&)':
  /usr/share/miniconda/envs/sage-dev/include/givaro/random-integer.h:90:54: error: no match for 'operator=' (operand types are 'Givaro::RandomIntegerIterator<_Unsigned, _Exact_Size>::Integer_Domain' {aka 'Givaro::ZRing<Givaro::Integer>'} and 'const Givaro::RandomIntegerIterator<_Unsigned, _Exact_Size>::Integer_Domain' {aka 'const Givaro::ZRing<Givaro::Integer>'})
     90 |                 const_cast<Integer_Domain&>(_ring)=R._ring;
        |                                                      ^~~~~
  In file included from /usr/share/miniconda/envs/sage-dev/include/linbox/matrix/sparse-matrix.h:76,
                   from src/sage/libs/linbox/linbox_flint_interface.cpython-311-x86_64-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp:1156:
  /usr/share/miniconda/envs/sage-dev/include/linbox/matrix/sparsematrix/sparse-ell-matrix.h: In member function 'LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL>::_IndexedIterator<index_iterator, element_iterator, Field>& LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL>::_IndexedIterator<index_iterator, element_iterator, Field>::operator=(const LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL>::_IndexedIterator<index_iterator, element_iterator, Field>&)':
  /usr/share/miniconda/envs/sage-dev/include/linbox/matrix/sparsematrix/sparse-ell-matrix.h:1216:44: error: assignment of read-only location '((LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL>::_IndexedIterator<index_iterator, element_iterator, Field>*)this)->LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL>::_IndexedIterator<index_iterator, element_iterator, Field>::_ld'
   1216 |                                 _ld        = iter._ld ;
        |                                 ~~~~~~~~~~~^~~~~~~~~~
  In file included from /usr/share/miniconda/envs/sage-dev/include/linbox/matrix/sparse-matrix.h:77:
  /usr/share/miniconda/envs/sage-dev/include/linbox/matrix/sparsematrix/sparse-ellr-matrix.h: In member function 'LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL_R>::_Iterator<element_iterator, Field>& LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL_R>::_Iterator<element_iterator, Field>::operator=(const LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL_R>::_Iterator<element_iterator, Field>&)':
  /usr/share/miniconda/envs/sage-dev/include/linbox/matrix/sparsematrix/sparse-ellr-matrix.h:1108:47: error: no match for 'operator=' (operand types are 'const std::vector<long unsigned int>' and 'const std::vector<long unsigned int>')
   1108 |                                 _rowid = iter._rowid;
        |                                               ^~~~~~
  In file included from /usr/share/miniconda/envs/sage-dev/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++/vector:72,
                   from /usr/share/miniconda/envs/sage-dev/include/gmp++/gmp++_int.h:20,
                   from /usr/share/miniconda/envs/sage-dev/include/gmp++/gmp++.h:57,
                   from src/sage/libs/linbox/linbox_flint_interface.cpython-311-x86_64-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp:1144:
  /usr/share/miniconda/envs/sage-dev/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = long unsigned int; _Alloc = std::allocator<long unsigned int>]' (near match)
    210 |     vector<_Tp, _Alloc>::
        |     ^~~~~~~~~~~~~~~~~~~
  /usr/share/miniconda/envs/sage-dev/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++/bits/vector.tcc:210:5: note:   passing 'const std::vector<long unsigned int>*' as 'this' argument discards qualifiers
  In file included from /usr/share/miniconda/envs/sage-dev/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++/vector:66:
  /usr/share/miniconda/envs/sage-dev/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++/bits/stl_vector.h:779:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = long unsigned int; _Alloc = std::allocator<long unsigned int>]' (near match)
    779 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
        |       ^~~~~~~~
  /usr/share/miniconda/envs/sage-dev/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++/bits/stl_vector.h:779:7: note:   conversion of argument 1 would be ill-formed:
  /usr/share/miniconda/envs/sage-dev/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++/bits/stl_vector.h:801:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = long unsigned int; _Alloc = std::allocator<long unsigned int>]'
    801 |       operator=(initializer_list<value_type> __l)
        |       ^~~~~~~~
  /usr/share/miniconda/envs/sage-dev/lib/gcc/x86_64-conda-linux-gnu/14.3.0/include/c++/bits/stl_vector.h:801:46: note:   no known conversion for argument 1 from 'const std::vector<long unsigned int>' to 'std::initializer_list<long unsigned int>'
    801 |       operator=(initializer_list<value_type> __l)
        |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
  /usr/share/miniconda/envs/sage-dev/include/linbox/matrix/sparsematrix/sparse-ellr-matrix.h:1109:37: error: assignment of read-only location '((LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL_R>::_Iterator<element_iterator, Field>*)this)->LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL_R>::_Iterator<element_iterator, Field>::_ld'
   1109 |                                 _ld = iter._ld ;
        |                                 ~~~~^~~~~~~~~~
  /usr/share/miniconda/envs/sage-dev/include/linbox/matrix/sparsematrix/sparse-ellr-matrix.h: In member function 'LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL_R>::_IndexedIterator<index_iterator, element_iterator, Field>& LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL_R>::_IndexedIterator<index_iterator, element_iterator, Field>::operator=(const LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL_R>::_IndexedIterator<index_iterator, element_iterator, Field>&)':
  /usr/share/miniconda/envs/sage-dev/include/linbox/matrix/sparsematrix/sparse-ellr-matrix.h:1258:44: error: assignment of read-only location '((LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL_R>::_IndexedIterator<index_iterator, element_iterator, Field>*)this)->LinBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL_R>::_IndexedIterator<index_iterator, element_iterator, Field>::_ld'
   1258 |                                 _ld        = iter._ld ;
        |                                 ~~~~~~~~~~~^~~~~~~~~~
  src/sage/libs/linbox/linbox_flint_interface.cpython-311-x86_64-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp: In function 'void __pyx_f_4sage_4libs_6linbox_22linbox_flint_interface_fmpz_mat_get_linbox(LinBox::DenseMatrix<Givaro::ZRing<Givaro::Integer> >&, fmpz_mat_struct*)':
  src/sage/libs/linbox/linbox_flint_interface.cpython-311-x86_64-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp:2228:33: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and '__pyx_t_4sage_4libs_5flint_5types_slong' {aka 'long int'} [-Wsign-compare]
   2228 |   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
        |                       ~~~~~~~~~~^~~~~~~~~~~
  src/sage/libs/linbox/linbox_flint_interface.cpython-311-x86_64-linux-gnu.so.p/src/sage/libs/linbox/linbox_flint_interface.pyx.cpp:2240:35: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and '__pyx_t_4sage_4libs_5flint_5types_slong' {aka 'long int'} [-Wsign-compare]
   2240 |     for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
        |                         ~~~~~~~~~~^~~~~~~~~~~

Comes from the update to gcc14. Fixed in linbox-team/givaro#226, which is in givaro 4.2.1 - already on Conda but until conda-forge/fflas-ffpack-feedstock#21 is fixed it pulls in older givaro.

@tobiasdiez tobiasdiez mentioned this pull request Sep 12, 2025
5 tasks
@tobiasdiez
Copy link
Contributor Author

Tests are mostly green (modulo the what appears to be the common background noise of randomly failing tests), so this is now finally ready for review.

@tobiasdiez tobiasdiez marked this pull request as ready for review September 24, 2025 12:30
@tobiasdiez tobiasdiez requested a review from dimpase September 30, 2025 08:24
@tobiasdiez tobiasdiez mentioned this pull request Sep 30, 2025
4 tasks
@whoami730
Copy link
Contributor

@tobiasdiez can you please update the checklist for this PR? Thanks!

@tobiasdiez
Copy link
Contributor Author

tobiasdiez commented Sep 30, 2025

@tobiasdiez can you please update the checklist for this PR? Thanks!

You mean the one in the PR description? It's mostly there as a reminder for the person opening the PR - but well, I clicked a few checkboxes ;-)

@whoami730
Copy link
Contributor

You mean the one in the PR description? It's mostly there as a reminder for the person opening the PR - but well, I clicked a few checkboxes ;-)

I thought that was used by folks to review/merge PRs :D

@tobiasdiez
Copy link
Contributor Author

tobiasdiez commented Oct 5, 2025

The two failing tests are due to the flaky ensure_interruptible_after. So this PR is now (again) ready for review.
@dimpase

@dimpase
Copy link
Member

dimpase commented Oct 6, 2025

ok, these are conda-only changes

@tobiasdiez
Copy link
Contributor Author

Thanks!

vbraun pushed a commit to vbraun/sage that referenced this pull request Oct 11, 2025
sagemathgh-39189: Add support for Python 3.13 in conda
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->


Fixes sagemath#39163

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

- sagemath#38749
- sagemath#39249

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39189
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Oct 12, 2025
sagemathgh-39189: Add support for Python 3.13 in conda
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->


Fixes sagemath#39163

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

- sagemath#38749
- sagemath#39249

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39189
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
@tobiasdiez tobiasdiez mentioned this pull request Oct 13, 2025
5 tasks
@cxzhong
Copy link
Contributor

cxzhong commented Oct 14, 2025

You can delete the enviorment-3.10-win.yml. We no longer use it

@vbraun vbraun merged commit 12c7aa5 into sagemath:develop Oct 16, 2025
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conda: support Python 3.13

6 participants