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
2 changes: 1 addition & 1 deletion .github/actions/security-issues/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ runs:
- name: Install Python Toolbox / Security tool
shell: bash
run: |
pip install exasol-toolbox==6.4.0
pip install exasol-toolbox==7.0.0

- name: Create Security Issue Report
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions doc/changes/changelog.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions doc/changes/changes_7.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 7.0.0 - 2026-04-29

## Summary

In this major release, support for the `version.py`file has been removed. Users should:

- delete the `version.py` file
- add in their project's `__init__.py` module

```python
from importlib.metadata import version
__version__ = version("<package_name>")
```
This is required for the nox session `docs:multiversion` to successfully complete,
and it is a Python standard for users to check in the terminal which version they are
using.

The underlying code for the nox sessions `vulnerabilities:resolved` and
`release:prepare` have been modified so that all dependencies (`main`, in `groups`,
and in `optional groups`) are considered for the vulnerability report. Additionally,
we only consider a vulnerability resolved if `pip-audit` includes `fix_versions`
for the dependency. Previously, these nox sessions only reported the dependencies
of `main` and the transitive dependencies of `main`.

## Feature

* #803: Included other dependencies for local `pip-audit` check

## Refactoring

* #800: Removed tbx security pretty-print, tbx lint pretty-print, and creation of .lint.txt, as superseded by Sonar and .lint.json usage
* #791: Resolved Sonar concerns: accepted specific `subprocess` import usage, `subprocess` commands, & improved minor maintainability items
* #629: Replace `version.py` with version from the `__init__.py`
22 changes: 0 additions & 22 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
# Unreleased

## Summary

In this major release, support for the `version.py`file has been removed. Users should:
- delete the `version.py` file
- add in their project's `__init__.py` module

```python
from importlib.metadata import version
__version__ = version("<package_name>")
```
This is required for the nox session `docs:multiversion` to successfully complete,
and it is a Python standard for users to check in the terminal which version they are
using.

## Feature

* #803: Included other dependencies for local `pip-audit` check

## Refactoring

* #800: Removed tbx security pretty-print, tbx lint pretty-print, and creation of .lint.txt, as superseded by Sonar and .lint.json usage
* #791: Resolved Sonar concerns: accepted specific `subprocess` import usage, `subprocess` commands, & improved minor maintainability items
* #629: Replace `version.py` with version from the `__init__.py`
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: "(( minimum_python_version ))"
poetry-version: "(( dependency_manager_version ))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: "(( minimum_python_version ))"
poetry-version: "(( dependency_manager_version ))"
Expand Down
16 changes: 8 additions & 8 deletions exasol/toolbox/templates/github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: "(( minimum_python_version ))"
poetry-version: "(( dependency_manager_version ))"
Expand All @@ -42,7 +42,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: "(( minimum_python_version ))"
poetry-version: "(( dependency_manager_version ))"
Expand All @@ -67,7 +67,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: ${{ matrix.python-versions }}
poetry-version: "(( dependency_manager_version ))"
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: ${{ matrix.python-versions }}
poetry-version: "(( dependency_manager_version ))"
Expand All @@ -128,7 +128,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: ${{ matrix.python-versions }}
poetry-version: "(( dependency_manager_version ))"
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: "(( minimum_python_version ))"
poetry-version: "(( dependency_manager_version ))"
Expand All @@ -179,7 +179,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: "(( minimum_python_version ))"
poetry-version: "(( dependency_manager_version ))"
Expand All @@ -205,7 +205,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: ${{ matrix.python-versions }}
poetry-version: "(( dependency_manager_version ))"
Expand Down
2 changes: 1 addition & 1 deletion exasol/toolbox/templates/github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: "(( minimum_python_version ))"
poetry-version: "(( dependency_manager_version ))"
Expand Down
2 changes: 1 addition & 1 deletion exasol/toolbox/templates/github/workflows/matrix-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: "(( minimum_python_version ))"
poetry-version: "(( dependency_manager_version ))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: "(( minimum_python_version ))"
poetry-version: "(( dependency_manager_version ))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: "(( minimum_python_version ))"
poetry-version: "(( dependency_manager_version ))"
Expand Down
2 changes: 1 addition & 1 deletion exasol/toolbox/templates/github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: "(( minimum_python_version ))"
poetry-version: "(( dependency_manager_version ))"
Expand Down
2 changes: 1 addition & 1 deletion exasol/toolbox/templates/github/workflows/slow-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Set up Python & Poetry Environment
id: set-up-python-and-poetry-environment
uses: exasol/python-toolbox/.github/actions/python-environment@v6
uses: exasol/python-toolbox/.github/actions/python-environment@v7
with:
python-version: ${{ matrix.python-version }}
poetry-version: "(( dependency_manager_version ))"
Expand Down
4 changes: 3 additions & 1 deletion exasol/toolbox/util/dependencies/track_vulnerabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def resolved_vulnerabilities(self) -> list[Vulnerability]:
"""
matcher = VulnerabilityMatcher(self.current_vulnerabilities)
return [
vuln for vuln in self.previous_vulnerabilities if matcher.is_resolved(vuln)
vuln
for vuln in self.previous_vulnerabilities
if vuln.fix_versions and matcher.is_resolved(vuln)
]

def report_resolved_vulnerabilities(self) -> str:
Expand Down
2 changes: 1 addition & 1 deletion project-template/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author_email": "opensource@exasol.com",
"project_short_tag": "",
"python_version_min": "3.10",
"exasol_toolbox_version_range": ">=6.4.0,<7",
"exasol_toolbox_version_range": ">=7.0.0,<8",
"license_year": "{% now 'utc', '%Y' %}",
"__repo_name_slug": "{{cookiecutter.package_name}}",
"__package_name_slug": "{{cookiecutter.package_name}}",
Expand Down
14 changes: 14 additions & 0 deletions test/unit/util/dependencies/track_vulnerabilities_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,17 @@ def test_resolved_vulnerability(self, sample_vulnerability):
current_vulnerabilities=[],
)
assert audit.resolved_vulnerabilities == [sample_vulnerability.vulnerability]

def test_vulnerability_without_fix_version_is_not_reported_as_resolved(
self, sample_vulnerability
):
vuln = sample_vulnerability.vulnerability.model_copy(
update={"fix_versions": []}
)
audit = DependenciesAudit(
previous_vulnerabilities=[vuln],
current_vulnerabilities=[],
)

assert audit.resolved_vulnerabilities == []
assert audit.report_resolved_vulnerabilities() == ""