Closed kiwifb closed 4 months ago
All those are most likely cython calls
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/misc/sagedoc.py # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/graphs/connectivity.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/misc/cachefunc.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/misc/sageinspect.py # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/repl/ipython_extension.py # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/env.py # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/misc/superseded.py # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/graphs/graph_decompositions/fast_digraph.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/rings/tate_algebra_ideal.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/arith/long.pxd # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/rings/polynomial/ore_polynomial_element.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/cpython/getattr.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/rings/integer_fake.pxd # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/structure/factory.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/features/__init__.py # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/symbolic/pynac.pxi # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/cpython/cython_metaclass.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/cpython/wrapperdescr.pxd # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/misc/inherit_comparison.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/misc/lazy_attribute.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/docs/instancedoc.py # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/misc/session.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/cpython/string.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/misc/instancedoc.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/misc/nested_class.pyx # 1 doctest failed
sage -t --long --random-seed=205705670410541188758081033436036560950 /usr/lib/python3.10/site-packages/sage/structure/element.pyx # 1 doctest failed
Also, from the sage prompt
sage: cython('''
....: ''')
/storage/strogdon/gentoo-rap/usr/lib/python3.10/site-packages/setuptools/_distutils/msvccompiler.py:66: DeprecationWarning: msvccompiler is deprecated and slated to be removed in the future. Please discontinue use or file an issue with pypa/distutils describing your use case.
warnings.warn(
And is not present when run a second time.
That normal, warnings are only supposed to appear once in a session. I think.
Unless I'm mistaken, vanilla restricts setuptools
to <64.0
(see https://trac.sagemath.org/ticket/34442), but for other reasons.
Strange reasons because I build numpy with setuptools 65 just fine. I am guessing it doesn't work with the options they want.
It is curious that these setuptools
related failures to cython
calls do not fail when run individually, e.g.
sage -t --long /usr/lib/python3.10/site-packages/sage/graphs/connectivity.pyx
too many failed tests, not using stored timings
Running doctests with ID 2022-10-19-23-48-57-ed854ed1.
Running with SAGE_LOCAL='/usr' and SAGE_VENV='/usr'
Using --optional=sage
Features to be detected: 4ti2,benzene,bliss,buckygen,conway_polynomials,csdp,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_cubic_hecke,database_jones_numfield,database_knotinfo,dvipng,gfan,graphviz,imagemagick,jupymake,kenzo,latte_int,lrslib,mcqd,meataxe,msolve,nauty,palp,pandoc,pdf2svg,pdftocairo,phitigra,plantri,polytopes_db,polytopes_db_4d,pynormaliz,python_igraph,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.misc.cython,sage.plot,sage.rings.number_field,sage.rings.padics,sage.rings.real_double,sage.symbolic,sage_numerical_backends_coin,sagemath_doc_html,sphinx,tdlib
Doctesting 1 file.
/usr/lib/python3.10/site-packages/setuptools/_distutils/msvccompiler.py:66: DeprecationWarning: msvccompiler is deprecated and slated to be removed in the future. Please discontinue use or file an issue with pypa/distutils describing your use case.
warnings.warn(
sage -t --long --random-seed=338177061023648646321341562693635303826 /usr/lib/python3.10/site-packages/sage/graphs/connectivity.pyx
[511 tests, 8.88 s]
----------------------------------------------------------------------
All tests passed!
There may actually be i/o flushing issues. The warning is partly printed.
Is this setuptools-related or something else? I no longer see the warnings for the original issue.
sage -t --long --random-seed=291285384843659035697685462386874152650 /usr/lib/python3.11/site-packages/sage/repl/ipython_kernel/kernel.py
**********************************************************************
File "/usr/lib/python3.11/site-packages/sage/repl/ipython_kernel/kernel.py", line 47, in sage.repl.ipython_kernel.kernel.SageKernel.__init__
Failed example:
from sage.repl.ipython_kernel.kernel import SageKernel
Expected nothing
Got:
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
...
From the sage prompt:
sage: from sage.repl.ipython_kernel.kernel import SageKernel
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
/usr/lib/python3.11/site-packages/pydevd_plugins/extensions/__init__.py:4: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('pydevd_plugins.extensions')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
__import__('pkg_resources').declare_namespace(__name__)
/usr/lib/python3.11/site-packages/pydevd_plugins/extensions/types/__init__.py:4: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('pydevd_plugins.extensions.types')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
__import__('pkg_resources').declare_namespace(__name__)
No failure on vanilla where an older setuptools
is used.
I have no idea where the emoji came from.
The emoji seems to be default in github these days. The stuff you point out to is from pydebug. Some recent changes have made it quieter I think. A lot of things have gone quieter, someone did something about it.
I thought perhaps pydebug but no vanilla failure which was odd.
May be it was not pydebug in isolation. But that was definitely pydebug messages.
I believe the DeprecationWarning
has been fixed here https://github.com/microsoft/debugpy/commit/00bc5136e4697b86cf99bcfbb1a1a9a2c44eabe0 and the fix is probably in debugpy-1.6.7
.
debugpy-1.6.7
doesn't appear to help.
After inspection, I still have that message. It is just buried under other warnings from pydevd
, which may the real python debugging package at work.
If I delete line 2338:
warnings.warn(msg, DeprecationWarning, stacklevel=2)
in /usr/lib/python3.11/site-packages/pkg_resources/__init__.py
I see no DeprecationWarning
$ sage -t --long /usr/lib/python3.11/site-packages/sage/repl/ipython_kernel/kernel.py
too many failed tests, not using stored timings
Running doctests with ID 2023-04-21-13-02-21-bbbdc6e9.
Running with SAGE_LOCAL='/usr' and SAGE_VENV='/usr'
Using --optional=sage
Features to be detected: 4ti2,benzene,bliss,buckygen,conway_polynomials,csdp,cvxopt,cvxopt,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_cubic_hecke,database_jones_numfield,database_knotinfo,dvipng,fpylll,gfan,graphviz,imagemagick,ipython,jupymake,kenzo,latte_int,lrcalc_python,lrslib,mcqd,meataxe,mpmath,msolve,nauty,networkx,numpy,palp,pandoc,pdf2svg,pdftocairo,pexpect,phitigra,pillow,plantri,polytopes_db,polytopes_db_4d,pplpy,primecountpy,ptyprocess,pynormaliz,python_igraph,requests,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.libs.gap,sage.libs.pari,sage.libs.singular,sage.misc.cython,sage.modules,sage.plot,sage.rings.finite_rings,sage.rings.function_field,sage.rings.number_field,sage.rings.padics,sage.rings.real_double,sage.rings.real_mpfr,sage.symbolic,sage_numerical_backends_coin,sagemath_doc_html,scipy,singular,sphinx,sympy,tdlib
Doctesting 1 file.
sage -t --long --random-seed=268197945637086208363461818001488521182 /usr/lib/python3.11/site-packages/sage/repl/ipython_kernel/kernel.py
[12 tests, 0.25 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 0.3 seconds
cpu time: 0.2 seconds
cumulative wall time: 0.2 seconds
Features detected for doctesting:
The __init__.py
file is provided by setuptools-67.6.1
. I believe the DeprecationWarning
originates with something to do with implicit namespace packages (PEP 420) which I don't fully understand.
The setup.py
patch at https://github.com/microsoft/debugpy/pull/1244 fixes here the debugpy/pydevd
related doctest failures for
sage -t --long /usr/lib/python3.11/site-packages/sage/repl/ipython_kernel/kernel.py
when using >=setuptools -67.3.0
. The above debugpy
patch also includes changes to the _vendored
folder. But gentoo ultimately removes this folder.
That's interesting. The file is the last one with failures in my last round of testing.
I have networkx-3.1
failures in sage/graphs/graph.py
. This should be resolved with https://github.com/sagemath/sage/pull/35584
. And I have the Timed out failure from issue https://github.com/cschwan/sage-on-gentoo/issues/707
.
Does https://github.com/sagemath/sage/pull/35831 fix the pkg_resources
DeprecationWarnings?
I still get the DeprecationWarning.
Sorry, I have been a bit busy (and sneezy). They are gone for me for some reasons. Which one are you still getting?
DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('pydevd_plugins.extensions.types')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
when doctesting
sage -t --long /usr/lib/python3.11/site-packages/sage/repl/ipython_kernel/kernel.py
The patch at https://github.com/cschwan/sage-on-gentoo/issues/717#issuecomment-1561900297 does remove the warning but probably not the best thing to do.
OK I still have something there too. It has to be that.
I do not think the patch you mention is the right way to go indeed. The package at fault is really pydevd
. It is the one that raises warnings about pkg_resources. And it does not look like upstream is doing anything about it - or at least properly. The patch may delay the debugger attachment which gets rid of all those pesky messages.
The frozen
chatter can be removed by inserting
warnings.filterwarnings("ignore", category=DeprecationWarning)
as it appears in /usr/lib/python3.11/site-packages/pydevd_plugins/__init__.py
in
/usr/lib/python3.11/site-packages/pydevd_plugins/extensions/__init__.py
/usr/lib/python3.11/site-packages/pydevd_plugins/extensions/types/__init__.py
I'm not sure why the warnings.filterwarnings
should be missing from these latter two __init__.py
files.
Yes, it is not very consistent.
Fixed now
Lots of doctest failures are appearing now that setuptools 65+ are the only version availables. cython called distutils extension that are deprecated. Example
Harmless but pollute the test results each time cython is called.