Opened 8 months ago

Closed 7 months ago

#32603 closed enhancement (fixed)

Update symengine, symengine_py to 0.8.1; drop dependency on nose

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.5
Component: packages: optional Keywords:
Cc: isuruf, tmonteil Merged in:
Authors: Matthias Koeppe, Isuru Fernando Reviewers: Thierry Monteil, Matthias Koeppe
Report Upstream: Fixed upstream, but not in a stable release. Work issues:
Branch: 6dd3e5b (Commits, GitHub, GitLab) Commit: 6dd3e5bc36d46fb8482163dde0f7dec1c9fefa6c
Dependencies: Stopgaps:

Status badges

Description (last modified by tmonteil)

Update symengine, symengine_py to 0.8.1; drop dependency on nose

Upstream report for Sage objects: https://github.com/symengine/symengine.py/pull/373

Attachments (2)

symengine_py-0.8.1.log (29.4 KB) - added by tmonteil 8 months ago.
symengine_py-0.8.1.2.log (29.8 KB) - added by tmonteil 8 months ago.

Download all attachments as: .zip

Change History (25)

comment:1 Changed 8 months ago by mkoeppe

  • Branch set to u/mkoeppe/update_symengine__symengine_py__drop_dependency_on_nose

comment:2 Changed 8 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Commit set to f929448e8e1effe764fc557c78706aefd72cf0f7

The pytest does not go through for me, but it's possible that my installation is messed up

[symengine_py-0.8.1] Running the test suite for symengine_py-0.8.1...
[symengine_py-0.8.1] ============================= test session starts ==============================
[symengine_py-0.8.1] platform darwin -- Python 3.9.7, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 -- /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-3.9/bin/python3
[symengine_py-0.8.1] cachedir: .pytest_cache
[symengine_py-0.8.1] rootdir: /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-3.9/var/tmp/sage/build/symengine_py-0.8.1/src
[symengine_py-0.8.1] collecting ... collected 0 items / 23 errors
[symengine_py-0.8.1] 
[symengine_py-0.8.1] ==================================== ERRORS ====================================
[symengine_py-0.8.1] ________________ ERROR collecting symengine/tests/test_arit.py _________________
[symengine_py-0.8.1] ImportError while importing test module '/Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-3.9/var/tmp/sage/build/symengine_py-0.8.1/src/symengine/tests/test_arit.py'.
[symengine_py-0.8.1] Hint: make sure your test modules/packages have valid Python names.
[symengine_py-0.8.1] Traceback:
[symengine_py-0.8.1] /usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py:127: in import_module
[symengine_py-0.8.1]     return _bootstrap._gcd_import(name[level:], package, level)
[symengine_py-0.8.1] symengine/__init__.py:12: in <module>
[symengine_py-0.8.1]     import symengine.lib.symengine_wrapper as wrapper
[symengine_py-0.8.1] E   ModuleNotFoundError: No module named 'symengine.lib.symengine_wrapper'
[symengine_py-0.8.1] _________________ ERROR collecting symengine/tests/test_cse.py _________________

New commits:

b3fcbd8build/pkgs/symengine[_py]: Update to 0.8.1
c4faa5fbuild/pkgs/symengine/patches/1749.patch: Remove
f929448build/pkgs/symengine_py: Switch from nose to pytest

comment:3 Changed 8 months ago by mkoeppe

  • Summary changed from Update symengine, symengine_py; drop dependency on nose to Update symengine, symengine_py to 0.8.1; drop dependency on nose

comment:4 Changed 8 months ago by tmonteil

I can reproduce the error.

comment:5 Changed 8 months ago by isuruf

  • Authors changed from Matthias Koeppe to Matthias Koeppe, Isuru Fernando
  • Branch changed from u/mkoeppe/update_symengine__symengine_py__drop_dependency_on_nose to u/isuruf/update_symengine__symengine_py__drop_dependency_on_nose
  • Commit changed from f929448e8e1effe764fc557c78706aefd72cf0f7 to fc0e37c7e30db6bc11f6c88f2941ac1529549908
  • Status changed from new to needs_review

New commits:

fc0e37cfix symengine_py tests

comment:6 Changed 8 months ago by tmonteil

  • Reviewers set to Thierry Monteil
  • Status changed from needs_review to needs_work

It does not work for me, see the attached log.

Changed 8 months ago by tmonteil

comment:7 Changed 8 months ago by git

  • Commit changed from fc0e37c7e30db6bc11f6c88f2941ac1529549908 to 1b2bdbb5c295085f08fe4350ea417f20c8d23d4f

Branch pushed to git repo; I updated commit sha1. New commits:

1b2bdbbFix getting string representation of sage objects

comment:8 Changed 8 months ago by isuruf

  • Status changed from needs_work to needs_review

comment:9 Changed 8 months ago by tmonteil

  • Description modified (diff)
  • Status changed from needs_review to needs_work

Still some problem, see the attached log.

Changed 8 months ago by tmonteil

comment:10 Changed 8 months ago by tmonteil

  • Report Upstream changed from N/A to Reported upstream. No feedback yet.

comment:11 Changed 8 months ago by git

  • Commit changed from 1b2bdbb5c295085f08fe4350ea417f20c8d23d4f to 6dd3e5bc36d46fb8482163dde0f7dec1c9fefa6c

Branch pushed to git repo; I updated commit sha1. New commits:

6dd3e5bupdate version for a rebuild

comment:12 Changed 8 months ago by isuruf

I think the issue was that symengine_py was not rebuilt. I've bumped the version to trigger a rebuild

comment:13 Changed 8 months ago by mkoeppe

  • Status changed from needs_work to needs_review

comment:14 follow-up: Changed 8 months ago by tmonteil

  • Status changed from needs_review to needs_work

The issue persists. The reason is that the doctest look at files in $SAGE_ROOT/local/lib/python3.9/site-packages/symengine/tests/ but when Sage tests a spkg, it only installs the spkg AFTER the test succeeds. So, if you install the spkg first and then install/test the spkg, currently what is tested is the previous installation.

So, changing package version may not fix the issue. In spkg-check.in, we should ask the testing framework to test files in $SAGE_ROOT/local/var/tmp/sage/build/symengine_py-0.8.1/src/symengine/tests not in $SAGE_ROOT/local/lib/python3.9/site-packages/symengine/tests/

By the way, looking at symengine.py-0.8.1/bin/test_travis.sh (in the tarball), it seems that tests from pytest and tests from test_python.py are not the same (both are run one after the other), so we should perhaps test both.

comment:15 Changed 8 months ago by isuruf

By the way, looking at symengine.py-0.8.1/bin/test_travis.sh (in the tarball), it seems that tests from pytest and tests from test_python.py are not the same (both are run one after the other), so we should perhaps test both.

Not really. They check that the tests run fine on inplace builds and on installed symengine. Since sage is not doing inplace builds, it doesn't matter.

Thanks for the info. I'll try to fix this.

comment:16 Changed 8 months ago by isuruf

The reason is that the doctest look at files in $SAGE_ROOT/local/lib/python3.9/site-packages/symengine/tests/ but when Sage tests a spkg, it only installs the spkg AFTER the test succeeds. So, if you install the spkg first and then install/test the spkg, currently what is tested is the previous installation.

At this point where is symengine_py installed to?

comment:17 in reply to: ↑ 14 Changed 8 months ago by mkoeppe

Replying to tmonteil:

The reason is that the doctest look at files in $SAGE_ROOT/local/lib/python3.9/site-packages/symengine/tests/ but when Sage tests a spkg, it only installs the spkg AFTER the test succeeds. So, if you install the spkg first and then install/test the spkg, currently what is tested is the previous installation.

That's not true. Take a look at build/bin/sage-spkg: spkg-check is run after the staged installation has been copied to the final installation directory.

comment:18 Changed 8 months ago by mkoeppe

(Also note that since #32361, Python packages are not actually staged using SAGE_DESTDIR any more. We just build and then install a wheel. This happens before running spkg-check.)

comment:19 Changed 8 months ago by isuruf

I'm confused as to how the issue mentioned by @tmonteil happens then.

comment:20 Changed 8 months ago by isuruf

  • Report Upstream changed from Reported upstream. No feedback yet. to Fixed upstream, but not in a stable release.

comment:21 Changed 8 months ago by mkoeppe

In #32595 I am currently running portability testing on GH Actions, including this ticket. We'll see if these tests can reproduce the issue.

comment:22 Changed 8 months ago by mkoeppe

  • Reviewers changed from Thierry Monteil to Thierry Monteil, Matthias Koeppe
  • Status changed from needs_work to positive_review

This has run successfully on https://github.com/mkoeppe/sage/actions/runs/1298853742; so I am setting this to positive review

comment:23 Changed 7 months ago by vbraun

  • Branch changed from u/isuruf/update_symengine__symengine_py__drop_dependency_on_nose to 6dd3e5bc36d46fb8482163dde0f7dec1c9fefa6c
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.