Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Python 3.12 #57

Merged
merged 2 commits into from
Feb 23, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions component_catalog/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<Component group=None, name=a, version=1.0, type=library>"
expected_repr = "<Component group=None, name=a, version=1.0, type=ComponentType.LIBRARY>"
self.assertEqual(expected_repr, repr(cyclonedx_data))
expected = {
"aboutcode:homepage_url": "https://homepage.url",
Expand All @@ -2150,8 +2150,8 @@ def test_package_model_as_cyclonedx(self):
dataspace=self.dataspace,
)
cyclonedx_data = package.as_cyclonedx()
expected_repr = "<Component group=None, name=curl, version=7.50.3-1, type=library>"
self.assertEqual(expected_repr, repr(cyclonedx_data))
expected = "<Component group=None, name=curl, version=7.50.3-1, type=ComponentType.LIBRARY>"
self.assertEqual(expected, repr(cyclonedx_data))
expected = {
"aboutcode:download_url": "https://download.url",
"aboutcode:filename": "package.zip",
Expand Down
2 changes: 1 addition & 1 deletion docs/doc_maintenance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions product_portfolio/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<Component group=None, name=Product1, version=, type=application>"
self.assertEqual(expected_repr, repr(self.product1.as_cyclonedx()))
expected = "<Component group=None, name=Product1, version=, type=ComponentType.APPLICATION>"
self.assertEqual(expected, repr(self.product1.as_cyclonedx()))

def test_product_portfolio_scancode_project_model_can_start_import(self):
scancode_project = ScanCodeProject.objects.create(
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading