From d14061457e08f53e2b76ab40ec9b2aa5899738b2 Mon Sep 17 00:00:00 2001 From: Carlos Segarra Date: Tue, 14 Oct 2025 16:50:55 +0000 Subject: [PATCH 1/3] chore: bump cpp-sysroot dep --- .github/workflows/tests.yml | 4 ++-- Dockerfile | 2 +- VERSION | 2 +- requirements.txt | 7 +++---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a14dffb..43a51fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,7 +20,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest container: - image: ghcr.io/faasm/cpython:0.4.0 + image: ghcr.io/faasm/cpython:0.5.0 steps: - name: "Fetch code" uses: actions/checkout@v4 @@ -41,7 +41,7 @@ jobs: REDIS_QUEUE_HOST: redis REDIS_STATE_HOST: redis container: - image: ghcr.io/faasm/cpython:0.4.0 + image: ghcr.io/faasm/cpython:0.5.0 services: redis: image: redis diff --git a/Dockerfile b/Dockerfile index 45e8dde..535afc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/faasm/cpp-sysroot:0.4.0 +FROM ghcr.io/faasm/cpp-sysroot:0.8.0 ARG FAASM_PYTHON_VERSION SHELL ["/bin/bash", "-c"] diff --git a/VERSION b/VERSION index 1d0ba9e..8f0916f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.4.0 +0.5.0 diff --git a/requirements.txt b/requirements.txt index dda3f9e..3bf94e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ -black==22.3.0 -faasmctl==0.13.0 -flake8==3.9.2 +black>=23.12.0 +faasmctl>=0.51.0 +flake8>=7.0.0 invoke>=2.0.0 -numpy==1.22.0 requests>=2.31.0 From 327234c88c1f7fb469b6bb4e3c441cc4bf74860f Mon Sep 17 00:00:00 2001 From: Carlos Segarra Date: Wed, 15 Oct 2025 10:09:56 +0000 Subject: [PATCH 2/3] fix(docker): comment out rotten bits --- Dockerfile | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 535afc4..e91f343 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,16 @@ ARG FAASM_PYTHON_VERSION SHELL ["/bin/bash", "-c"] ENV PYTHON_DOCKER="on" -RUN apt update && apt install -y libssl-dev +RUN apt update \ + && apt install -y --no-install-recommends \ + dpkg-dev \ + libssl-dev \ + pkg-config \ + wget \ + zlib1g \ + zlib1g-dev \ + && apt autoremove -y \ + && apt clean; rm -rf /var/lib/apt/lists/* # Clone code and submodules RUN mkdir -p /code \ @@ -30,21 +39,21 @@ RUN cd /code/python \ cpython.func # Build cross-compiled python modules, including `pyfaasm` -RUN cd /code/python \ - && ./bin/crossenv_setup.sh \ - && source ./cross_venv/bin/activate \ - && pip3 install -r crossenv/requirements.txt \ - && inv -r crossenv modules.build +# RUN cd /code/python \ + # && ./bin/crossenv_setup.sh \ + # && source ./cross_venv/bin/activate \ + # && pip3 install -r crossenv/requirements.txt \ + # && inv -r crossenv modules.build -# Finally, install the cross-compiled Python modules -RUN cd /code/python \ - && source ./venv/bin/activate \ - && inv modules.install +# # Finally, install the cross-compiled Python modules +# RUN cd /code/python \ + # && source ./venv/bin/activate \ + # && inv modules.install # TODO: Install experimental pacakges # RUN . ./cross_venv/bin/activate && inv libs.install --experimental WORKDIR /code/python -ENV TERM xterm-256color +ENV TERM=xterm-256color RUN sed -i 's/\/code\/cpp\/bin/\/code\/python\/bin/g' ~/.bashrc CMD ["/bin/bash", "-l"] From f2b658f2675d2a32a21a36226beffebe7d52b8aa Mon Sep 17 00:00:00 2001 From: Carlos Segarra Date: Wed, 15 Oct 2025 10:20:46 +0000 Subject: [PATCH 3/3] fix(pyfaasm): remove unnecessary global keywords --- pyfaasm/pyfaasm/core.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyfaasm/pyfaasm/core.py b/pyfaasm/pyfaasm/core.py index 8e4491a..5c3d59f 100644 --- a/pyfaasm/pyfaasm/core.py +++ b/pyfaasm/pyfaasm/core.py @@ -16,8 +16,6 @@ def get_env_bool(var_name): - global env_cache - if var_name not in env_cache: value = os.environ.get(var_name) env_cache[var_name] = bool(value) @@ -26,7 +24,6 @@ def get_env_bool(var_name): def set_env_bool(var_name, value): - global env_cache env_cache[var_name] = value @@ -76,7 +73,6 @@ def write_output(output): def get_output(): if is_local_output(): - global output_data return output_data else: raise RuntimeError(