From 20ec2c8b99a474843379b3e961b4d3525aacc0a1 Mon Sep 17 00:00:00 2001 From: Jhony Avella Date: Mon, 29 Apr 2024 11:28:19 -0500 Subject: [PATCH 1/2] feat: adding python 3.12 support (#36) * feat: adding first version of Dockerfile Python3.12 compatible * ci: add python 3.12 checks --- .github/workflows/test.yml | 11 +++++++---- .../templates/notes/build/notes/Dockerfile | 19 ++++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 829f613..428a7b4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,12 +7,15 @@ on: jobs: tests: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.8', '3.12'] steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: ${{ matrix.python-version }} - name: Upgrade pip run: python -m pip install --upgrade pip setuptools - name: Install dependencies diff --git a/tutornotes/templates/notes/build/notes/Dockerfile b/tutornotes/templates/notes/build/notes/Dockerfile index d977fc3..d78dfae 100644 --- a/tutornotes/templates/notes/build/notes/Dockerfile +++ b/tutornotes/templates/notes/build/notes/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.4 -FROM docker.io/ubuntu:20.04 +FROM docker.io/python:3.12-slim-bookworm ENV DEBIAN_FRONTEND=noninteractive RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ @@ -7,14 +7,15 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ apt update && \ apt upgrade -y && \ apt install -y \ - language-pack-en \ + locales \ git \ - python3 \ - python3-pip \ - python3-venv \ - libmysqlclient-dev \ - pkg-config -RUN ln -s /usr/bin/python3 /usr/bin/python + python3-dev \ + build-essential \ + default-libmysqlclient-dev \ + pkg-config && \ + sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ + locale-gen +ENV LC_ALL en_US.UTF-8 ###### Git-clone Notes repo ###### ARG APP_USER_ID=1000 @@ -30,7 +31,7 @@ ENV PATH /app/venv/bin:${PATH} # https://pypi.org/project/setuptools/ # https://pypi.org/project/pip/ # https://pypi.org/project/wheel/ -RUN --mount=type=cache,target=/app/.cache/pip,sharing=shared pip install setuptools==68.2.2 pip==23.2.1 wheel==0.41.2 +RUN --mount=type=cache,target=/app/.cache/pip,sharing=shared pip install setuptools==69.2.0 pip==24.0 wheel==0.43.0 RUN --mount=type=cache,target=/app/.cache/pip,sharing=shared pip install -r requirements/base.txt EXPOSE 8000 From 6d3685a5733666f22483c7ef3dfc6fd14c9c5342 Mon Sep 17 00:00:00 2001 From: jfavellar90 Date: Thu, 9 May 2024 19:08:10 -0500 Subject: [PATCH 2/2] feat: upgrade to redwood --- CHANGELOG.md | 8 ++++++++ README.rst | 4 ++-- changelog.d/20240212_115536_regis_pkg_resources.md | 1 - setup.py | 4 ++-- tutornotes/__about__.py | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) delete mode 100644 changelog.d/20240212_115536_regis_pkg_resources.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a2fe25..d189b79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,14 @@ instructions, because git commits are used to generate release notes: + +## v18.0.0 (2024-05-09) + +- [Bugfix] Make plugin compatible with Python 3.12 by removing dependency on `pkg_resources`. (by @regisb) + +- 💥[Feature] Upgrade Python version to 3.12.3. (by @jfavellar90) +- 💥[Feature] Upgrade to Redwood. (by @jfavellar90) + ## v17.0.0 (2023-12-09) diff --git a/README.rst b/README.rst index c9538e6..88efce5 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,9 @@ Students notes plugin for `Tutor `_ =================================================================== -This is a plugin for `Tutor `_ to easily add the `Open edX note-taking app `_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation `_). +This is a plugin for `Tutor `_ to easily add the `Open edX note-taking app `_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation `_). -.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-quince.master/_images/SFD_SN_bodyexample.png +.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-redwood.master/_images/SFD_SN_bodyexample.png :alt: Notes in action Installation diff --git a/changelog.d/20240212_115536_regis_pkg_resources.md b/changelog.d/20240212_115536_regis_pkg_resources.md deleted file mode 100644 index 35b6d20..0000000 --- a/changelog.d/20240212_115536_regis_pkg_resources.md +++ /dev/null @@ -1 +0,0 @@ -- [Bugfix] Make plugin compatible with Python 3.12 by removing dependency on `pkg_resources`. (by @regisb) diff --git a/setup.py b/setup.py index 91aa9e8..b5c7b88 100644 --- a/setup.py +++ b/setup.py @@ -32,8 +32,8 @@ packages=find_packages(exclude=["tests*"]), include_package_data=True, python_requires=">=3.8", - install_requires=["tutor>=17.0.0,<18.0.0"], - extras_require={"dev": ["tutor[dev]>=17.0.0,<18.0.0"]}, + install_requires=["tutor>=18.0.0,<19.0.0"], + extras_require={"dev": ["tutor[dev]>=18.0.0,<19.0.0"]}, entry_points={"tutor.plugin.v1": ["notes = tutornotes.plugin"]}, classifiers=[ "Development Status :: 5 - Production/Stable", diff --git a/tutornotes/__about__.py b/tutornotes/__about__.py index a08b09c..c6a8b8e 100644 --- a/tutornotes/__about__.py +++ b/tutornotes/__about__.py @@ -1 +1 @@ -__version__ = "17.0.0" +__version__ = "18.0.0"