bump python to <=3.9, bump d.py to ~=1.6.0

fixes #361
This commit is contained in:
Abigail G 2021-03-17 23:10:57 -04:00
parent 3a5ce9f1c0
commit 361d4f894e
No known key found for this signature in database
GPG Key ID: 6BE0755918A4C7F5
8 changed files with 16 additions and 30 deletions

View File

@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@master
- uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.9
architecture: x64
- name: Install flake8
run: pip install flake8

View File

@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Renamed `?cond` to `?solar`.
- Reduced `?hamstudy` timeout to 5 minutes.
- Library used for QRZ lookups.
- Python>=3.9 now required.
### Fixed
- Weird image caching situation for `?greyline` on Discord's side.
- The help command was not using the prefix it was invoked with.

View File

@ -7,7 +7,7 @@
1. [Fork this repo][1] into your own GitHub namespace.
1. Make sure the `master` branch is up to date, then make yourself a new branch with a descriptive name.
1. Once the forked repo is cloned and on the proper branch, you can set up the development environment.
1. Install python 3.7 or higher.
1. Install python 3.9 or higher.
1. Run `make dev-install`.
This should install everything you need to develop and run qrm.
1. [Create a bot and token][2], and add it to `data/keys.py`.

View File

@ -1,4 +1,4 @@
FROM alpine:3.10
FROM python:3.9-slim
COPY . /app
WORKDIR /app
@ -6,35 +6,20 @@ WORKDIR /app
ENV PYTHON_BIN python3
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
g++ \
git \
gcc \
libxml2-dev \
libxslt-dev \
libressl-dev \
libffi-dev \
jpeg-dev \
zlib-dev \
python3-dev && \
apt-get update && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
libressl \
cairo \
libjpeg-turbo \
py3-lxml \
py3-pip \
python3 && \
apt-get install -y --no-install-recommends \
libcairo2 \
libjpeg62-turbo \
python-lxml \
&& \
echo "**** install pip packages ****" && \
pip3 install -U pip setuptools wheel && \
pip3 install -r requirements.txt && \
echo "**** clean up ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/root/.cache \
/tmp/* \
/var/cache/apk/*
/var/lib/apt/lists/*
CMD ["/bin/sh", "run.sh", "--pass-errors", "--no-botenv"]

View File

@ -12,7 +12,7 @@
# Those are the defaults; they can be over-ridden if specified
# at en environment level or as 'make' arguments.
BOTENV ?= botenv
PYTHON_BIN ?= python3.7
PYTHON_BIN ?= python3.9
PIP_OUTPUT ?= -q

View File

@ -14,7 +14,7 @@ See [README-DOCKER.md](./README-DOCKER.md)
### Without Docker
Requires Python 3.7 or newer.
Requires Python 3.9 or newer.
Prep the environment. For more information on extra options, see the [quick-bot-no-pain Makefile documentation](https://github.com/0x5c/quick-bot-no-pain/blob/master/docs/makefile.md).

View File

@ -1,4 +1,4 @@
discord.py~=1.5.0
discord.py~=1.6.0
ctyparser~=2.0
gridtools~=1.0
qrztools[async]~=1.0

4
run.sh
View File

@ -34,9 +34,9 @@ while [ ! -z "$1" ]; do
done
# If $PYTHON_BIN is not defined, default to 'python3.7'
# If $PYTHON_BIN is not defined, default to 'python3.9'
if [ $_NO_BOTENV -eq 1 -a -z "$PYTHON_BIN" ]; then
PYTHON_BIN='python3.7'
PYTHON_BIN='python3.9'
fi