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/sympy: Upgrade to 1.13.2 #36641

Merged
merged 4 commits into from
Sep 3, 2024

Conversation

oscarbenjamin
Copy link

@oscarbenjamin oscarbenjamin commented Nov 3, 2023

See https://groups.google.com/g/sage-devel/c/fOTkNoU02Oo/m/j116LUouBwAJ

This upgrade includes doctest changes needed for compatibility with SymPy 1.13.

This PR is also used by SymPy CI to keep track of compatibility between SymPy and Sage:
https://github.com/sympy/sympy/blob/master/.github/workflows/ci-sage.yml
https://github.com/sympy/sympy/actions/runs/6724078875/job/18275557828

@oscarbenjamin
Copy link
Author

This shows the expected test failures:

----------------------------------------------------------------------
sage -t --random-seed=... src/sage/doctest/forker.py  # 1 doctest failed
sage -t --random-seed=... src/sage/functions/hypergeometric.py  # 1 doctest failed
sage -t --random-seed=... src/sage/symbolic/expression.pyx  # 1 doctest failed
sage -t --random-seed=... src/sage/typeset/ascii_art.py  # 1 doctest failed
----------------------------------------------------------------------

These tests are expected to fail with SymPy 1.12 but should pass with SymPy's master branch.

@oscarbenjamin
Copy link
Author

I have made SymPy's Sage CI job point to this PR: sympy/sympy#25867

The SymPy CI job has passed:
https://github.com/sympy/sympy/actions/runs/6752438216/job/18357799394

Anyone wanting to check this in future can look at the status of CI on the SymPy master branch:
https://github.com/sympy/sympy/commits/master

image

@mkoeppe
Copy link
Contributor

mkoeppe commented Nov 4, 2023

Our PDF docbuild does not like the printing change using "↪" (which you mentioned in https://groups.google.com/g/sage-devel/c/fOTkNoU02Oo/m/j116LUouBwAJ)

@mkoeppe
Copy link
Contributor

mkoeppe commented Nov 4, 2023

Commits cfc1728 and 226c15f make the CI use sympy from its master branch

@oscarbenjamin
Copy link
Author

The changes here seem to have caused the SymPy CI job to fail because the sage build now expects git to be installed:
https://github.com/sympy/sympy/actions/runs/6849261888

sage-logger -p 'sage --pip install -r "/sage/build/pkgs/sympy/requirements.txt"' '/sage/logs/pkgs/sympy.log'
[sympy] installing. Log file: /sage/logs/pkgs/sympy.log
[sagelib-10.2.rc1] installing. Log file: /sage/logs/pkgs/sagelib-10.2.rc1.log
  [sympy] error installing, exit status 1. End of log file:
  [sympy]   Collecting git+https://github.com/sympy/sympy#egg_info=sympy (from -r /sage/build/pkgs/sympy/requirements.txt (line 1))
  [sympy]     Cloning https://github.com/sympy/sympy to /tmp/pip-req-build-sjb0fjju
  [sympy]     ERROR: Error [Errno 2] No such file or directory: 'git' while executing command git version
  [sympy]   ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
  [sympy]   Collecting git+https://github.com/sympy/sympy#egg_info=sympy (from -r /sage/build/pkgs/sympy/requirements.txt (line 1))
  [sympy]     Cloning https://github.com/sympy/sympy to /tmp/pip-req-build-0ydw9q2x
  [sympy]     ERROR: Error [Errno 2] No such file or directory: 'git' while executing command git version
  [sympy]   ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
  [sympy] Full log file: /sage/logs/pkgs/sympy.log
make[5]: *** [Makefile:3249: sympy-no-deps] Error 1
make[4]: *** [Makefile:3249: sympy] Error 2
  [pplpy_doc-0.8.9] successfully installed.
  [sagelib-10.2.rc1] successfully installed.
make[4]: Target 'all-sage-docs' not remade because of errors.
make[4]: Target 'all-sage' not remade because of errors.
make[3]: *** [Makefile:2833: all-start] Error 2
make[3]: Leaving directory '/sage/build/make'

real	0m13.882s
user	0m12.792s
sys	0m4.567s
***************************************************************
Error building Sage.

I am a bit confused about exactly which version of sympy would be used in the sympy CI job if the build is attempting to install sympy from the master branch (rather than the sympy commit that triggers the CI job).

@mkoeppe
Copy link
Contributor

mkoeppe commented Nov 13, 2023

@oscarbenjamin Thanks for reporting this. I've pushed a fix

Copy link

github-actions bot commented Nov 13, 2023

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

@oscarbenjamin
Copy link
Author

The git problem still seems to be happening:
https://github.com/sympy/sympy/actions/runs/7015507471/job/19084955715

vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 18, 2024
…fferent source type, clean up

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
For example, when switching from a `pip` package to `wheel` package,
remove the `requirements.txt` file.
When switching from `normal` to `wheel`, remove the `spkg-install.in`
file.

One of these cases was handled by a commit on sagemath#36641, cherry-picked from
there.
Generalizing here to avoid mistakes such as
sagemath#37129 (comment) in
the future.

Example:
```
$ ./sage -package create imagesize --pypi
Downloading tarball from https://pypi.io/packages/py2.py3/i/imagesize/im
agesize-1.4.1-py2.py3-none-any.whl to /Users/mkoeppe/s/sage/sage-
rebasing/worktree-pristine/upstream/imagesize-1.4.1-py2.py3-none-any.whl
[......................................................................]
$ git status
On branch sage_package_create_remove_files
Your branch is ahead of 'upstream/develop' by 3 commits.
  (use "git push" to publish your local commits)

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   build/pkgs/imagesize/SPKG.rst
        modified:   build/pkgs/imagesize/checksums.ini
        modified:   build/pkgs/imagesize/install-requires.txt
        deleted:    build/pkgs/imagesize/spkg-install.in
        modified:   build/pkgs/imagesize/type
```

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

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

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#37352
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 19, 2024
…fferent source type, clean up

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
For example, when switching from a `pip` package to `wheel` package,
remove the `requirements.txt` file.
When switching from `normal` to `wheel`, remove the `spkg-install.in`
file.

One of these cases was handled by a commit on sagemath#36641, cherry-picked from
there.
Generalizing here to avoid mistakes such as
sagemath#37129 (comment) in
the future.

Example:
```
$ ./sage -package create imagesize --pypi
Downloading tarball from https://pypi.io/packages/py2.py3/i/imagesize/im
agesize-1.4.1-py2.py3-none-any.whl to /Users/mkoeppe/s/sage/sage-
rebasing/worktree-pristine/upstream/imagesize-1.4.1-py2.py3-none-any.whl
[......................................................................]
$ git status
On branch sage_package_create_remove_files
Your branch is ahead of 'upstream/develop' by 3 commits.
  (use "git push" to publish your local commits)

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   build/pkgs/imagesize/SPKG.rst
        modified:   build/pkgs/imagesize/checksums.ini
        modified:   build/pkgs/imagesize/install-requires.txt
        deleted:    build/pkgs/imagesize/spkg-install.in
        modified:   build/pkgs/imagesize/type
```

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

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

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#37352
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 22, 2024
…fferent source type, clean up

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
For example, when switching from a `pip` package to `wheel` package,
remove the `requirements.txt` file.
When switching from `normal` to `wheel`, remove the `spkg-install.in`
file.

One of these cases was handled by a commit on sagemath#36641, cherry-picked from
there.
Generalizing here to avoid mistakes such as
sagemath#37129 (comment) in
the future.

Example:
```
$ ./sage -package create imagesize --pypi
Downloading tarball from https://pypi.io/packages/py2.py3/i/imagesize/im
agesize-1.4.1-py2.py3-none-any.whl to /Users/mkoeppe/s/sage/sage-
rebasing/worktree-pristine/upstream/imagesize-1.4.1-py2.py3-none-any.whl
[......................................................................]
$ git status
On branch sage_package_create_remove_files
Your branch is ahead of 'upstream/develop' by 3 commits.
  (use "git push" to publish your local commits)

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   build/pkgs/imagesize/SPKG.rst
        modified:   build/pkgs/imagesize/checksums.ini
        modified:   build/pkgs/imagesize/install-requires.txt
        deleted:    build/pkgs/imagesize/spkg-install.in
        modified:   build/pkgs/imagesize/type
```

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

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

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#37352
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 8, 2024
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
[python-flint](https://github.com/flintlib/python-flint) is an optional
dependency of the upcoming SymPy 1.13
(https://groups.google.com/g/sympy/c/S3LL7hYvD_A) @oscarbenjamin

See also
- sagemath#36641

<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

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

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->
- Depends on sagemath#37222
- Depends on sagemath#36999 (merged here)

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#37224
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
@oscarbenjamin oscarbenjamin force-pushed the pr_doctests_sympy_1.13 branch from 7ed1193 to b5bd7e1 Compare July 17, 2024 14:58
@@ -1 +1 @@
1.12.1
1.13.0
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am assuming that this is what it should be set to now...

There is likely to be a 1.13.1 release coming very soon.

@tornaria
Copy link
Contributor

Works fine for me.

@mkoeppe
Copy link
Contributor

mkoeppe commented Jul 18, 2024

It cannot be merged in this form (as it changes the package type for testing purposes); it needs to wait for the actual release.

@tornaria
Copy link
Contributor

tornaria commented Jul 18, 2024

As SymPy 1.13.0 is out (congrats @oscarbenjamin), I am reusing this PR for the upgrade

Yes, that's why I gave positive review. But it's much better if you can also review since I only tested sagelib.

Edit: thanks.

@mkoeppe
Copy link
Contributor

mkoeppe commented Jul 18, 2024

conda tests fail because sympy is pinned to 1.12.1 via conda-lock in the CI.

@oscarbenjamin
Copy link
Author

I've just pushed SymPy 1.13.1 to PyPI:

https://pypi.org/project/sympy/

I am not sure when it will appear in conda forge (I don't manage that):

https://github.com/conda-forge/sympy-feedstock

@mkoeppe mkoeppe force-pushed the pr_doctests_sympy_1.13 branch from ab3bf55 to a9f0445 Compare July 28, 2024 03:21
@mkoeppe mkoeppe changed the title build/pkgs/sympy: Upgrade to 1.13 build/pkgs/sympy: Upgrade to 1.13.1 Jul 28, 2024
@mkoeppe mkoeppe force-pushed the pr_doctests_sympy_1.13 branch from a9f0445 to 2e78781 Compare August 3, 2024 18:50
@mkoeppe mkoeppe force-pushed the pr_doctests_sympy_1.13 branch from b87cc18 to 9e8ab0b Compare August 12, 2024 04:43
@oscarbenjamin
Copy link
Author

I've just pushed SymPy 1.13.1 to PyPI:

I've now pushed 1.13.2 to PyPI.

The conda package update is ready but someone needs to merge it:
conda-forge/sympy-feedstock#59

@mkoeppe mkoeppe changed the title build/pkgs/sympy: Upgrade to 1.13.1 build/pkgs/sympy: Upgrade to 1.13.2 Aug 12, 2024
@mkoeppe mkoeppe force-pushed the pr_doctests_sympy_1.13 branch from b095eba to 6fb81c3 Compare August 12, 2024 20:15
@mkoeppe
Copy link
Contributor

mkoeppe commented Aug 12, 2024

I've backed out the attempted update of our conda-lock files from the branch -- other breakage stops the CI Conda from working anyway

@oscarbenjamin
Copy link
Author

other breakage stops the CI Conda from working anyway

Is this a Sage CI problem or do you mean that there is an issue with the SymPy Conda package?

@mkoeppe
Copy link
Contributor

mkoeppe commented Aug 12, 2024

unrelated to SymPy

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 27, 2024
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->

See https://groups.google.com/g/sage-devel/c/fOTkNoU02Oo/m/j116LUouBwAJ

This upgrade includes doctest changes needed for compatibility with
SymPy 1.13.

This PR is also used by SymPy CI to keep track of compatibility between
SymPy and Sage:
https://github.com/sympy/sympy/blob/master/.github/workflows/ci-sage.yml
https://github.com/sympy/sympy/actions/runs/6724078875/job/18275557828
    
URL: sagemath#36641
Reported by: Oscar Benjamin
Reviewer(s): Oscar Benjamin
@vbraun vbraun merged commit 100189f into sagemath:develop Sep 3, 2024
22 of 39 checks passed
@oscarbenjamin oscarbenjamin deleted the pr_doctests_sympy_1.13 branch September 3, 2024 22:35
@oscarbenjamin
Copy link
Author

Thanks everyone!

@tobiasdiez
Copy link
Contributor

With this PR the conda ci fails now:

sage -t --random-seed=338312113839497447506128839798707042314 src/sage/doctest/forker.py  # 1 doctest failed
sage -t --random-seed=338312113839497447506128839798707042314 src/sage/functions/hypergeometric.py  # 1 doctest failed
sage -t --random-seed=338312113839497447506128839798707042314 src/sage/typeset/ascii_art.py  # 1 doctest failed

(seen also in the ci of this PR)
@mkoeppe next time maybe don't set a PR to positive review if you noticed a breaking CI.

Could you please provide a follow-up PR (e.g. by accepting the results of both versions).

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.

5 participants