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

sage -t broken on debian sage #31193

Closed
seblabbe opened this issue Jan 7, 2021 · 7 comments
Closed

sage -t broken on debian sage #31193

seblabbe opened this issue Jan 7, 2021 · 7 comments

Comments

@seblabbe
Copy link
Contributor

seblabbe commented Jan 7, 2021

On the machine that belongs to a colleague of mine, on Ubuntu 20.04.1 LTS, after installing sage with

sudo apt install sage

the command

$ sage -t file.py

gives the following error (because it searches for optional packages):

/usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import fnmatch, glob, traceback, errno, sys, atexit, locale, imp, stat
Traceback (most recent call last):
  File "/usr/share/sagemath/bin/sage-runtests", line 178, in <module>
    DC = DocTestController(options, args)
  File "/usr/lib/python3/dist-packages/sage/doctest/control.py", line 358, in __init__
    for pkg in list_packages('optional', local=True).values():
  File "/usr/lib/python3/dist-packages/sage/misc/package.py", line 236, in list_packages
    for p in os.listdir(SAGE_PKGS):
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/sagemath/build/pkgs'

A workaround is to specify an empty list of optional packages as follows:

$ sage -t --optional=sage file.py
no stored timings available
Running doctests with ID 2021-01-07-10-54-23-a3e52fcd.
Using --optional=memlimit,sage
Doctesting 1 file.
sage -t file.py
...

which works correctly.

CC: @tobihan

Component: doctest framework

Reviewer: Thierry Monteil

Issue created by migration from https://trac.sagemath.org/ticket/31193

@seblabbe seblabbe added this to the sage-9.3 milestone Jan 7, 2021
@fchapoton
Copy link
Contributor

comment:1

Check with the latest beta.

@seblabbe

This comment has been minimized.

@seblabbe
Copy link
Contributor Author

seblabbe commented Jan 7, 2021

comment:2

ok, but the latest beta is not on debian yet

@mkoeppe
Copy link
Member

mkoeppe commented Jan 7, 2021

comment:3

Debian packaging bugs should be reported to Debian.

@mkoeppe
Copy link
Member

mkoeppe commented Jan 7, 2021

comment:4

And it's likely fixed by #30940

@mkoeppe mkoeppe removed this from the sage-9.3 milestone Jan 7, 2021
@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented May 16, 2021

Reviewer: Thierry Monteil

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented May 16, 2021

comment:6

@seblabbe, the following bug report should already do the trick: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931223

Otherwise, you can have a look at: https://www.debian.org/Bugs/Reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants