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

1 internet doctest failing in src/sage/misc/package.py #32051

Closed
seblabbe opened this issue Jun 24, 2021 · 4 comments
Closed

1 internet doctest failing in src/sage/misc/package.py #32051

seblabbe opened this issue Jun 24, 2021 · 4 comments

Comments

@seblabbe
Copy link
Contributor

On 9.4.beta3, the command

sage -t --optional=sage,internet src/sage/misc/package.py

gives

sage -t --long --random-seed=0 src/sage/misc/package.py
**********************************************************************
File "src/sage/misc/package.py", line 101, in sage.misc.package.pip_remote_version
Failed example:
    pip_remote_version(nap, pypi_url=pypi, ignore_URLError=False) # optional - internet
Expected:

    Traceback (most recent call last):
    ...
    HTTPError: HTTP Error 404: Not Found
Got:
    <BLANKLINE>

    Traceback (most recent call last):
      File "/usr/lib/python3.8/urllib/request.py", line 1317, in do_open
        h.request(req.get_method(), req.selector, req.data, headers,
      File "/usr/lib/python3.8/http/client.py", line 1230, in request
        self._send_request(method, url, body, headers, encode_chunked)
      File "/usr/lib/python3.8/http/client.py", line 1276, in _send_request
        self.endheaders(body, encode_chunked=encode_chunked)
      File "/usr/lib/python3.8/http/client.py", line 1225, in endheaders
        self._send_output(message_body, encode_chunked=encode_chunked)
      File "/usr/lib/python3.8/http/client.py", line 1004, in _send_output
        self.send(msg)
      File "/usr/lib/python3.8/http/client.py", line 944, in send
        self.connect()
      File "/usr/lib/python3.8/http/client.py", line 915, in connect
        self.sock = self._create_connection(
      File "/usr/lib/python3.8/socket.py", line 807, in create_connection
        raise err
      File "/usr/lib/python3.8/socket.py", line 796, in create_connection
        sock.connect(sa)
    TimeoutError: [Errno 110] Connection timed out
    <BLANKLINE>
    During handling of the above exception, another exception occurred:
    <BLANKLINE>

    Traceback (most recent call last):
      File "/home/slabbe/GitBox/sage/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 714, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/slabbe/GitBox/sage/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 1133, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.misc.package.pip_remote_version[4]>", line 1, in <module>
        pip_remote_version(nap, pypi_url=pypi, ignore_URLError=False) # optional - internet
      File "/home/slabbe/GitBox/sage/local/lib/python3.8/site-packages/sage/misc/package.py", line 109, in pip_remote_version
        f = urlopen(url)
      File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
        return opener.open(url, data, timeout)
      File "/usr/lib/python3.8/urllib/request.py", line 525, in open
        response = self._open(req, data)
      File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
        result = self._call_chain(self.handle_open, protocol, protocol +
      File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
        result = func(*args)
      File "/usr/lib/python3.8/urllib/request.py", line 1346, in http_open
        return self.do_open(http.client.HTTPConnection, req)
      File "/usr/lib/python3.8/urllib/request.py", line 1320, in do_open
        raise URLError(err)
    urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>

**********************************************************************
1 item had failures:
   1 of   6 in sage.misc.package.pip_remote_version
    2 beautifulsoup4 tests not run
    1 not tested test not run
    0 tests not run because we ran out of time
    [57 tests, 1 failure, 278.08 s]

Component: doctest coverage

Reviewer: Sébastien Labbé

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

@seblabbe seblabbe added this to the sage-9.4 milestone Jun 24, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Aug 22, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 May 3, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Sep 19, 2022
@fchapoton
Copy link
Contributor

comment:5

seems to work now. Maybe this can be closed as invalid ?

@fchapoton
Copy link
Contributor

comment:6

please confirm that this can be closed as invalid

@fchapoton fchapoton removed this from the sage-9.8 milestone Sep 30, 2022
@seblabbe
Copy link
Contributor Author

Reviewer: Sébastien Labbé

@seblabbe
Copy link
Contributor Author

comment:7

the command works for me now with 9.8.beta0

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