Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INTERNAL] Upgrade to Python3.9 #429

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8"]
python-version: ["3.9"]

services:
mysql:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
python-version: ["3.6"]
python-version: ["3.9"]

steps:
- uses: actions/checkout@v3
Expand All @@ -28,6 +28,8 @@ jobs:

- name: Build Docs
run: make docs
env:
SYSTEM_PYTHON: python${{ matrix.python-version }}

- name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
Expand Down
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.6.9-alpine
FROM python:3.9-alpine
LABEL maintainer=paul.traylor@linecorp.com

ENV PYTHONDONTWRITEBYTECODE 1
Expand All @@ -9,14 +9,14 @@ ENV PROMGEN_CONFIG_DIR=/etc/promgen
RUN adduser -D -u 1000 promgen promgen

# Upgrade Pip
RUN pip install --no-cache-dir -U pip==20.0.2
RUN pip install --no-cache-dir -U pip~=23.2

# Install MySQL Support
RUN set -ex \
&& apk add --no-cache mariadb-dev \
&& apk add --no-cache --virtual build-deps build-base \
&& pip --no-cache-dir install mysqlclient \
&& apk del build-deps
&& apk del build-deps

# Install Postgres Support
RUN set -ex \
Expand All @@ -35,7 +35,10 @@ COPY --from=prom/prometheus:v2.26.0 /bin/promtool /usr/local/bin/promtool

COPY docker/requirements.txt /tmp/requirements.txt

RUN pip install --no-cache-dir -r /tmp/requirements.txt
RUN set -ex \
&& apk add --no-cache --virtual build-deps build-base libffi-dev \
&& pip install --no-cache-dir -r /tmp/requirements.txt \
&& apk del build-deps

COPY docker/docker-entrypoint.sh /
COPY setup.py /usr/src/app/setup.py
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CELERY_BIN := $(ENV_DIR)/bin/celery
SPHINX := $(ENV_DIR)/bin/sphinx-build

DOCKER_TAG := promgen:local
SYSTEM_PYTHON ?= python3.6
SYSTEM_PYTHON ?= python3.9

# Help 'function' taken from
# https://gist.github.com/prwhite/8168133#gistcomment-2278355
Expand Down
40 changes: 4 additions & 36 deletions docker/requirements.in
Original file line number Diff line number Diff line change
@@ -1,36 +1,4 @@
amqp==2.5.1
atomicwrites==1.3.0
billiard==3.6.1.0
celery[redis]==4.3.0
certifi==2019.9.11
chardet==3.0.4
defusedxml==0.6.0 ; python_version >= '3.0'
django-environ==0.4.5
django-filter==2.4.0
Django==3.2.13
djangorestframework==3.11.2
envdir==1.0.1
gunicorn==19.9.0
idna==2.8
importlib-metadata==0.23
kombu==4.6.3
oauthlib==3.1.0
prometheus-client==0.12.0
pyjwt==1.7.1
python-dateutil==2.8.0
python3-openid==3.1.0 ; python_version >= '3.0'
pytz==2021.3
pyyaml==5.4
redis==3.2.1
requests-oauthlib==1.2.0
requests==2.25.1
sentry_sdk==1.5.12
setuptools>=39.2.0
six==1.12.0
social-auth-app-django==3.1.0
social-auth-core==3.2.0
sqlparse==0.3.0
urllib3==1.26.5
vine==1.3.0
whitenoise==5.2.0
zipp==0.6.0
gunicorn # Need gunicorn for running in docker
# mysqlclient==1.4.1 # Installed manually for dependencies
sentry_sdk<1.20.0 # Still using Sentry 9
whitenoise # Need whitenoise for serving files
119 changes: 27 additions & 92 deletions docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,160 +1,95 @@
#
# This file is autogenerated by pip-compile with python 3.6
# To update, run:
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile --no-emit-index-url --output-file=docker/requirements.txt docker/requirements.in setup.py
#
amqp==2.5.1
# via
# -r docker/requirements.in
# kombu
# via kombu
asgiref==3.4.1
# via django
atomicwrites==1.3.0
# via
# -r docker/requirements.in
# promgen (setup.py)
# via promgen (setup.py)
billiard==3.6.1.0
# via
# -r docker/requirements.in
# celery
celery[redis]==4.3.0
# via
# -r docker/requirements.in
# promgen (setup.py)
# via celery
celery==4.3.0
# via promgen (setup.py)
certifi==2019.9.11
# via
# -r docker/requirements.in
# requests
# sentry-sdk
chardet==3.0.4
# via requests
defusedxml==0.6.0
# via
# -r docker/requirements.in
# requests
defusedxml==0.6.0 ; python_version >= "3.0"
# via
# -r docker/requirements.in
# python3-openid
# social-auth-core
django==3.2.13
django==3.2.20
# via
# -r docker/requirements.in
# django-filter
# djangorestframework
# promgen (setup.py)
django-environ==0.4.5
# via
# -r docker/requirements.in
# promgen (setup.py)
# via promgen (setup.py)
django-filter==2.4.0
# via
# -r docker/requirements.in
# promgen (setup.py)
# via promgen (setup.py)
djangorestframework==3.11.2
# via
# -r docker/requirements.in
# promgen (setup.py)
# via promgen (setup.py)
envdir==1.0.1
# via
# -r docker/requirements.in
# promgen (setup.py)
# via promgen (setup.py)
gunicorn==19.9.0
# via -r docker/requirements.in
idna==2.8
# via
# -r docker/requirements.in
# requests
importlib-metadata==0.23
# via -r docker/requirements.in
# via requests
kombu==4.6.3
# via
# -r docker/requirements.in
# celery
# promgen (setup.py)
more-itertools==8.14.0
# via zipp
oauthlib==3.1.0
# via
# -r docker/requirements.in
# requests-oauthlib
# social-auth-core
prometheus-client==0.12.0
# via
# -r docker/requirements.in
# promgen (setup.py)
# via promgen (setup.py)
pyjwt==1.7.1
# via
# -r docker/requirements.in
# social-auth-core
# via social-auth-core
python-dateutil==2.8.0
# via
# -r docker/requirements.in
# promgen (setup.py)
python3-openid==3.1.0 ; python_version >= "3.0"
# via
# -r docker/requirements.in
# social-auth-core
# via promgen (setup.py)
python3-openid==3.1.0
# via social-auth-core
pytz==2021.3
# via
# -r docker/requirements.in
# celery
# django
pyyaml==5.4
# via
# -r docker/requirements.in
# promgen (setup.py)
redis==3.2.1
# via
# -r docker/requirements.in
# celery
pyyaml==6.0.1
# via promgen (setup.py)
requests==2.25.1
# via
# -r docker/requirements.in
# promgen (setup.py)
# requests-oauthlib
# social-auth-core
requests-oauthlib==1.2.0
# via
# -r docker/requirements.in
# social-auth-core
sentry_sdk==1.5.12
# via social-auth-core
sentry-sdk==1.9.0
# via -r docker/requirements.in
six==1.12.0
# via
# -r docker/requirements.in
# python-dateutil
# social-auth-app-django
# social-auth-core
social-auth-app-django==3.1.0
# via
# -r docker/requirements.in
# promgen (setup.py)
# via promgen (setup.py)
social-auth-core==3.2.0
# via
# -r docker/requirements.in
# social-auth-app-django
# via social-auth-app-django
sqlparse==0.3.0
# via
# -r docker/requirements.in
# django
typing-extensions==4.1.1
# via asgiref
# via django
urllib3==1.26.5
# via
# -r docker/requirements.in
# requests
# sentry-sdk
vine==1.3.0
# via
# -r docker/requirements.in
# amqp
# celery
whitenoise==5.2.0
# via -r docker/requirements.in
zipp==0.6.0
# via
# -r docker/requirements.in
# importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,20 @@ project_urls =
Documentation = https://line.github.io/promgen/

[options]
python_requires = >=3.9
packages = find:
install_requires =
atomicwrites==1.3.0
celery==4.3.0
django-environ
django-filter
Django>=3.2,<4.0
Django~=3.2
djangorestframework==3.11.2
envdir
kombu==4.6.3
prometheus-client
python-dateutil==2.8.0
pyyaml==5.4
pyyaml
requests==2.25.1
social-auth-app-django >= 2.0.0
include_package_data = True
Expand Down