From e2324e65e6b95e24cf37314efaf2f5ec5763e272 Mon Sep 17 00:00:00 2001 From: mariojmdavid Date: Tue, 9 Apr 2024 14:24:10 +0100 Subject: [PATCH 1/2] remove called_with error in python3.12 --- tests/unit/test_cli.py | 3 +-- tests/unit/test_curl.py | 2 +- tests/unit/test_curlheader.py | 2 +- tests/unit/test_dockerioapi.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/unit/test_cli.py b/tests/unit/test_cli.py index 6f49094e..73ccab46 100755 --- a/tests/unit/test_cli.py +++ b/tests/unit/test_cli.py @@ -53,12 +53,11 @@ def test_01_init(self, mock_dockerio, mock_ks, mock_lfapi): UdockerCLI(self.local) self.assertTrue(mock_dockerio.called) self.assertTrue(mock_lfapi.called) - self.assertTrue(mock_ks.called_with(Config().conf['keystore'])) # Test Config().conf['keystore'] does not starts with / Config().conf['keystore'] = "xx" UdockerCLI(self.local) - self.assertTrue(mock_ks.called_with(Config().conf['keystore'])) + self.assertTrue(mock_ks.called) @patch('udocker.cli.DockerIoAPI') @patch('udocker.cli.FileUtil.isdir') diff --git a/tests/unit/test_curl.py b/tests/unit/test_curl.py index 4eb870b0..d1619510 100755 --- a/tests/unit/test_curl.py +++ b/tests/unit/test_curl.py @@ -69,7 +69,7 @@ def test_03_setvalue_from_file(self, mock_write): lambda self: iter(fakedata.readline, '')) curl_header = CurlHeader() self.assertTrue(curl_header.setvalue_from_file("filename")) - self.assertTrue(mock_write.called_with('XXXX')) + self.assertTrue(mock_write.called) def test_04_getvalue(self): """Test04 CurlHeader().getvalue().""" diff --git a/tests/unit/test_curlheader.py b/tests/unit/test_curlheader.py index 31b2ebee..dce3ce80 100755 --- a/tests/unit/test_curlheader.py +++ b/tests/unit/test_curlheader.py @@ -59,7 +59,7 @@ def test_03_setvalue_from_file(self, mock_write): lambda self: iter(fakedata.readline, '')) curl_header = CurlHeader() self.assertTrue(curl_header.setvalue_from_file("filename")) - self.assertTrue(mock_write.called_with('XXXX')) + self.assertTrue(mock_write.called) def test_04_getvalue(self): """Test04 CurlHeader().getvalue().""" diff --git a/tests/unit/test_dockerioapi.py b/tests/unit/test_dockerioapi.py index f348bd57..bdfab5a9 100755 --- a/tests/unit/test_dockerioapi.py +++ b/tests/unit/test_dockerioapi.py @@ -57,7 +57,7 @@ def test_02_set_proxy(self, mock_geturl): url = "socks5://user:pass@host:port" doia = DockerIoAPI(self.local) doia.set_proxy(url) - self.assertTrue(mock_geturl.return_value.set_proxy.called_with(url)) + self.assertTrue(mock_geturl.return_value.set_proxy.called) @patch('udocker.docker.GetURL') def test_03_set_registry(self, mock_geturl): From dd32b9b27849abd5cf22170e4526d1d94c64783e Mon Sep 17 00:00:00 2001 From: mariojmdavid Date: Tue, 9 Apr 2024 14:32:04 +0100 Subject: [PATCH 2/2] bump versin to 1.3.15 --- CHANGELOG.md | 5 +++++ codemeta.json | 2 +- docs/installation_manual.md | 18 +++++++++--------- docs/udocker.1 | 2 +- udocker/__init__.py | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42fdb4ef..239bf82b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## udocker (1.3.15) - 2024-04-09 + +* Fix unit tests: remove called_with as invalid assertion introduced in python 3.12 +* This version is the same as 1.3.14 + ## udocker (1.3.14) - 2024-04-04 * Support for runsc as engine for execution mode R1: closes #414 diff --git a/codemeta.json b/codemeta.json index 9315e3f1..5dab0fc6 100644 --- a/codemeta.json +++ b/codemeta.json @@ -6,7 +6,7 @@ "@type": "SoftwareSourceCode", "identifier": "udocker", "name": "udocker", - "version": "1.3.14", + "version": "1.3.15", "description": "A basic user tool to execute simple docker containers in batch or interactive systems without root privileges", "license": "Apache Software License 2.0, OSI Approved :: Apache Software License", "author": [ diff --git a/docs/installation_manual.md b/docs/installation_manual.md index 9ac38773..154165a5 100644 --- a/docs/installation_manual.md +++ b/docs/installation_manual.md @@ -32,18 +32,18 @@ udocker requires: Download a release tarball from : ```bash -wget https://github.com/indigo-dc/udocker/releases/download/1.3.14/udocker-1.3.14.tar.gz -tar zxvf udocker-1.3.14.tar.gz -export PATH=`pwd`/udocker-1.3.14/udocker:$PATH +wget https://github.com/indigo-dc/udocker/releases/download/1.3.15/udocker-1.3.15.tar.gz +tar zxvf udocker-1.3.15.tar.gz +export PATH=`pwd`/udocker-1.3.15/udocker:$PATH ``` Alternatively use `curl` instead of `wget` as follows: ```bash -curl -L https://github.com/indigo-dc/udocker/releases/download/1.3.14/udocker-1.3.14.tar.gz \ - > udocker-1.3.14.tar.gz -tar zxvf udocker-1.3.14.tar.gz -export PATH=`pwd`/udocker-1.3.14/udocker:$PATH +curl -L https://github.com/indigo-dc/udocker/releases/download/1.3.15/udocker-1.3.15.tar.gz \ + > udocker-1.3.15.tar.gz +tar zxvf udocker-1.3.15.tar.gz +export PATH=`pwd`/udocker-1.3.15/udocker:$PATH ``` udocker executes containers using external tools and libraries that @@ -389,8 +389,8 @@ The udocker tool should be installed as shown in section 2.1: ```bash cd /sw -wget https://github.com/indigo-dc/udocker/releases/download/1.3.14/udocker-1.3.14.tar.gz -tar zxvf udocker-1.3.14.tar.gz +wget https://github.com/indigo-dc/udocker/releases/download/1.3.15/udocker-1.3.15.tar.gz +tar zxvf udocker-1.3.15.tar.gz ``` Directing users to the central udocker installation can be done using the diff --git a/docs/udocker.1 b/docs/udocker.1 index 6dddf673..a569aad6 100644 --- a/docs/udocker.1 +++ b/docs/udocker.1 @@ -1,7 +1,7 @@ .\" Manpage for udocker .\" Contact udocker@lip.pt to correct errors or typos. .\" To read this man page use: man -l udocker.1 -.TH udocker 1 "4 Apr 2024" "version 1.3.14" "udocker man page" +.TH udocker 1 "9 Apr 2024" "version 1.3.15" "udocker man page" .SH NAME udocker \- execute Docker containers in user space without privileges .SH SYNOPSIS diff --git a/udocker/__init__.py b/udocker/__init__.py index c28dee0e..1eb36f26 100644 --- a/udocker/__init__.py +++ b/udocker/__init__.py @@ -32,5 +32,5 @@ "Singularity http://singularity.lbl.gov" ] __license__ = "Licensed under the Apache License, Version 2.0" -__version__ = "1.3.14" +__version__ = "1.3.15" __date__ = "2024"