On Fri, 22 May 2026 at 13:50, Branko Čibej <[email protected]> wrote:
> On 22. 5. 26 12:27, Branko Čibej wrote: > > On 22. 5. 26 11:50, [email protected] wrote: > > Author: brane > Date: Fri May 22 09:50:14 2026 > New Revision: 1934497 > > Log: > Allow the tests to work with a non-standart Python 3 installation that > does not provide the 'venv' module. > > > > This commit addresses some of Ivan's concerns. > > 1. The 'venv' module isn't available > > 'venv' is part of the Python standard library, so strictly speaking, it > should always be available to the tests. But it's no big deal to make it > conditional. If it's not present, the test driver won't attempt to create a > virtual environment or download any dependencies. > > I tested this with CMake, but the graceful degradation doesn't seem to be working. In my case, configuration fails with an AssertionError: [[[ cmake -B out\1 -S . "-DCMAKE_TOOLCHAIN_FILE=..\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DSVN_ENABLE_RA_SERF=OFF" "-DSVN_ENABLE_TESTS=ON" "-DPython3_ROOT_DIR=..\python" "-DPython3_FIND_REGISTRY=NEVER" -- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.26200. Traceback (most recent call last): File "C:\Ivan\OpenSource\svn-trunk\build\run_tests.py", line 1167, in <module> main() File "C:\Ivan\OpenSource\svn-trunk\build\run_tests.py", line 1117, in main main_create_venv(opts, args) File "C:\Ivan\OpenSource\svn-trunk\build\run_tests.py", line 1161, in main_create_venv python_prog, _ = svntest.main.create_python_venv(venv_dir, quiet=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Ivan/OpenSource/svn-trunk\subversion\tests\cmdline\svntest\main.py", line 2500, in create_python_venv assert venv is not None ^^^^^^^^^^^^^^^^ AssertionError CMake Error at CMakeLists.txt:892 (message): run_tests.py --create-python-venv failed. <...> -- Configuring incomplete, errors occurred! ]]] [...] > 3. Do not download stuff / allow offline testing > > As far as I can tell, this part has regressed, because now Internet access is now implicitly required for the CMake *build* phase [[[ cmake -B out\1 -S . "-DCMAKE_TOOLCHAIN_FILE=..\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DSVN_ENABLE_RA_SERF=OFF" "-DSVN_ENABLE_TESTS=ON" -- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.26200. WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 401 Unauthorized'))': /simple/lxml/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 401 Unauthorized'))': /simple/lxml/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 401 Unauthorized'))': /simple/lxml/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 401 Unauthorized'))': /simple/lxml/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 401 Unauthorized'))': /simple/lxml/ ERROR: Could not find a version that satisfies the requirement lxml==6.1.0 (from versions: none) ERROR: No matching distribution found for lxml==6.1.0 <...> ERROR: Could not find a version that satisfies the requirement lxml==6.1.0 (from versions: none) ERROR: No matching distribution found for lxml==6.1.0 ]]] > This has always been possible, either by installing the optional > dependencies (lxml and rnc2rng), or by telling the test runner that its > --python-venv=/somewhere/that/does/not/exist. In either case, the test > runner won't try to download anything. > > The open question now is: what should be the default. IMO we should always > do our best to validate our XML output, and if that means downloading lxml > & co., then so be it. It's the preferred configuration for developer and CI > testing, and there are three ways to avoid those downloads. May the mayhem > discussion begin. > > My strong preference here is that we remain *secure* by default for all build systems, meaning that the build system should not download anything from the Internet implicitly and only do so if the user explicitly opts in. [..] -- Ivan Zhakov

