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

Prepare sage for sphinx 8 #38549

Merged
merged 2 commits into from
Sep 3, 2024
Merged

Prepare sage for sphinx 8 #38549

merged 2 commits into from
Sep 3, 2024

Conversation

kiwifb
Copy link
Member

@kiwifb kiwifb commented Aug 23, 2024

This PR prepares sage for sphinx 8. An update for sage_autodoc.py is needed and is provided in this PR.
The minimum known version of sphinx supporting the updated sage_autodoc.py is 7.4.7. So, sphinx is updated from 7.3.7 (which is known not to work) to 7.4.7.

📝 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.

@mkoeppe
Copy link
Contributor

mkoeppe commented Aug 24, 2024

Working well, thanks!

@mkoeppe mkoeppe added this to the sage-10.5 milestone Aug 24, 2024
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 27, 2024
    
This PR prepares sage for sphinx 8. An update for sage_autodoc.py is
needed and is provided in this PR.
The minimum known version of sphinx supporting the updated
sage_autodoc.py is 7.4.7. So, sphinx is updated from 7.3.7 (which is
known not to work) to 7.4.7.


### 📝 Checklist

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

- [x] The title is concise and informative.
- [x] 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.
    
URL: sagemath#38549
Reported by: François Bissey
Reviewer(s):
@vbraun vbraun merged commit 4b4dc82 into sagemath:develop Sep 3, 2024
18 of 39 checks passed
@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 4, 2024

@kiwifb This has broken Python 3.9 compatibility:

  [sagemath_doc_html-none]   [spkg-install] sage --docbuild --no-pdf-links reference/sets inventory 
  [sagemath_doc_html-none]   [spkg-install] [rings_sta] Exception occurred:
  [sagemath_doc_html-none]   [spkg-install] [rings_sta]   File "/sage/src/sage_docbuild/ext/sage_autodoc.py", line 1653, in import_object
  [sagemath_doc_html-none]   [spkg-install] [rings_sta]     if isinstance(self.object, NewType | TypeVar):
  [sagemath_doc_html-none]   [spkg-install] [rings_sta] TypeError: unsupported operand type(s) for |: 'function' and 'type'
  [sagemath_doc_html-none]   [spkg-install] [rings_sta] The full traceback has been saved in /tmp/sphinx-err-bp5a5o66.log, if you want to report the issue to the developers.

https://github.com/sagemath/sage/actions/runs/10691572625/job/29638354837#step:11:7433

@kiwifb
Copy link
Member Author

kiwifb commented Sep 4, 2024

OK, that came up before, how far do we go in python support?

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 4, 2024

3.9 is oldest supported

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 4, 2024

#37006 will drop 3.9, but that's likely Sage 10.6 territory

@kiwifb
Copy link
Member Author

kiwifb commented Sep 4, 2024

Looking back at sphinx 8, from which I based the work on, they have dropped support for py3.9 https://github.com/sphinx-doc/sphinx/blob/04381789db7466d56d9eb29d23d979fc16604acc/pyproject.toml#L16
so it is not surprising. Support for 3.9 will require reintroducing quite a few things in a follow up ticket.

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 4, 2024

Looking back at sphinx 8, from which I based the work on, they have dropped support for py3.9

Yes, that's why I have the Sphinx 8 upgrade in #37006

@kiwifb
Copy link
Member Author

kiwifb commented Sep 4, 2024

OK #38619 is ready for you to test, I hope that's the only change back that is needed but I cannot test it myself.

vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 8, 2024
    
This PR corrects the fact the sage_autodoc.py changes needed for sphinx
8 dropped python 3.9 support. This is a consequence of the fact that
sphinx 8 has dropped python 3.9.
Since we still want to support python 3.9, some support has to be re-
introduced.
See sagemath#38549 (comment)
and after.

### 📝 Checklist

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

- [x] The title is concise and informative.
- [x] 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.
    
URL: sagemath#38619
Reported by: François Bissey
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 8, 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". -->

The version constraint added in
sagemath#38549 broke the conda ci workflow
and added an unnecessarily strict version constraint for sphinx as a
dependency of sagelib (as opposed to sage-the-docs).

This is fixed by providing the old version constraint for sphinx in
`setup.cfg`, but with `v8` now allowed.

Alternatively, the stricter version constraint should only be added to
the sage-the-docs package.

### 📝 Checklist

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

- [ ] 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#38627
Reported by: Tobias Diez
Reviewer(s): François Bissey
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 8, 2024
    
This PR corrects the fact the sage_autodoc.py changes needed for sphinx
8 dropped python 3.9 support. This is a consequence of the fact that
sphinx 8 has dropped python 3.9.
Since we still want to support python 3.9, some support has to be re-
introduced.
See sagemath#38549 (comment)
and after.

### 📝 Checklist

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

- [x] The title is concise and informative.
- [x] 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.
    
URL: sagemath#38619
Reported by: François Bissey
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 8, 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". -->

The version constraint added in
sagemath#38549 broke the conda ci workflow
and added an unnecessarily strict version constraint for sphinx as a
dependency of sagelib (as opposed to sage-the-docs).

This is fixed by providing the old version constraint for sphinx in
`setup.cfg`, but with `v8` now allowed.

Alternatively, the stricter version constraint should only be added to
the sage-the-docs package.

### 📝 Checklist

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

- [ ] 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#38627
Reported by: Tobias Diez
Reviewer(s): François Bissey
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 10, 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". -->

The version constraint added in
sagemath#38549 broke the conda ci workflow
and added an unnecessarily strict version constraint for sphinx as a
dependency of sagelib (as opposed to sage-the-docs).

This is fixed by providing the old version constraint for sphinx in
`setup.cfg`, but with `v8` now allowed.

Alternatively, the stricter version constraint should only be added to
the sage-the-docs package.

### 📝 Checklist

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

- [ ] 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#38627
Reported by: Tobias Diez
Reviewer(s): François Bissey
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 12, 2024
    
This PR corrects the fact the sage_autodoc.py changes needed for sphinx
8 dropped python 3.9 support. This is a consequence of the fact that
sphinx 8 has dropped python 3.9.
Since we still want to support python 3.9, some support has to be re-
introduced.
See sagemath#38549 (comment)
and after.

### 📝 Checklist

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

- [x] The title is concise and informative.
- [x] 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.
    
URL: sagemath#38619
Reported by: François Bissey
Reviewer(s): Kwankyu Lee
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 12, 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". -->

The version constraint added in
sagemath#38549 broke the conda ci workflow
and added an unnecessarily strict version constraint for sphinx as a
dependency of sagelib (as opposed to sage-the-docs).

This is fixed by providing the old version constraint for sphinx in
`setup.cfg`, but with `v8` now allowed.

Alternatively, the stricter version constraint should only be added to
the sage-the-docs package.

### 📝 Checklist

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

- [ ] 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#38627
Reported by: Tobias Diez
Reviewer(s): François Bissey
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 14, 2024
    
This PR corrects the fact the sage_autodoc.py changes needed for sphinx
8 dropped python 3.9 support. This is a consequence of the fact that
sphinx 8 has dropped python 3.9.
Since we still want to support python 3.9, some support has to be re-
introduced.
See sagemath#38549 (comment)
and after.

### 📝 Checklist

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

- [x] The title is concise and informative.
- [x] 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.
    
URL: sagemath#38619
Reported by: François Bissey
Reviewer(s): Kwankyu Lee
vbraun pushed a commit to vbraun/sage that referenced this pull request Sep 14, 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". -->

The version constraint added in
sagemath#38549 broke the conda ci workflow
and added an unnecessarily strict version constraint for sphinx as a
dependency of sagelib (as opposed to sage-the-docs).

This is fixed by providing the old version constraint for sphinx in
`setup.cfg`, but with `v8` now allowed.

Alternatively, the stricter version constraint should only be added to
the sage-the-docs package.

### 📝 Checklist

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

- [ ] 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#38627
Reported by: Tobias Diez
Reviewer(s): François Bissey
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.

3 participants