Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ['3.11']
python_version: ['3.11', '3.12']
ubuntu_version: ['22.04', '24.04']
tox_env: [ "django42", "django52"]
include:
- tox_env: quality
ubuntu_version: '24.04'
python_version: '3.11'
python_version: '3.12'

steps:
- uses: actions/checkout@v5
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ Unreleased

*

4.1.0 - 2025-11-04
******************

* Adds support for Python 3.12

4.0.0 - 2025-06-13
******************

Expand Down
20 changes: 17 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,24 @@ ENV TZ=Etc/UTC
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:deadsnakes/ppa && apt-get update && apt-get upgrade -y
RUN apt-get install -y vim python${python_version} python${python_version}-dev python${python_version}-distutils
# ---------------------------------------------------------------------------
# - The "distutils" module was removed in Python 3.12 (PEP 632).
# - To ensure virtualenv creation still works, we now prefer python3-venv instead.
# - Older Python versions (e.g., 3.11) still support distutils, so we keep the
# fallback to install python3-distutils if needed.
# ---------------------------------------------------------------------------
RUN apt-get install -y vim python${python_version} python${python_version}-dev python${python_version}-venv || \
apt-get install -y vim python${python_version} python${python_version}-dev python3-distutils
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this because 3.12 doesn't have a -venv package? Can you add a comment in this file explaining why this || install is happening?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python 3.12 doesn't have distutils package. I've added comments for these changes.

RUN apt-get install -y sudo git make curl build-essential
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python${python_version}
RUN pip install virtualenv
# ---------------------------------------------------------------------------
# - Ubuntu 24.04 enforces "externally-managed-environment" per PEP 668,
# which prevents pip from modifying system packages by default.
# - We explicitly add "--break-system-packages" to allow pip installs inside
# the container environment (since it's isolated anyway).
# ---------------------------------------------------------------------------
RUN curl -sS https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python${python_version} get-pip.py --break-system-packages && rm get-pip.py
RUN pip install virtualenv --break-system-packages

# Define Environment Variables
ENV CODEJAIL_GROUP=sandbox
Expand Down
3 changes: 2 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ This library currently is tested to work with the following versions
Python:

* 3.11
* 3.12

Ubuntu:

Expand Down Expand Up @@ -80,7 +81,7 @@ Other details here that depend on your configuration:

1. Create the new virtualenv, using ``--copies`` so that there's a distinct Python executable to limit::

$ sudo python3.11 -m venv --copies <SANDENV>
$ sudo python3.12 -m venv --copies <SANDENV>

By default, the virtualenv would just symlink against the system Python, and apparmor's default configuration on some operating systems may prevent confinement from being appled to that.

Expand Down
2 changes: 1 addition & 1 deletion codejail/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""init"""

__version__ = '4.0.0'
__version__ = '4.1.0'
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import re

from setuptools import find_packages, setup
from setuptools import find_packages, setup # pylint: disable=import-error

with open('README.rst') as readme:
long_description = readme.read()
Expand Down Expand Up @@ -51,7 +51,7 @@ def get_version(*file_paths):
"Intended Audience :: Developers",
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
],
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = django{42,52}
envlist = django{42,52},quality

[testenv]
passenv =
Expand Down