Skip to content

Commit

Permalink
Merge pull request #86 from unicef/feature/py3.9
Browse files Browse the repository at this point in the history
py3.9
  • Loading branch information
domdinicola authored Oct 27, 2020
2 parents 7a3ca5b + 3c06db2 commit 1700bd2
Show file tree
Hide file tree
Showing 11 changed files with 79 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dist: xenial
language: python

python:
- 3.8
- 3.9

env:
global:
Expand Down
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Release 1.5
----------------
* python 3.9


Release 1.4
----------------
* added new relic
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ uwsgi = "*"
django-picklefield = "*"

[requires]
python_version = "3.8"
python_version = "3.9"
110 changes: 55 additions & 55 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=1.4
ARG BASE_IMAGE=1.5

FROM unicef/donor-reporting-portal-backend:${BASE_IMAGE}-base

Expand Down
16 changes: 8 additions & 8 deletions docker/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8.2-alpine3.10
FROM python:3.9.0-alpine3.12

ARG PIPENV_ARGS

Expand Down Expand Up @@ -78,15 +78,15 @@ RUN cd /code \
&& pipenv install --verbose --system --deploy --ignore-pipfile $PIPENV_ARGS \
&& sha1sum Pipfile.lock > /CHECKSUM

# need to removes some code not py3.8 compliant
RUN rm -fr /usr/local/lib/python3.8/site-packages/psycopg2/tests/* \
/usr/local/lib/python3.8/site-packages/tornado/test/* \
/usr/local/lib/python3.8/site-packages/pipenv/patched/yaml2/*
# need to removes some code not py3.9 compliant
RUN rm -fr /usr/local/lib/python3.9/site-packages/psycopg2/tests/* \
/usr/local/lib/python3.9/site-packages/tornado/test/* \
/usr/local/lib/python3.9/site-packages/pipenv/patched/yaml2/*

# before compile site-packages
RUN find /usr/local/lib/python3.8/ -name *.pyc | xargs rm -f \
&& python -O -m compileall -fqb /usr/local/lib/python3.8 \
&& find /usr/local/lib/python3.8/ -name *.py | xargs rm -f
RUN find /usr/local/lib/python3.9/ -name *.pyc | xargs rm -f \
&& python -O -m compileall -fqb /usr/local/lib/python3.9 \
&& find /usr/local/lib/python3.9/ -name *.py | xargs rm -f

RUN apk del .fetch-deps .build-deps .build-deps-edge .donor_reporting_portal-build-deps \
&& rm -rf /var/cache/apk/* \
Expand Down
8 changes: 4 additions & 4 deletions docker/Dockerfile.flat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8.2-alpine3.10
FROM python:3.9.0-alpine3.12

ARG BUILD_DATE
ARG PIPENV_ARGS
Expand Down Expand Up @@ -78,7 +78,7 @@ RUN pip install pip pipenv --upgrade

RUN set -ex \
ls -al /code \
&& find /usr/local/lib/python3.8/ -name *.pyc | xargs rm -f \
&& find /usr/local/lib/python3.9/ -name *.pyc | xargs rm -f \
&& pipenv install --verbose --system --deploy --ignore-pipfile $PIPENV_ARGS \
&& pip3 install . \
&& rm -fr /code
Expand Down Expand Up @@ -132,11 +132,11 @@ RUN rm -rf /var/cache/apk/* \
&& rm -fr /root/.cache/ \
&& rm -fr /usr/include/

RUN find /usr/local/lib/python3.8/ -name *.pyc | xargs rm -f \
RUN find /usr/local/lib/python3.9/ -name *.pyc | xargs rm -f \
&& python -O -m compileall -fqb /usr/local/lib/python3.6

# removes source files
RUN find /usr/local/lib/python3.8/ -name *.py | xargs rm -f
RUN find /usr/local/lib/python3.9/ -name *.py | xargs rm -f

ADD docker/entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ADD docker/wait-for-it.sh /usr/local/bin/wait-for-it.sh
Expand Down
2 changes: 1 addition & 1 deletion docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
DATABASE_URL?=
DOCKER_PASS?=
DOCKER_USER?=
TARGET?=1.4.0
TARGET?=1.5.0
BASE?=$(shell echo "${TARGET}" | sed "s/\([0-9]\)\.\([0-9]\)\.\(.*\)/\1.\2/g" )
# below vars are used internally
BUILD_OPTIONS?=
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Framework :: Django',
'Framework :: Django :: 3.0',
'Framework :: Flake8',
Expand Down
2 changes: 1 addition & 1 deletion src/donor_reporting_portal/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NAME = 'donor-reporting-portal'
VERSION = __version__ = '1.4'
VERSION = __version__ = '1.5'
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ envtmpdir={toxinidir}/build/{envname}/tmp
envlogdir={toxinidir}/build/{envname}/log

[testenv]
basepython=python3.8
basepython=python3.9
passenv =
PYTHONDONTWRITEBYTECODE
USER
Expand Down

0 comments on commit 1700bd2

Please sign in to comment.