diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31f65a47..9126b43a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.12" - name: Install python-ldap OS dependencies run: sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 5399ec03..19c47475 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,7 +8,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.10" + python: "3.12" # Optionally declare the Python requirements required to build your docs python: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index abbb04b3..094a4f1c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,9 @@ Release notes ### Version 5.1.0-dev +- Upgrade Python version to 3.12 + https://github.com/nexB/dejacode/issues/50 + - Replace Celery by RQ for async job queue and worker. https://github.com/nexB/dejacode/issues/6 diff --git a/Dockerfile b/Dockerfile index b550c725..ae305d06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ # See https://aboutcode.org for more information about AboutCode FOSS projects. # -FROM python:3.10-slim +FROM python:3.12-slim LABEL org.opencontainers.image.source="https://github.com/nexB/dejacode" LABEL org.opencontainers.image.description="DejaCode" diff --git a/Makefile b/Makefile index 54fdbed5..188ec7c0 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # See https://aboutcode.org for more information about AboutCode FOSS projects. # -PYTHON_EXE=python3.10 +PYTHON_EXE=python3.12 MANAGE=bin/python manage.py ACTIVATE?=. bin/activate; PIP_ARGS=--find-links=./thirdparty/dist/ --no-index --no-cache-dir diff --git a/component_catalog/tests/test_models.py b/component_catalog/tests/test_models.py index 801af492..df93b1fd 100644 --- a/component_catalog/tests/test_models.py +++ b/component_catalog/tests/test_models.py @@ -2126,7 +2126,7 @@ def test_component_model_as_cyclonedx(self): self.component1.homepage_url = "https://homepage.url" self.component1.notice_text = "Notice" cyclonedx_data = self.component1.as_cyclonedx() - expected_repr = "" + expected_repr = "" self.assertEqual(expected_repr, repr(cyclonedx_data)) expected = { "aboutcode:homepage_url": "https://homepage.url", @@ -2150,8 +2150,8 @@ def test_package_model_as_cyclonedx(self): dataspace=self.dataspace, ) cyclonedx_data = package.as_cyclonedx() - expected_repr = "" - self.assertEqual(expected_repr, repr(cyclonedx_data)) + expected = "" + self.assertEqual(expected, repr(cyclonedx_data)) expected = { "aboutcode:download_url": "https://download.url", "aboutcode:filename": "package.zip", diff --git a/docs/doc_maintenance.rst b/docs/doc_maintenance.rst index d2e92911..73d8372e 100644 --- a/docs/doc_maintenance.rst +++ b/docs/doc_maintenance.rst @@ -28,7 +28,7 @@ That will create a /dejacode directory in your working directory. Now you can install the dependencies in a virtualenv:: cd dejacode - python3.10 -m venv . + python3.12 -m venv . source bin/activate Now you can build the HTML documents locally:: diff --git a/docs/installation.rst b/docs/installation.rst index 728ac6cb..e6245004 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -179,7 +179,7 @@ Pre-installation Checklist Before you install DejaCode, make sure you have the following prerequisites: -#. **Python: versions 3.10** found at https://www.python.org/downloads/ +#. **Python: versions 3.12** found at https://www.python.org/downloads/ #. **Git**: most recent release available at https://git-scm.com/ #. **PostgreSQL**: release 16 or later found at https://www.postgresql.org/ or https://postgresapp.com/ on macOS diff --git a/product_portfolio/tests/test_models.py b/product_portfolio/tests/test_models.py index 836b6ea4..c17c064c 100644 --- a/product_portfolio/tests/test_models.py +++ b/product_portfolio/tests/test_models.py @@ -724,8 +724,8 @@ def test_product_relationship_models_as_spdx(self): self.assertEqual(expected, pp1.as_spdx().as_dict()) def test_product_model_as_cyclonedx(self): - expected_repr = "" - self.assertEqual(expected_repr, repr(self.product1.as_cyclonedx())) + expected = "" + self.assertEqual(expected, repr(self.product1.as_cyclonedx())) def test_product_portfolio_scancode_project_model_can_start_import(self): scancode_project = ScanCodeProject.objects.create( diff --git a/setup.cfg b/setup.cfg index 7339b0e4..f4f5b30b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,7 +14,7 @@ classifiers = Intended Audience :: Legal Industry Programming Language :: Python Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.12 Topic :: Utilities keywords = open source @@ -41,7 +41,7 @@ license_files = NOTICE [options] -python_requires = >=3.10 +python_requires = >=3.12 packages=find: include_package_data = true zip_safe = false