diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3d8bc6e2a..07d95a18e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -51,7 +51,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] name: "Test SDK on py${{ matrix.python-version }} x ${{ matrix.os }} " runs-on: ${{ matrix.os }} steps: @@ -78,7 +78,7 @@ jobs: options: --health-cmd "rabbitmq-diagnostics -q check_running && rabbitmq-diagnostics -q check_virtual_hosts && rabbitmq-diagnostics -q check_port_connectivity" --health-interval 10s --health-timeout 5s --health-retries 5 strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] name: "Test Endpoint on py${{ matrix.python-version }} x ${{ matrix.os }} " steps: - uses: actions/checkout@v4 diff --git a/changelog.d/20241111_160525_chris_new_pythons.rst b/changelog.d/20241111_160525_chris_new_pythons.rst new file mode 100644 index 000000000..a312847b0 --- /dev/null +++ b/changelog.d/20241111_160525_chris_new_pythons.rst @@ -0,0 +1,5 @@ +New Functionality +^^^^^^^^^^^^^^^^^ + +- The ``globus-compute-sdk`` and ``globus-compute-endpoint`` packages now support + Python versions 3.12 and 3.13. diff --git a/compute_endpoint/setup.py b/compute_endpoint/setup.py index d452a1aa9..15861608d 100644 --- a/compute_endpoint/setup.py +++ b/compute_endpoint/setup.py @@ -7,8 +7,8 @@ "requests>=2.31.0,<3", "globus-sdk", # version will be bounded by `globus-compute-sdk` "globus-compute-sdk==2.30.1", - "globus-compute-common==0.4.1", - "globus-identity-mapping==0.3.0", + "globus-compute-common==0.5.0", + "globus-identity-mapping==0.4.0", # table printing used in list-endpoints "texttable>=1.6.4,<2", # although psutil does not declare itself to use semver, it appears to offer diff --git a/compute_endpoint/tox.ini b/compute_endpoint/tox.ini index 7fe2961e3..f19d2f558 100644 --- a/compute_endpoint/tox.ini +++ b/compute_endpoint/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{311,310,39} +envlist = py{313,312,311,310,39} skip_missing_interpreters = true [testenv] diff --git a/compute_sdk/globus_compute_sdk/serialize/concretes.py b/compute_sdk/globus_compute_sdk/serialize/concretes.py index df06b8f6b..34fac9446 100644 --- a/compute_sdk/globus_compute_sdk/serialize/concretes.py +++ b/compute_sdk/globus_compute_sdk/serialize/concretes.py @@ -73,8 +73,9 @@ def serialize(self, data) -> str: def deserialize(self, payload: str): chomped = self.chomp(payload) name, body = dill.loads(codecs.decode(chomped.encode(), "base64")) - exec(body) - return locals()[name] + exec_ns: dict = {} + exec(body, exec_ns) + return exec_ns[name] class DillCodeTextInspect(SerializationStrategy): @@ -102,8 +103,9 @@ def serialize(self, data) -> str: def deserialize(self, payload: str): chomped = self.chomp(payload) name, body = dill.loads(codecs.decode(chomped.encode(), "base64")) - exec(body) - return locals()[name] + exec_ns: dict = {} + exec(body, exec_ns) + return exec_ns[name] class PickleCode(SerializationStrategy): diff --git a/compute_sdk/setup.py b/compute_sdk/setup.py index 69083cd6a..a1ccc34b4 100644 --- a/compute_sdk/setup.py +++ b/compute_sdk/setup.py @@ -8,7 +8,7 @@ # request sending and authorization tools "requests>=2.31.0,<3", "globus-sdk>=3.46.0,<4", - "globus-compute-common==0.4.1", + "globus-compute-common==0.5.0", # dill is an extension of `pickle` to a wider array of native python types # pin to the latest version, as 'dill' is not at 1.0 and does not have a clear # versioning and compatibility policy diff --git a/compute_sdk/tox.ini b/compute_sdk/tox.ini index fb5d6e8a8..49342d8f1 100644 --- a/compute_sdk/tox.ini +++ b/compute_sdk/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{311,310,39} +envlist = py{313,312,311,310,39} skip_missing_interpreters = true [testenv]