-
-
Notifications
You must be signed in to change notification settings - Fork 544
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
Support tox 4.x for testing modularized distributions #35208
Conversation
…-sagewheels-nopypi-norequirements
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## develop #35208 +/- ##
===========================================
- Coverage 88.62% 88.61% -0.01%
===========================================
Files 2148 2148
Lines 398653 398653
===========================================
- Hits 353308 353283 -25
- Misses 45345 45370 +25 see 25 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Running
I get
|
Running
results in
|
Nice catch. Of course, sagemath-repl is not part of the build-deps of sagemath-categories unless |
I ran
after merging 10.0.beta5, and got
Then I did Was the initial failure expected? |
These instructions from the top of tox.ini assume that no packages have been built yet. If sage_setup or other sagemath... packages were built already (in editable mode), this won't rebuild them.
|
I think only these two may have something to do with this PR. |
Now I am getting
from the run of
|
Is this after running |
Yes. It didn't make a difference. Then I removed the old wheel scipy1.9.3, and
|
I see |
OK, this happened because |
In fact, several other packages listed in src/setup.cfg.m4 under "SAGERUNTIME" and "DOC_DEPENDENCIES" should really be added |
The run finished with
|
The tests pass in the normal sage install. |
Could you post the full log of the failures please? |
Ah, I closed the terminal! I started running it again. I will take long to see the result. |
sage -t --warn-long 80.0 --random-seed=311058290845287139560044406479667880892 /Users/kwankyu/GitHub/sage-dev/src/sage/repl/ipython_extension.py
**********************************************************************
File "/Users/kwankyu/GitHub/sage-dev/src/sage/repl/ipython_extension.py", line 353, in sage.repl.ipython_extension.SageMagics.cython
Failed example:
shell.run_cell('''
%%cython
def f():
print('test')
''')
Expected nothing
Got:
doctest:warning
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/bin/sage-runtests", line 154, in <module>
err = DC.run()
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/control.py", line 1384, in run
self.run_doctests()
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/control.py", line 1059, in run_doctests
self.dispatcher.dispatch()
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 2017, in dispatch
self.parallel_dispatch()
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 1912, in parallel_dispatch
w.start() # This might take some time
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 2186, in start
super().start()
File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.11.1/lib/python3.11/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.11.1/lib/python3.11/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.11.1/lib/python3.11/multiprocessing/context.py", line 281, in _Popen
return Popen(process_obj)
File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.11.1/lib/python3.11/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.11.1/lib/python3.11/multiprocessing/popen_fork.py", line 71, in _launch
code = process_obj._bootstrap(parent_sentinel=child_r)
File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.11.1/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 2158, in run
task(self.options, self.outtmpfile, msgpipe, self.result_queue)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 2488, in __call__
doctests, extras = self._run(runner, options, results)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 2540, in _run
result = runner.run(test)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 866, in run
return self._run(test, compileflags, out)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 695, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.repl.ipython_extension.SageMagics.cython[2]>", line 1, in <module>
shell.run_cell('''
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/repl/interpreter.py", line 390, in run_cell
super().run_cell(*args, **kwds)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 2940, in run_cell
result = self._run_cell(
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 2995, in _run_cell
return runner(coro)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/IPython/core/async_helpers.py", line 129, in _pseudo_sync_runner
coro.send(None)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3194, in run_cell_async
has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3373, in run_ast_nodes
if await self.run_code(code, result, async_=asy):
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3433, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-1-b9ac10b76270>", line 1, in <module>
get_ipython().run_cell_magic('cython', '', "def f():\n print('test')\n")
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 2417, in run_cell_magic
result = fn(*args, **kwargs)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/repl/ipython_extension.py", line 362, in cython
return cython_compile(cell)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/sage/misc/cython.py", line 673, in cython_compile
return cython_import_all(tmpfile, get_globals(), **kwds)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/sage/misc/cython.py", line 563, in cython_import_all
m = cython_import(filename, **kwds)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/sage/misc/cython.py", line 534, in cython_import
name, build_dir = cython(filename, **kwds)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/sage/misc/cython.py", line 291, in cython
standard_libs, standard_libdirs, standard_includes, aliases = _standard_libs_libdirs_incdirs_aliases()
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/sage/misc/cython.py", line 60, in _standard_libs_libdirs_incdirs_aliases
standard_incdirs = sage_include_directories() + aliases["CBLAS_INCDIR"] + aliases["NTL_INCDIR"]
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/env.py", line 307, in sage_include_directories
import distutils.sysconfig
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1128, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1080, in _find_spec
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/_distutils_hack/__init__.py", line 97, in find_spec
return method()
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/_distutils_hack/__init__.py", line 108, in spec_for_distutils
mod = importlib.import_module('setuptools._distutils')
File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.11.1/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1128, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/setuptools/__init__.py", line 16, in <module>
import setuptools.version
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3248, in <module>
@_call_aside
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3223, in _call_aside
f(*args, **kwargs)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3274, in _initialize_master_working_set
tuple(dist.activate(replace=False) for dist in working_set)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3274, in <genexpr>
tuple(dist.activate(replace=False) for dist in working_set)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/pkg_resources/__init__.py", line 2790, in activate
self.insert_on(path, replace=replace)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/pkg_resources/__init__.py", line 2922, in insert_on
self.check_version_conflict()
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/pkg_resources/__init__.py", line 2963, in check_version_conflict
issue_warning(
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3076, in issue_warning
warnings.warn(stacklevel=level + 1, *args, **kw)
File "/Users/kwankyu/GitHub/sage-dev/local/var/lib/sage/venv-python3.11.1/lib/python3.11/warnings.py", line 109, in _showwarnmsg
sw(msg.message, msg.category, msg.filename, msg.lineno,
:
UserWarning: Module sage was already imported from None, but /Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard is being added to sys.path
ld: warning: -undefined dynamic_lookup may not work with chained fixups
**********************************************************************
1 item had failures:
1 of 5 in sage.repl.ipython_extension.SageMagics.cython
[93 tests, 1 failure, 14.79 s] |
sage -t --warn-long 80.0 --random-seed=311058290845287139560044406479667880892 /Users/kwankyu/GitHub/sage-dev/src/sage/misc/package.py
**********************************************************************
File "/Users/kwankyu/GitHub/sage-dev/src/sage/misc/package.py", line 389, in sage.misc.package.installed_packages
Failed example:
sorted(installed_packages().keys()) # optional - sage_spkg
Expected:
[...'gmpy2', ...'sage_conf', ...]
Got:
['arb',
'brial',
'bzip2',
'cddlib',
'cliquer',
'combinatorial_designs',
'conway_polynomials',
'eclib',
'ecm',
'elliptic_curves',
'fflas_ffpack',
'flint',
'flintqs',
'gap',
'gf2x',
'gfortran',
'giac',
'givaro',
'glpk',
'gnulib',
'graphs',
'gsl',
'iml',
'jmol',
'lcalc',
'libbraiding',
'libhomfly',
'linbox',
'lrcalc',
'm4ri',
'm4rie',
'mathjax',
'maxima',
'mpc',
'openblas',
'palp',
'pari',
'pari_galdata',
'pari_seadata_small',
'patchelf',
'pcre',
'planarity',
'polytopes_db',
'ppl',
'pplpy_doc',
'rw',
'sagemath_doc_html',
'singular',
'sqlite',
'suitesparse',
'symmetrica',
'sympow',
'tachyon',
'threejs']
**********************************************************************
File "/Users/kwankyu/GitHub/sage-dev/src/sage/misc/package.py", line 391, in sage.misc.package.installed_packages
Failed example:
installed_packages()['gmpy2'] # optional - sage_spkg, random
Exception raised:
Traceback (most recent call last):
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 695, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.misc.package.installed_packages[1]>", line 1, in <module>
installed_packages()['gmpy2'] # optional - sage_spkg, random
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'gmpy2'
**********************************************************************
File "/Users/kwankyu/GitHub/sage-dev/src/sage/misc/package.py", line 624, in sage.misc.package.package_manifest
Failed example:
sagetex_manifest = package_manifest('sagetex') # optional - sage_spkg
Exception raised:
Traceback (most recent call last):
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 695, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.misc.package.package_manifest[1]>", line 1, in <module>
sagetex_manifest = package_manifest('sagetex') # optional - sage_spkg
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/misc/package.py", line 637, in package_manifest
version = installed_packages()[package]
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'sagetex'
**********************************************************************
File "/Users/kwankyu/GitHub/sage-dev/src/sage/misc/package.py", line 625, in sage.misc.package.package_manifest
Failed example:
sagetex_manifest['package_name'] == 'sagetex' # optional - sage_spkg
Exception raised:
Traceback (most recent call last):
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 695, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.misc.package.package_manifest[2]>", line 1, in <module>
sagetex_manifest['package_name'] == 'sagetex' # optional - sage_spkg
^^^^^^^^^^^^^^^^
NameError: name 'sagetex_manifest' is not defined
**********************************************************************
File "/Users/kwankyu/GitHub/sage-dev/src/sage/misc/package.py", line 627, in sage.misc.package.package_manifest
Failed example:
'files' in sagetex_manifest # optional - sage_spkg
Exception raised:
Traceback (most recent call last):
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 695, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/Users/kwankyu/GitHub/sage-dev/pkgs/sagemath-standard/.tox/sagepython-sagewheels-nopypi/lib/python3.11/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.misc.package.package_manifest[3]>", line 1, in <module>
'files' in sagetex_manifest # optional - sage_spkg
^^^^^^^^^^^^^^^^
NameError: name 'sagetex_manifest' is not defined
**********************************************************************
2 items had failures:
2 of 3 in sage.misc.package.installed_packages
3 of 6 in sage.misc.package.package_manifest
[56 tests, 5 failures, 11.24 s] |
With the latest beta, I get from
What does |
SageMath version 10.0.rc1, Release Date: 2023-04-28
This message comes from |
These two were fixed in #35250, I think.
I've fixed these two |
# | ||
# pkgs/sagemath-categories/.tox/sagepython/bin/python | ||
# pkgs/sagemath-categories/.tox/sagepython-sagewheels-nopypi-norequirements/bin/sage | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove initial two spaces.
the Sage distribution (indicated by feature ``sage_spkg``), we should have | ||
the installation record for this package. (We do not test for installation | ||
records of Python packages. Our ``SAGE_VENV`` is not necessarily the | ||
main Sage venv; it could be a user-created venv or a venv created by tox.) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add ::
at the end.
Otherwise, all works well. |
Thanks! I've made these changes. |
Documentation preview for this PR is ready! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. All works well for me.
Thank you! |
📚 Description
Previous fixes for tox 4.x were not complete, as observed in #35095 (comment)
The files
pkgs/*/tox.ini
now requires tox >= 4.2.tox 3.x and 4.x auto-provision a suitable version, so it is not immediately necessary to upgrade our
tox
package (or tighten the version requirements inbuild/pkgs/tox/spkg-configure.m4
.📝 Checklist
⌛ Dependencies