Skip to content

Commit

Permalink
Merge pull request #290 from ICRAR/LIU-408
Browse files Browse the repository at this point in the history
LIU-408: Add support for Python 3.11 and 3.12
  • Loading branch information
myxie authored Nov 5, 2024
2 parents 5ded548 + 877c4a4 commit 0de3637
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@ jobs:
translator: no
- python-version: "3.10"
test_number: 2
desc: "full package"
desc: "full package v3.10"
engine: yes
translator: yes
- python-version: "3.11"
test_number: 3
desc: "full package v3.11"
engine: yes
translator: yes
- python-version: "3.12"
test_number: 4
desc: "full package v3.12"
engine: yes
translator: yes

Expand Down
15 changes: 9 additions & 6 deletions daliuge-common/dlg/common/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
"""dlg command line utility"""

"""dlg command line utility"""
import importlib
import logging
import optparse
import subprocess
import sys
import time

import pkg_resources

from importlib.metadata import entry_points

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -117,10 +116,14 @@ def version(parser, args):

cmdwrap("version", "Reports the DALiuGE version and exits", version)


def _load_commands():
for entry_point in pkg_resources.iter_entry_points("dlg.tool_commands"):
entry_point.load().register_commands()
if sys.version_info.minor < 10:
all_entry_points = entry_points()
for entry_point in all_entry_points["dlg.tool_commands"]:
entry_point.load().register_commands()
else:
for entry_point in entry_points(group="dlg.tool_commands"): # pylint: disable=unexpected-keyword-arg
entry_point.load().register_commands()


def print_usage(prgname):
Expand Down
4 changes: 2 additions & 2 deletions daliuge-common/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def do_versioning():
install_requires = [
"gputil>=1.4.0",
"merklelib@git+https://github.com/pritchardn/merklelib",
"pyzmq==25.1.0",
"pydantic==1.10.13",
"pyzmq==25.1.1",
"pydantic>=2.5",
"boto3",
"phonenumbers",
"mailchecker",
Expand Down
2 changes: 1 addition & 1 deletion daliuge-engine/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def run(self):
"paramiko",
"psutil",
"python-daemon",
"pyzmq == 25.1.0",
"pyzmq == 25.1.1", # Python 25.1.1 is minimal install that supports Python 3.12
"scp",
"pyext @ git+https://github.com/itea1001/PyExt",
"pyyaml",
Expand Down

0 comments on commit 0de3637

Please sign in to comment.