Updating the Cloud Function workspace

How to update your Cloud Function workspace when a new version of the SDK is released.

Updating to ixoncdkingress 1.0.0

Starting from ixoncdkingress 1.0.0, Python 3.12.x will be required. Follow the next steps to update your workspace.

First, make sure you have Python 3.12.x or higher installed and active:

$ python --version
Python 3.12.13

In your workspace, edit requirements.txt and change the ixoncdkingress version to 1.0.0:

ixoncdkingress==1.0.0

Remove the venv folder if it exists. The existing folder is for the old Python version; a new venv is created automatically for the new version when you run the Cloud Function:

$ make py-distclean
rm -rf ./venv
$ make run
Setting up virtual environment for Python 3
/usr/bin/python3 -m venv ./venv
./venv/bin/python3 -m pip install pip setuptools wheel --upgrade
Requirement already satisfied: pip in ./venv/lib/python3.12/site-packages (24.0)
Collecting pip
  Using cached pip-26.0.1-py3-none-any.whl.metadata (4.7 kB)
Collecting setuptools
  Using cached setuptools-82.0.1-py3-none-any.whl.metadata (6.5 kB)
Collecting wheel
  Using cached wheel-0.46.3-py3-none-any.whl.metadata (2.4 kB)
Collecting packaging>=24.0 (from wheel)
  Using cached packaging-26.0-py3-none-any.whl.metadata (3.3 kB)
Using cached pip-26.0.1-py3-none-any.whl (1.8 MB)
Using cached setuptools-82.0.1-py3-none-any.whl (1.0 MB)
Using cached wheel-0.46.3-py3-none-any.whl (30 kB)
Using cached packaging-26.0-py3-none-any.whl (74 kB)
Installing collected packages: setuptools, pip, packaging, wheel
  Attempting uninstall: pip
    Found existing installation: pip 24.0
    Uninstalling pip-24.0:
      Successfully uninstalled pip-24.0
Successfully installed packaging-26.0 pip-26.0.1 setuptools-82.0.1 wheel-0.46.3
Installing application dependencies
./venv/bin/python3 -m pip install --requirement requirements-dev.txt

...

Installing collected packages: urllib3, typing-extensions, PyYaml, pycparser, load-environ-typed, idna, dominate, dnspython, charset-normalizer, certifi, annotated-types, requests, pymongo, pydantic-core, cffi, pydantic, docker, cryptography, ixoncdkingress
Successfully installed PyYaml-6.0.3 annotated-types-0.7.0 certifi-2026.2.25 cffi-2.0.0 charset-normalizer-3.4.7 cryptography-42.0.8 dnspython-2.8.0 docker-7.0.0 dominate-2.9.1 idna-3.11 ixoncdkingress-1.0.0 load-environ-typed-0.3.0 pycparser-3.0 pydantic-2.10.6 pydantic-core-2.27.2 pymongo-4.7.3 requests-2.31.0 typing-extensions-4.15.0 urllib3-2.6.3
echo > venv/pip-dev.done
CBC_PATH=./functions ./venv/bin/python3 -m ixoncdkingress
2026-04-03 11:54:24,052 - ixoncdkingress - INFO - Starting DocumentDB server
2026-04-03 11:54:29,204 - ixoncdkingress - INFO - DocumentDB server started successfully
2026-04-03 11:54:29,205 - ixoncdkingress - INFO - wsgiref listening on http://127.0.0.1:8020/
2026-04-03 11:54:29,205 - ixoncdkingress - INFO - CBC_PATH: ./functions

You can now verify your Cloud Function still works as expected and upload a new version.

Useful links

The links below give a summary of what has changed in Python.

Troubleshooting

Wrong Python version

If python --version reports the wrong version, make run will fail with errors like:

$ python --version
Python 3.10.14
$ make run
Setting up virtual environment for Python 3
/usr/bin/python3 -m venv ./venv
./venv/bin/python3 -m pip install pip setuptools wheel --upgrade
Requirement already satisfied: pip in ./venv/lib/python3.10/site-packages (23.0.1)
Collecting pip
  Using cached pip-26.0.1-py3-none-any.whl (1.8 MB)
Requirement already satisfied: setuptools in ./venv/lib/python3.10/site-packages (65.5.0)
Collecting setuptools
  Using cached setuptools-82.0.1-py3-none-any.whl (1.0 MB)
Collecting wheel
  Using cached wheel-0.46.3-py3-none-any.whl (30 kB)
Collecting packaging>=24.0
  Using cached packaging-26.0-py3-none-any.whl (74 kB)
Installing collected packages: setuptools, pip, packaging, wheel
  Attempting uninstall: setuptools
    Found existing installation: setuptools 65.5.0
    Uninstalling setuptools-65.5.0:
      Successfully uninstalled setuptools-65.5.0
  Attempting uninstall: pip
    Found existing installation: pip 23.0.1
    Uninstalling pip-23.0.1:
      Successfully uninstalled pip-23.0.1
Successfully installed packaging-26.0 pip-26.0.1 setuptools-82.0.1 wheel-0.46.3
WARNING: There was an error checking the latest version of pip.
Installing application dependencies
./venv/bin/python3 -m pip install --requirement requirements-dev.txt
ERROR: Ignored the following yanked versions: 0.0.8, 0.0.9, 0.0.14, 0.0.15
ERROR: Ignored the following versions that require a different python version: 1.0.0 Requires-Python ~=3.12.0; 1.0.0.dev0 Requires-Python ~=3.12.0
ERROR: Could not find a version that satisfies the requirement ixoncdkingress==1.0.0 (from versions: 0.0.6, 0.0.7, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.16, 0.0.17.dev0, 0.0.17, 0.0.18.dev0, 0.0.18.dev1, 0.0.18.dev2, 0.0.18.dev3, 0.0.18.dev4, 0.0.18.dev5, 0.0.18, 0.0.19.dev0, 0.0.19, 0.0.20.dev0, 0.0.20.dev1, 0.0.20.dev2, 0.0.20.dev3, 0.0.20.dev4, 0.0.20, 0.0.21.dev0, 0.0.21, 0.0.22.dev0, 0.0.22.dev1, 0.0.22, 0.0.23.dev1, 0.0.23.dev2, 0.0.23)
ERROR: No matching distribution found for ixoncdkingress==1.0.0
make: *** [Makefile:102: venv/pip-dev.done] Error 1

To prevent conflicts between multiple Python installations on the same system, consider using pyenv to manage them. This is especially helpful if you have older Cloud Functions that still depend on Python 3.10, or newer projects that need Python 3.13.

Existing venv folder for an older Python version

If you don't remove the venv folder before running make run, it will keep using the old Python version (because it calls ./venv/bin/python3 instead of /usr/bin/python3).

$ ls -1
context_values.yaml
functions
LICENSE
Makefile
README.md
requirements-dev.txt
requirements.txt
venv
$ python --version
Python 3.12.13
$ make run
Installing application dependencies
./venv/bin/python3 -m pip install --requirement requirements-dev.txt
ERROR: Ignored the following yanked versions: 0.0.8, 0.0.9, 0.0.14, 0.0.15
ERROR: Ignored the following versions that require a different python version: 1.0.0 Requires-Python ~=3.12.0; 1.0.0.dev0 Requires-Python ~=3.12.0
ERROR: Could not find a version that satisfies the requirement ixoncdkingress==1.0.0 (from versions: 0.0.6, 0.0.7, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.16, 0.0.17.dev0, 0.0.17, 0.0.18.dev0, 0.0.18.dev1, 0.0.18.dev2, 0.0.18.dev3, 0.0.18.dev4, 0.0.18.dev5, 0.0.18, 0.0.19.dev0, 0.0.19, 0.0.20.dev0, 0.0.20.dev1, 0.0.20.dev2, 0.0.20.dev3, 0.0.20.dev4, 0.0.20, 0.0.21.dev0, 0.0.21, 0.0.22.dev0, 0.0.22.dev1, 0.0.22, 0.0.23.dev1, 0.0.23.dev2, 0.0.23)
ERROR: No matching distribution found for ixoncdkingress==1.0.0
make: *** [Makefile:102: venv/pip-dev.done] Error 1

Remove the venv folder completely and re-run the command:

$ rm -rf venv
$ make run