NetBSD Problem Report #59269

From www@netbsd.org  Mon Apr  7 18:55:52 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id AD2601A9239
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  7 Apr 2025 18:55:52 +0000 (UTC)
Message-Id: <20250407185551.88D481A923C@mollari.NetBSD.org>
Date: Mon,  7 Apr 2025 18:55:51 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: devel/py-virtualenv: make test fails on network access
X-Send-Pr-Version: www-1.0

>Number:         59269
>Category:       pkg
>Synopsis:       devel/py-virtualenv: make test fails on network access
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 07 19:00:01 +0000 2025
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The TestBSD Pyvirtualenvironmation
>Environment:
>Description:
Immediate failures, obscuring the real problem:

FAILED tests/unit/create/via_global_ref/test_build_c_ext.py::test_can_build_c_extensions[venv] - AssertionError: assert 1 == 0
FAILED tests/unit/create/via_global_ref/test_build_c_ext.py::test_can_build_c_extensions[cpython3-posix] - AssertionError: assert 1 == 0
FAILED tests/unit/seed/embed/test_bootstrap_link_via_app_data.py::test_seed_link_via_app_data[False] - AssertionError: assert not 1
FAILED tests/unit/seed/embed/test_bootstrap_link_via_app_data.py::test_seed_link_via_app_data[True] - AssertionError: assert not 1

Underlying problem is that the test suite is trying to run this command to install external software during the test:

cmd        = ['/tmp/pytest-of-riastradh/pytest-14/test_can_build_c_extensions_ve0/env/bin/pip', 'install', '--no-index', '--find-links', 'https://pypi.org/simple/setuptools/', '--no-deps', ...]

Fortunately it is caught by our http_proxy hack:

  1 location(s) to search for versions of setuptools:
  * https://pypi.org/simple/setuptools/
  Fetching project page and analyzing links: https://pypi.org/simple/setuptools/
  Getting page https://pypi.org/simple/setuptools/
  Looking up "https://pypi.org/simple/setuptools/" in the cache
  Request header has "max_age" as 0, cache bypassed
  No cache entry available
  Starting new HTTPS connection (1): pypi.org:443
  Incremented Retry for (url='/simple/setuptools/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7cb45bf06600>: Failed to establish a new connection: [Errno 7] No address associated with hostname'))': /simple/setuptools/

>How-To-Repeat:
cd devel/py-virtualenv
bmake test
>Fix:
Yes, please!  If there is a way to run the test without network access, e.g. by using the setuptools package we already have, that would be best.  If the test can't run without network access, but there is a way to disable it, that would be second-best.  Otherwise it might be a matter of asking upstream about how to make their test suite work network-disconnected.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.