[med-svn] [Git][med-team/toil][master] 5 commits: New upstream version 5.9.2

Andreas Tille (@tille) gitlab at salsa.debian.org
Sun Feb 5 08:02:08 GMT 2023



Andreas Tille pushed to branch master at Debian Med / toil


Commits:
7a1ee16d by Andreas Tille at 2023-02-05T08:16:44+01:00
New upstream version 5.9.2
- - - - -
5ba64c90 by Andreas Tille at 2023-02-05T08:37:21+01:00
routine-update: New upstream version

- - - - -
d9486ed8 by Andreas Tille at 2023-02-05T08:37:22+01:00
New upstream version 5.9.2
- - - - -
33d18e57 by Andreas Tille at 2023-02-05T08:37:29+01:00
Update upstream source from tag 'upstream/5.9.2'

Update to upstream version '5.9.2'
with Debian dir 80b41cc22b66247517ec4b6cd7fc9018c9c0bc12
- - - - -
fc33a30c by Andreas Tille at 2023-02-05T09:00:34+01:00
routine-update: Ready to upload to unstable

- - - - -


9 changed files:

- debian/changelog
- requirements-dev.txt
- src/toil/common.py
- src/toil/jobStores/aws/jobStore.py
- src/toil/lib/aws/__init__.py
- src/toil/lib/aws/utils.py
- src/toil/test/lib/aws/test_utils.py
- src/toil/utils/toilLaunchCluster.py
- version_template.py


Changes:

=====================================
debian/changelog
=====================================
@@ -1,10 +1,10 @@
-toil (5.9.0-2) UNRELEASED; urgency=medium
+toil (5.9.2-1) unstable; urgency=medium
 
   * Team upload.
   * Build-Depends: s/python3-xdist/python3-pytest-xdist/
     Closes: #1030558
 
- -- Andreas Tille <tille at debian.org>  Sun, 05 Feb 2023 08:28:51 +0100
+ -- Andreas Tille <tille at debian.org>  Sun, 05 Feb 2023 08:38:00 +0100
 
 toil (5.9.0-1) unstable; urgency=medium
 


=====================================
requirements-dev.txt
=====================================
@@ -12,7 +12,7 @@ types-setuptools
 types-boto
 types-pytz
 flake8>=3.8.4,<7
-flake8-bugbear>=20.11.1,<21
+flake8-bugbear>=20.11.1,<24
 black
 isort
 pydocstyle


=====================================
src/toil/common.py
=====================================
@@ -11,6 +11,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+import json
 import logging
 import os
 import pickle
@@ -36,6 +37,7 @@ from typing import (IO,
                     ContextManager,
                     Dict,
                     List,
+                    MutableMapping,
                     Optional,
                     Set,
                     Tuple,
@@ -67,7 +69,7 @@ from toil.bus import (ClusterDesiredSizeMessage,
                       QueueSizeMessage,
                       gen_message_bus_path)
 from toil.fileStores import FileID
-from toil.lib.aws import zone_to_region
+from toil.lib.aws import zone_to_region, build_tag_dict_from_env
 from toil.lib.compatibility import deprecated
 from toil.lib.conversions import bytes2human, human2bytes
 from toil.lib.io import try_path


=====================================
src/toil/jobStores/aws/jobStore.py
=====================================
@@ -35,6 +35,7 @@ from boto.exception import SDBResponseError
 from botocore.exceptions import ClientError
 
 import toil.lib.encryption as encryption
+from toil.lib.aws import build_tag_dict_from_env
 from toil.fileStores import FileID
 from toil.jobStores.abstractJobStore import (AbstractJobStore,
                                              ConcurrentFileModificationException,
@@ -56,8 +57,7 @@ from toil.jobStores.utils import (ReadablePipe,
                                   ReadableTransformingPipe,
                                   WritablePipe)
 from toil.lib.aws.session import establish_boto3_session
-from toil.lib.aws.utils import (build_tag_dict_from_env,
-                                create_s3_bucket,
+from toil.lib.aws.utils import (create_s3_bucket,
                                 flatten_tags,
                                 get_bucket_region,
                                 get_object_for_url,


=====================================
src/toil/lib/aws/__init__.py
=====================================
@@ -25,6 +25,7 @@ from typing import (Any,
                     Dict,
                     Iterable,
                     List,
+                    MutableMapping,
                     Optional,
                     TypeVar,
                     Union)
@@ -172,3 +173,23 @@ def running_on_ecs() -> bool:
     """
     # We only care about relatively current ECS
     return 'ECS_CONTAINER_METADATA_URI_V4' in os.environ
+
+def build_tag_dict_from_env(environment: MutableMapping[str, str] = os.environ) -> Dict[str, str]:
+    tags = dict()
+    owner_tag = environment.get('TOIL_OWNER_TAG')
+    if owner_tag:
+        tags.update({'Owner': owner_tag})
+
+    user_tags = environment.get('TOIL_AWS_TAGS')
+    if user_tags:
+        try:
+            json_user_tags = json.loads(user_tags)
+            if isinstance(json_user_tags, dict):
+                tags.update(json.loads(user_tags))
+            else:
+                logger.error('TOIL_AWS_TAGS must be in JSON format: {"key" : "value", ...}')
+                exit(1)
+        except json.decoder.JSONDecodeError:
+            logger.error('TOIL_AWS_TAGS must be in JSON format: {"key" : "value", ...}')
+            exit(1)
+    return tags


=====================================
src/toil/lib/aws/utils.py
=====================================
@@ -28,7 +28,8 @@ from typing import (Any,
                     Optional,
                     Set,
                     Union,
-                    cast)
+                    cast,
+                    MutableMapping)
 from urllib.parse import ParseResult
 
 from toil.lib.aws import session
@@ -41,10 +42,8 @@ from toil.lib.retry import (DEFAULT_DELAYS,
                             retry)
 
 if sys.version_info >= (3, 8):
-    from typing import Literal, MutableMapping
+    from typing import Literal
 else:
-    from typing import MutableMapping
-
     from typing_extensions import Literal
 
 try:
@@ -403,28 +402,6 @@ def list_objects_for_url(url: ParseResult) -> List[str]:
         logger.debug('Found in %s items: %s', url, listing)
         return listing
 
-
-def build_tag_dict_from_env(environment: MutableMapping[str, str] = os.environ) -> Dict[str, str]:
-    tags = dict()
-    owner_tag = environment.get('TOIL_OWNER_TAG')
-    if owner_tag:
-        tags.update({'Owner': owner_tag})
-
-    user_tags = environment.get('TOIL_AWS_TAGS')
-    if user_tags:
-        try:
-            json_user_tags = json.loads(user_tags)
-            if isinstance(json_user_tags, dict):
-                tags.update(json.loads(user_tags))
-            else:
-                logger.error('TOIL_AWS_TAGS must be in JSON format: {"key" : "value", ...}')
-                exit(1)
-        except json.decoder.JSONDecodeError:
-            logger.error('TOIL_AWS_TAGS must be in JSON format: {"key" : "value", ...}')
-            exit(1)
-    return tags
-
-
 def flatten_tags(tags: Dict[str, str]) -> List[Dict[str, str]]:
     """
     Convert tags from a key to value dict into a list of 'Key': xxx, 'Value': xxx dicts.


=====================================
src/toil/test/lib/aws/test_utils.py
=====================================
@@ -18,7 +18,7 @@ from typing import Optional
 
 import pytest
 
-from toil.lib.aws.utils import build_tag_dict_from_env
+from toil.lib.aws import build_tag_dict_from_env
 from toil.test import ToilTest
 
 logger = logging.getLogger(__name__)


=====================================
src/toil/utils/toilLaunchCluster.py
=====================================
@@ -19,7 +19,7 @@ from typing import Dict, List, Tuple, Union
 
 from toil import applianceSelf
 from toil.common import parser_with_common_options
-from toil.lib.aws.utils import build_tag_dict_from_env
+from toil.lib.aws import build_tag_dict_from_env
 from toil.provisioners import (check_valid_node_types,
                                cluster_factory,
                                parse_node_types)


=====================================
version_template.py
=====================================
@@ -28,7 +28,7 @@ import the expand_ function and invoke it directly with either no or exactly one
 #  - don't import even standard modules at global scope without renaming them
 #    to have leading/trailing underscores
 
-baseVersion = '5.9.0'
+baseVersion = '5.9.2'
 cgcloudVersion = '1.6.0a1.dev393'
 
 



View it on GitLab: https://salsa.debian.org/med-team/toil/-/compare/97e19bb5272a48b5c6a98064cfe99d0701df1c25...fc33a30c155dc16b8d0ab5b89d1b7c3b1f620efc

-- 
View it on GitLab: https://salsa.debian.org/med-team/toil/-/compare/97e19bb5272a48b5c6a98064cfe99d0701df1c25...fc33a30c155dc16b8d0ab5b89d1b7c3b1f620efc
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20230205/fdeb6db3/attachment-0001.htm>


More information about the debian-med-commit mailing list