From c207c3e4649063a3b1f46feafe310bd2079fa7d1 Mon Sep 17 00:00:00 2001 From: Eric Deveaud Date: Tue, 12 Dec 2023 22:42:58 +0100 Subject: [PATCH] do not change instance name (#216) * do not change instance name * pre-formating done * bump version to 0.3.13 * document changes Co-authored-by: Eric DEVEAUD --- CHANGELOG.md | 1 + spython/instance/__init__.py | 5 ++++- spython/version.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0afa2c3..93ba256 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The client here will eventually be released as "spython" (and eventually to singularity on pypi), and the versions here will coincide with these releases. ## [master](https://github.com/singularityhub/singularity-cli/tree/master) + - do not modify user provided instance name when generating new instance (0.3.13) - bug with instance.run_command (0.3.12) - added check to enbsure stderr exists upon a non-zero return code when streaming (0.3.11) - exposed the stream type option, and ability to capture both stdout and stderr when stream=True (0.3.1) diff --git a/spython/instance/__init__.py b/spython/instance/__init__.py index a0d4dd1..798c560 100644 --- a/spython/instance/__init__.py +++ b/spython/instance/__init__.py @@ -47,7 +47,10 @@ def generate_name(self, name=None): # If no name provided, use robot name if name is None: name = self.RobotNamer.generate() - self.name = name.replace("-", "_") + # dash allowed in instance name. + # authorizedChars = `^[a-zA-Z0-9._-]+$` from instance_linux.go + # self.name = name.replace("-", "_") + self.name = name def parse_image_name(self, image): """ diff --git a/spython/version.py b/spython/version.py index 528d02c..8b46308 100644 --- a/spython/version.py +++ b/spython/version.py @@ -5,7 +5,7 @@ # with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -__version__ = "0.3.12" +__version__ = "0.3.13" AUTHOR = "Vanessa Sochat" AUTHOR_EMAIL = "vsoch@users.noreply.github.com" NAME = "spython"