From df090dbfffcc97e831a248fbeaa0bac0d61ba365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 25 Nov 2022 17:27:01 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Deprecate=20and=20remove=20Pytho?= =?UTF-8?q?n=203.6=20and=20Python=202.7=20(#75)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 4 --- .github/workflows/test.yml | 4 --- README.md | 14 +++++++-- docker-images/python2.7.dockerfile | 30 -------------------- docker-images/python3.6-alpine3.8.dockerfile | 30 -------------------- docker-images/python3.6.dockerfile | 27 ------------------ pyproject.toml | 2 +- scripts/process_all.py | 2 -- 8 files changed, 12 insertions(+), 101 deletions(-) delete mode 100644 docker-images/python2.7.dockerfile delete mode 100644 docker-images/python3.6-alpine3.8.dockerfile delete mode 100644 docker-images/python3.6.dockerfile diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 44e5f6b..74fc392 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,16 +21,12 @@ jobs: python_version: "3.8" - name: python3.7 python_version: "3.7" - - name: python3.6 - python_version: "3.6" - name: python3.9-alpine3.13 python_version: "3.9" - name: python3.8-alpine3.11 python_version: "3.8" - name: python3.7-alpine3.8 python_version: "3.7" - - name: python3.6-alpine3.8 - python_version: "3.6" fail-fast: true runs-on: ubuntu-18.04 steps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b30e13..c852916 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,16 +23,12 @@ jobs: python_version: "3.8" - name: python3.7 python_version: "3.7" - - name: python3.6 - python_version: "3.6" - name: python3.9-alpine3.13 python_version: "3.9" - name: python3.8-alpine3.11 python_version: "3.8" - name: python3.7-alpine3.8 python_version: "3.7" - - name: python3.6-alpine3.8 - python_version: "3.6" fail-fast: true runs-on: ubuntu-18.04 steps: diff --git a/README.md b/README.md index bf459d7..27fe093 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,19 @@ * [`python3.7-alpine3.8` _(Dockerfile)_](https://github.com/tiangolo/meinheld-gunicorn-docker/blob/master/docker-images/python3.7-alpine3.8.dockerfile) * [`python3.6-alpine3.8` _(Dockerfile)_](https://github.com/tiangolo/meinheld-gunicorn-docker/blob/master/docker-images/python3.6-alpine3.8.dockerfile) -## Deprecated +## Deprecated tags -These tags are no longer supported: +🚨 These tags are no longer supported or maintained, they are removed from the GitHub repository, but the last version pushed is still available in Docker Hub. -* [`python2.7` _(Dockerfile)_](https://github.com/tiangolo/meinheld-gunicorn-docker/blob/master/docker-images/python2.7.dockerfile) +* `python3.6` +* `python3.6-alpine3.8` +* `python2.7` + +The last date tags for deprecated Python versions are: + +* `python3.6-2022-11-25` +* `python3.6-alpine3.8-2022-11-25` +* `python2.7-2022-11-25` --- diff --git a/docker-images/python2.7.dockerfile b/docker-images/python2.7.dockerfile deleted file mode 100644 index ca10bb2..0000000 --- a/docker-images/python2.7.dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -FROM python:2.7 - -LABEL maintainer="Sebastian Ramirez " - -# Install requirements -# Newer versions don't support Python 2.7 (Python 2.7 reached end of life long ago) -# So for this tag just install whatever is available for Python 2.7, don't use -# Dependabot's updated requirements -RUN pip install --no-cache-dir meinheld gunicorn - -COPY ./entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -COPY ./start.sh /start.sh -RUN chmod +x /start.sh - -COPY ./gunicorn_conf.py /gunicorn_conf.py - -COPY ./app /app -WORKDIR /app/ - -ENV PYTHONPATH=/app - -EXPOSE 80 - -ENTRYPOINT ["/entrypoint.sh"] - -# Run the start script, it will check for an /app/prestart.sh script (e.g. for migrations) -# And then will start Gunicorn with Meinheld -CMD ["/start.sh"] diff --git a/docker-images/python3.6-alpine3.8.dockerfile b/docker-images/python3.6-alpine3.8.dockerfile deleted file mode 100644 index 983ea2a..0000000 --- a/docker-images/python3.6-alpine3.8.dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -FROM python:3.6-alpine3.8 - -LABEL maintainer="Sebastian Ramirez " - -COPY requirements.txt /tmp/requirements.txt - -RUN apk add --no-cache --virtual .build-deps gcc libc-dev \ - && pip install --no-cache-dir -r /tmp/requirements.txt \ - && apk del .build-deps gcc libc-dev - -COPY ./entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -COPY ./start.sh /start.sh -RUN chmod +x /start.sh - -COPY ./gunicorn_conf.py /gunicorn_conf.py - -COPY ./app /app -WORKDIR /app/ - -ENV PYTHONPATH=/app - -EXPOSE 80 - -ENTRYPOINT ["/entrypoint.sh"] - -# Run the start script, it will check for an /app/prestart.sh script (e.g. for migrations) -# And then will start Gunicorn with Meinheld -CMD ["/start.sh"] diff --git a/docker-images/python3.6.dockerfile b/docker-images/python3.6.dockerfile deleted file mode 100644 index 7774adc..0000000 --- a/docker-images/python3.6.dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM python:3.6 - -LABEL maintainer="Sebastian Ramirez " - -COPY requirements.txt /tmp/requirements.txt -RUN pip install --no-cache-dir -r /tmp/requirements.txt - -COPY ./entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -COPY ./start.sh /start.sh -RUN chmod +x /start.sh - -COPY ./gunicorn_conf.py /gunicorn_conf.py - -COPY ./app /app -WORKDIR /app/ - -ENV PYTHONPATH=/app - -EXPOSE 80 - -ENTRYPOINT ["/entrypoint.sh"] - -# Run the start script, it will check for an /app/prestart.sh script (e.g. for migrations) -# And then will start Gunicorn with Meinheld -CMD ["/start.sh"] diff --git a/pyproject.toml b/pyproject.toml index a0ecb51..413fbfe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Sebastián Ramírez "] license = "MIT" [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" docker = "^5.0.3" pytest = "^7.0.1" diff --git a/scripts/process_all.py b/scripts/process_all.py index 1d4ead3..13b8755 100644 --- a/scripts/process_all.py +++ b/scripts/process_all.py @@ -7,11 +7,9 @@ {"NAME": "python3.9", "PYTHON_VERSION": "3.9"}, {"NAME": "python3.8", "PYTHON_VERSION": "3.8"}, {"NAME": "python3.7", "PYTHON_VERSION": "3.7"}, - {"NAME": "python3.6", "PYTHON_VERSION": "3.6"}, {"NAME": "python3.9-alpine3.13", "PYTHON_VERSION": "3.9"}, {"NAME": "python3.8-alpine3.11", "PYTHON_VERSION": "3.8"}, {"NAME": "python3.7-alpine3.8", "PYTHON_VERSION": "3.7"}, - {"NAME": "python3.6-alpine3.8", "PYTHON_VERSION": "3.6"}, ] start_with = os.environ.get("START_WITH")