Skip to content
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

build/pkgs/python3 3.13.0rc1, require Python >= 3.10, numpy 2.1.1, scipy 1.14.1, pillow 10.4.0, cffi 1.17.0, networkx 3.3, sphinx 8, ipython 8.26 #37006

Draft
wants to merge 103 commits into
base: develop
Choose a base branch
from

Conversation

mkoeppe
Copy link
Member

@mkoeppe mkoeppe commented Jan 4, 2024

The package upgrades done here require dropping support for Python 3.9.

Per https://repology.org/project/python/versions, Python 3.9 is the newest supported Python version on:

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • 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 accordingly.

⌛ Dependencies

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 4, 2024

Except for cffi, builds OK, but starting up Sage gives:

Traceback (most recent call last):
  File "sage/misc/cachefunc.pyx", line 1007, in sage.misc.cachefunc.CachedFunction.__call__
    return self.cache[k]
  File "sage/misc/weak_dict.pyx", line 715, in sage.misc.weak_dict.WeakValueDictionary.__getitem__
    raise KeyError(k)
KeyError: ((<class 'sage.rings.real_arb.RealBallField'>, 53), ())

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-pristine/src/bin/sage-ipython", line 10, in <module>
    banner()
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-pristine/src/sage/misc/banner.py", line 115, in banner
    print(banner_text(full=True))
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-pristine/src/sage/misc/banner.py", line 70, in banner_text
    import sage.all
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-pristine/src/sage/all.py", line 84, in <module>
    from sage.rings.all      import *
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-pristine/src/sage/rings/all.py", line 55, in <module>
    from sage.rings.number_field.all import *
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-pristine/src/sage/rings/number_field/all.py", line 2, in <module>
    from .number_field import (NumberField, NumberFieldTower, CyclotomicField, QuadraticField,
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-pristine/src/sage/rings/number_field/number_field.py", line 216, in <module>
    from . import number_field_element_quadratic
  File "sage/rings/number_field/number_field_element_quadratic.pyx", line 1, in init sage.rings.number_field.number_field_element_quadratic
    # distutils: libraries = NTL_LIBRARIES
  File "sage/rings/real_arb.pyx", line 4064, in init sage.rings.real_arb
    RBF = RealBallField()
  File "sage/misc/classcall_metaclass.pyx", line 320, in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__
    return cls.classcall(cls, *args, **kwds)
  File "sage/rings/real_arb.pyx", line 388, in sage.rings.real_arb.RealBallField.__classcall__
    return super().__classcall__(cls, precision)
  File "sage/misc/cachefunc.pyx", line 1012, in sage.misc.cachefunc.CachedFunction.__call__
    w = self.f(*args, **kwds)
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-pristine/src/sage/structure/unique_representation.py", line 1010, in __classcall__
    instance = typecall(cls, *args, **options)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "sage/misc/classcall_metaclass.pyx", line 471, in sage.misc.classcall_metaclass.typecall
    return (<PyTypeObject*>type).tp_call(cls, args, kwds)
  File "sage/rings/real_arb.pyx", line 427, in sage.rings.real_arb.RealBallField.__init__
    self._populate_coercion_lists_(coerce_list=[ZZ, QQ], convert_method_name='_arb_')
  File "sage/structure/parent.pyx", line 1509, in sage.structure.parent.Parent._populate_coercion_lists_
    self.register_coercion(mor)
  File "sage/structure/parent.pyx", line 1655, in sage.structure.parent.Parent.register_coercion
    mor = self._generic_coerce_map(mor)
  File "sage/structure/parent.pyx", line 1932, in sage.structure.parent.Parent._generic_coerce_map
    return self._generic_convert_map(S, category=category)
  File "sage/structure/parent_old.pyx", line 301, in sage.structure.parent_old.Parent._generic_convert_map
    return parent.Parent._generic_convert_map(self, S, category)
  File "sage/structure/parent.pyx", line 1977, in sage.structure.parent.Parent._generic_convert_map
    return DefaultConvertMap_unique(S, self, category=category)
  File "sage/structure/coerce_maps.pyx", line 76, in sage.structure.coerce_maps.DefaultConvertMap.__init__
    parent = domain.Hom(codomain, category=category)
  File "sage/structure/parent.pyx", line 1341, in sage.structure.parent.Parent.Hom
    return Hom(self, codomain, category)
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-pristine/src/sage/categories/homset.py", line 440, in Hom
    raise ValueError("{} is not in {}".format(O, category))
ValueError: Integer Ring is not in Join of Category of euclidean domains and Category of infinite sets and Category of objects

@mkoeppe mkoeppe added the pending label Jan 4, 2024
@mkoeppe mkoeppe changed the title Python 3.13.0a2 Python 3.13.0b2 Jun 15, 2024
Copy link

github-actions bot commented Jun 16, 2024

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

@mkoeppe mkoeppe changed the title Python 3.13.0b2 build/pkgs/python3 3.13.0b2, require Python >= 3.10, scipy 1.14, fpylll 0.6.1, pillow 10.3.0+, cffi 1.16.0+ Jun 16, 2024
@mkoeppe
Copy link
Member Author

mkoeppe commented Jun 16, 2024

[sagelib-10.4.beta9] [spkg-install]     In file included from sage/matrix/change_ring.c:1267:
[sagelib-10.4.beta9] [spkg-install]     In file included from sage/libs/flint/flint_wrap.h:97:
[sagelib-10.4.beta9] [spkg-install]     /Users/mkoeppe/s/sage/sage-rebasing/worktree-pristine/local/include/flint/fmpz_mpoly_factor.h:289:46: error: expected ')'
[sagelib-10.4.beta9] [spkg-install]     void fmpz_poly_pfrac_clear(fmpz_poly_pfrac_t I);
[sagelib-10.4.beta9] [spkg-install]                                                  ^
[sagelib-10.4.beta9] [spkg-install]     /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/complex.h:42:11: note: expanded from macro 'I'
[sagelib-10.4.beta9] [spkg-install]     #define I _Complex_I
[sagelib-10.4.beta9] [spkg-install]               ^
[sagelib-10.4.beta9] [spkg-install]     /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/complex.h:40:21: note: expanded from macro '_Complex_I'
[sagelib-10.4.beta9] [spkg-install]     #define _Complex_I (__extension__ 1.0iF)
[sagelib-10.4.beta9] [spkg-install]                         ^
[sagelib-10.4.beta9] [spkg-install]     /Users/mkoeppe/s/sage/sage-rebasing/worktree-pristine/local/include/flint/fmpz_mpoly_factor.h:289:46: note: to match this '('
[sagelib-10.4.beta9] [spkg-install]     /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/complex.h:42:11: note: expanded from macro 'I'
[sagelib-10.4.beta9] [spkg-install]     #define I _Complex_I
[sagelib-10.4.beta9] [spkg-install]               ^
[sagelib-10.4.beta9] [spkg-install]     /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/complex.h:40:20: note: expanded from macro '_Complex_I'
[sagelib-10.4.beta9] [spkg-install]     #define _Complex_I (__extension__ 1.0iF)
[sagelib-10.4.beta9] [spkg-install]                        ^

@mkoeppe mkoeppe mentioned this pull request Jun 16, 2024
5 tasks
vbraun pushed a commit to vbraun/sage that referenced this pull request Jul 20, 2024
    
<!-- ^ 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". -->

- Cherry-picked from sagemath#37006

### 📝 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.
- [ ] 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

<!-- 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#38231
Reported by: Matthias Köppe
Reviewer(s):
@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 16, 2024

Incompatible change in the doctest module from https://github.com/python/cpython/pull/108795/files leads to

Traceback (most recent call last):
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-clean/src/sage/doctest/forker.py", line 2589, in __call__
    doctests, extras = self._run(runner, options, results)
                       ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-clean/src/sage/doctest/forker.py", line 2637, in _run
    result = runner.run(test)
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-clean/src/sage/doctest/forker.py", line 913, in run
    return self._run(test, compileflags, out)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-clean/src/sage/doctest/forker.py", line 841, in _run
    self._DocTestRunner__record_outcome(test, failures, tries)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DocTestRunner.__record_outcome() missing 1 required positional argument: 'skips'

@mkoeppe mkoeppe added this to the sage-10.6 milestone Aug 16, 2024
@kiwifb
Copy link
Member

kiwifb commented Aug 22, 2024

Good job I looked here. Well, I have spotted issues with sphinx 8 a few weeks back. sage_autodoc.py will need synchronising again and I am not sure that saying we can use something as low as sphinx-5.2 is fair.

In any case I am looking at doing the sage_autodoc.py work right now.

@kiwifb
Copy link
Member

kiwifb commented Aug 23, 2024

I have an updated sage_autodoc.py that works with sphinx 8.0.2, should I open a PR on your PR or put it in a separate PR you will depend on?

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 23, 2024

Does the updated file work with older Sphinx too? Then a separate PR

@kiwifb
Copy link
Member

kiwifb commented Aug 23, 2024

Does the updated file work with older Sphinx too? Then a separate PR

I honestly do not know. I could test with 7.4.7 but I will not test further back.

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 23, 2024

We'll only need to make sure it works with the version currently shipped with Sage, 7.3.7.
It's fine to update build/pkgs/sphinx/version_requirements.txt

@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 23, 2024

Alternatively, if supporting 7.4.x is easy but 7.3.x is not, we can also do an intermediate update of Sphinx to 7.4.7

@kiwifb
Copy link
Member

kiwifb commented Aug 23, 2024

I actually can go back to 7.3.7 without too much difficulties. I will try it later today.

@kiwifb
Copy link
Member

kiwifb commented Aug 23, 2024

So, sphinx 7.3.7 just broke down very quickly. But 7.4.7 does work. So, I guess I'll go with a PR with an update to 7.4.7 as a stepping stone.

@kiwifb
Copy link
Member

kiwifb commented Aug 23, 2024

I have opened #38549 for the update to sphinx 7.4.7 and the sage_autodoc.py update.

@mkoeppe mkoeppe changed the title build/pkgs/python3 3.13.0rc1, require Python >= 3.10, numpy 2.1, scipy 1.14, pillow 10.4.0, cffi 1.16.0+, networkx 3.3, sphinx 8, ipython 8.26 build/pkgs/python3 3.13.0rc1, require Python >= 3.10, numpy 2.1.0, scipy 1.14.1, pillow 10.4.0, cffi 1.17.0, networkx 3.3, sphinx 8, ipython 8.26 Aug 24, 2024
@mkoeppe mkoeppe mentioned this pull request Sep 4, 2024
5 tasks
@mkoeppe mkoeppe changed the title build/pkgs/python3 3.13.0rc1, require Python >= 3.10, numpy 2.1.0, scipy 1.14.1, pillow 10.4.0, cffi 1.17.0, networkx 3.3, sphinx 8, ipython 8.26 build/pkgs/python3 3.13.0rc1, require Python >= 3.10, numpy 2.1.1, scipy 1.14.1, pillow 10.4.0, cffi 1.17.0, networkx 3.3, sphinx 8, ipython 8.26 Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants