Python 3.11 Support

This commit is contained in:
BJ Dierkes 2022-11-07 09:24:03 -06:00
parent 71d432b12e
commit 317804d3d2
8 changed files with 45 additions and 7 deletions

View File

@ -17,6 +17,9 @@ matrix:
- python: "3.10"
dist: "focal"
sudo: true
- python: "3.11"
dist: "focal"
sudo: true
services:
- memcached
- redis-server

View File

@ -19,7 +19,9 @@ Refactoring:
Misc:
- None
- `[dev]` Add Smoke tests for Python 3.11
- `[dev]` Make Python 3.11 the default dev target
- `[docker]` Base official Docker image on Python 3.11
Deprecations:

View File

@ -1,4 +1,4 @@
FROM python:3.10-alpine
FROM python:3.11-alpine
LABEL MAINTAINER="BJ Dierkes <derks@datafolklabs.com>"
ENV PS1="\[\e[0;33m\]|> cement <| \[\e[1;35m\]\W\[\e[0m\] \[\e[0m\]# "
WORKDIR /src

View File

@ -76,11 +76,10 @@ The latest stable version of Python 3 is the default, and target version accessi
$ docker-compose ps
Name Command State Ports
-------------------------------------------------------------------------
cement_cement-py35_1 /bin/bash Up
cement_cement-py36_1 /bin/bash Up
cement_cement-py37_1 /bin/bash Up
cement_cement-py38_1 /bin/bash Up
cement_cement-py39_1 /bin/bash Up
cement_cement-py310_1 /bin/bash Up
cement_cement_1 /bin/bash Up
cement_memcached_1 docker-entrypoint.sh memcached Up 11211/tcp
cement_redis_1 docker-entrypoint.sh redis ... Up 6379/tcp

View File

@ -56,6 +56,13 @@ services:
build:
context: .
dockerfile: docker/Dockerfile.dev-py39
cement-py310:
<<: *DEFAULTS
image: "cement:dev-py310"
build:
context: .
dockerfile: docker/Dockerfile.dev-py310
redis:
image: redis:latest

View File

@ -1,4 +1,4 @@
FROM python:3.10-alpine
FROM python:3.11-alpine
LABEL MAINTAINER="BJ Dierkes <derks@datafolklabs.com>"
ENV PS1="\[\e[0;33m\]|> cement <| \[\e[1;35m\]\W\[\e[0m\] \[\e[0m\]# "

View File

@ -0,0 +1,27 @@
FROM python:3.11-alpine
LABEL MAINTAINER="BJ Dierkes <derks@datafolklabs.com>"
ENV PS1="\[\e[0;33m\]|> cement-py310 <| \[\e[1;35m\]\W\[\e[0m\] \[\e[0m\]# "
WORKDIR /src
COPY requirements-dev.txt /src/
RUN apk update \
&& apk add libmemcached-dev \
gcc \
musl-dev \
cyrus-sasl-dev \
zlib-dev \
make \
vim \
bash \
git \
libffi \
libffi-dev \
openssl-dev \
jq \
&& ln -sf /usr/bin/vim /usr/bin/vi \
&& pip install --no-cache-dir -r requirements-dev.txt \
&& pip install --upgrade -r requirements-dev.txt
COPY . /src
COPY docker/vimrc /root/.vimrc
RUN python setup.py develop
CMD ["/bin/bash"]

View File

@ -1,8 +1,8 @@
#!/bin/bash
set -e
CEMENT_VERSION="3.0"
PYTHON_VERSIONS="3.7 3.8 3.9 3.10"
[ -z "$CEMENT_VERSION" ] && CEMENT_VERSION="3.0"
[ -z "$PYTHON_VERSIONS" ] && PYTHON_VERSIONS="3.7 3.8 3.9 3.10 3.11"
function smoke-test {
pyver=$1