diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a92238227..e2dbf7657 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,7 +9,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.9] + python-version: [3.12] steps: - name: Checkout code diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7c6872e44..0f53cfa74 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.12", "3.13"] steps: - name: Checkout code @@ -39,10 +39,10 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies run: make dev envfile - # Disable codestyle checks until we have cleaned up the code # - name: Validate code format # run: make check diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 88c6664d6..f791a2805 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -28,7 +28,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: 3.12 - name: Install pypa/build run: python -m pip install build --user diff --git a/.readthedocs.yml b/.readthedocs.yml index 683f3a82a..0133e7c07 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -9,7 +9,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.11" + python: "3.12" # Build PDF & ePub formats: diff --git a/Dockerfile b/Dockerfile index 1bd35b926..e3d6f6892 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ # See https://github.com/nexB/vulnerablecode for support or download. # See https://aboutcode.org for more information about nexB OSS projects -FROM python:3.9 +FROM python:3.12 WORKDIR /app diff --git a/Makefile b/Makefile index aaadfefa7..47ea23a14 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,13 @@ endif virtualenv: @echo "-> Bootstrap the virtualenv with PYTHON_EXE=${PYTHON_EXE}" - @${PYTHON_EXE} ${VIRTUALENV_PYZ} --never-download --no-periodic-update ${VENV} + @${PYTHON_EXE} -m venv ${VENV} + @$(MAKE) upgrade-tools + +upgrade-tools: + @echo "-> Upgrade pip / setuptools / wheel (Python 3.12 safe)" + @${VENV}/bin/python -m pip install --upgrade --force-reinstall \ + "pip>=24" "setuptools>=69" "wheel>=0.42" packaging conf: virtualenv @echo "-> Install dependencies" diff --git a/docker-compose.yml b/docker-compose.yml index 2f5879220..76b645560 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3" services: db: - image: postgres:13 + image: postgres:15 command: -c config_file=/etc/postgresql/postgresql.conf env_file: - docker.env diff --git a/requirements.txt b/requirements.txt index dbda64e0c..6788a34a5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ alabaster==0.7.12 asgiref==3.8.1 asttokens==2.0.5 async-timeout==4.0.2 -attrs==21.4.0 +attrs==23.2.0 Babel==2.9.1 backcall==0.2.0 bcrypt==3.2.0 @@ -23,11 +23,11 @@ coreschema==0.0.4 cryptography==44.0.1 crispy-bootstrap4==2024.1 cwe2==3.0.0 -dateparser==1.1.1 +dateparser==1.3.0 decorator==5.1.1 defusedxml==0.7.1 distro==1.7.0 -Django==4.2.25 +Django==5.2.11 django-altcha==0.2.0 django-crispy-forms==2.3 django-environ==0.11.2 @@ -48,24 +48,22 @@ GitPython==3.1.41 gunicorn==23.0.0 idna==3.3 imagesize==1.3.0 -importlib-metadata==4.11.3 iniconfig==1.1.1 ipython==8.10.0 isort==5.10.1 itypes==1.2.0 jedi==0.18.1 Jinja2==3.1.6 -jsonschema==3.2.0 +jsonschema==4.21.0 license-expression==30.3.1 -lxml==4.9.1 -Markdown==3.3.4 -markdown-it-py==3.0.0 +lxml==6.0.2 +Markdown==3.5.0 MarkupSafe==2.1.1 matplotlib-inline==0.1.3 multidict==6.0.2 mypy-extensions==0.4.3 packageurl-python==0.17.6 -packaging==21.3 +packaging==23.2 paramiko==3.4.0 parso==0.8.3 pathspec==0.9.0 @@ -76,7 +74,7 @@ platformdirs==2.5.1 pluggy==1.0.0 pprintpp==0.4.0 prompt-toolkit==3.0.30 -psycopg2-binary==2.9.3 +psycopg2-binary==2.9.11 ptyprocess==0.7.0 pure-eval==0.2.2 py==1.11.0 @@ -90,7 +88,7 @@ pytest==7.1.1 pytest-django==4.5.2 python-dateutil==2.8.2 python-dotenv==0.20.0 -pytz==2022.1 +pytz==2024.2 PyYAML==6.0.1 redis==5.0.1 requests==2.32.0 diff --git a/setup.cfg b/setup.cfg index c104497ab..83d7c96e4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -48,14 +48,14 @@ license_files = README.rst [options] -python_requires = >=3.9 +python_requires = >=3.12 packages=find: include_package_data = true zip_safe = false install_requires = - Django>=4.2.0,<=5.0 + Django>=5.2.11,<=6.0 psycopg2-binary>=2.8.6 djangorestframework>=3.15.0 django-extensions>=3.2.3 @@ -83,8 +83,8 @@ install_requires = toml>=0.10.2 lxml>=4.6.4 defusedxml>=0.7.1 - Markdown>=3.3.0 - dateparser>=1.1.1 + Markdown>=3.5.0 + dateparser>=1.3.0 cvss>=2.4 cwe2>=3.0.0 diff --git a/vulnerabilities/management/commands/export.py b/vulnerabilities/management/commands/export.py index 36323b04b..17ef4d99f 100644 --- a/vulnerabilities/management/commands/export.py +++ b/vulnerabilities/management/commands/export.py @@ -188,7 +188,7 @@ def packages_by_type_ns_name(): "fixing_vulnerabilities__weaknesses", "fixing_vulnerabilities__severities", ) - .iterator() + .iterator(chunk_size=1000) ) for tp_ns_name, packages in groupby(qs, key=by_purl_type_ns_name):