Skip to content

Commit

Permalink
bug: fix distutils LooseVersion import
Browse files Browse the repository at this point in the history
Problem: distutils was removed python 3.12
Solution: import from packaging
Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch committed Jan 2, 2025
1 parent cd2630e commit d571667
Show file tree
Hide file tree
Showing 62 changed files with 59 additions and 112 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
The versions coincide with releases on pip. Only major versions will be released as tags on Github.

## [0.0.x](https://github.com/singularityhub/singularity-hpc/tree/main) (0.0.x)
- Allow import of LooseVersion from packaging (bug) (0.1.29)
- use quay.io api to list tags since does not conform to oci (0.1.28)
- filter out vex and sbom tags (0.1.27)
- unpin yaml dependency (0.1.26)
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import argparse
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/add.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import shpc.utils
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/check.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import shpc.utils
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import sys
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/docgen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import shpc.utils
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/get.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import shpc.utils
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/inspect.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/client/install.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import shpc.utils
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/listing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/client/namespace.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/client/pull.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import re
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/remove.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import shpc.utils
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/shell.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import shpc.utils
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/show.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import shpc.utils
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/sync.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import os
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import shpc.utils
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/uninstall.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import shpc.utils
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/update.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import shpc.utils
Expand Down
2 changes: 1 addition & 1 deletion shpc/client/view.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2023-2024, Vanessa Sochat"
__copyright__ = "Copyright 2023-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import os
Expand Down
2 changes: 1 addition & 1 deletion shpc/defaults.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import os
Expand Down
2 changes: 1 addition & 1 deletion shpc/logger.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import inspect
Expand Down
2 changes: 1 addition & 1 deletion shpc/main/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/container/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/container/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/container/docker.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/container/podman.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/container/singularity.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/container/update/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

from shpc.logger import logger
Expand Down
2 changes: 1 addition & 1 deletion shpc/main/container/update/diff.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import difflib
Expand Down
2 changes: 1 addition & 1 deletion shpc/main/container/update/docker.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import re
Expand Down
8 changes: 6 additions & 2 deletions shpc/main/container/update/versions.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import re
from distutils.version import LooseVersion

try:
from distutils.version import LooseVersion
except ModuleNotFoundError:
from packaging.version import parse as LooseVersion


def not_all_letters(version):
Expand Down
2 changes: 1 addition & 1 deletion shpc/main/modules/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import inspect
Expand Down
2 changes: 1 addition & 1 deletion shpc/main/modules/lmod.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

from .base import ModuleBase
Expand Down
2 changes: 1 addition & 1 deletion shpc/main/modules/module.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import os
Expand Down
2 changes: 1 addition & 1 deletion shpc/main/modules/tcl.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

from .base import ModuleBase
Expand Down
2 changes: 1 addition & 1 deletion shpc/main/modules/template.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/modules/versions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import os
Expand Down
2 changes: 1 addition & 1 deletion shpc/main/modules/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import os
Expand Down
2 changes: 1 addition & 1 deletion shpc/main/registry/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/registry/filesystem.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/registry/provider.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/registry/remote.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/schemas.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/templates.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import re
Expand Down
2 changes: 1 addition & 1 deletion shpc/main/wrappers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"


Expand Down
2 changes: 1 addition & 1 deletion shpc/main/wrappers/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import os
Expand Down
2 changes: 1 addition & 1 deletion shpc/main/wrappers/generators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021-2024, Vanessa Sochat"
__copyright__ = "Copyright 2021-2025, Vanessa Sochat"
__license__ = "MPL 2.0"

import os
Expand Down
6 changes: 0 additions & 6 deletions shpc/tests/helpers.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
#!/usr/bin/python

# Copyright (C) 2021-2023 Vanessa Sochat.

# This Source Code Form is subject to the terms of the
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

import os
import shutil

Expand Down
6 changes: 0 additions & 6 deletions shpc/tests/test_client.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
#!/usr/bin/python

# Copyright (C) 2021-2023 Vanessa Sochat.

# This Source Code Form is subject to the terms of the
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

import io
import os
import shutil
Expand Down
5 changes: 0 additions & 5 deletions shpc/tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/usr/bin/python

# Copyright (C) 2021-2023 Vanessa Sochat.
# This Source Code Form is subject to the terms of the
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

import pytest

from .helpers import init_client
Expand Down
Loading

0 comments on commit d571667

Please sign in to comment.