Skip to content

chore: update minimum python version to 3.9 #138

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

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/container-local-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10.x'
python-version: '3.9.x'

- name: Install Dependencies
run: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/container-publish-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'
- "v*.*.*"

env:
REGISTRY: ghcr.io
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10.x'
python-version: "3.9.x"

- name: Install Dependencies
run: |
Expand Down Expand Up @@ -159,3 +159,4 @@ jobs:
# env:
# TAGS: ${{ steps.meta.outputs.tags }}
# COSIGN_EXPERIMENTAL: true

2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.9"

- name: Install Dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-local-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10.x"
python-version: "3.9.x"

- name: Install Dependencies
run: |
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/python-publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'
- "v*.*.*"

jobs:
deploy:
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10.x'
python-version: "3.9.x"

- name: Install dependencies
run: |
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Publish Package - ${{ github.ref_name }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
# skip-existing: true
# skip-existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

Expand All @@ -62,15 +62,15 @@ jobs:

test:
if: success()
needs: [ deploy ]
needs: [deploy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10.x'
python-version: "3.9.x"

- name: Install Remote Package
uses: nick-fields/retry@v3
Expand Down Expand Up @@ -113,3 +113,4 @@ jobs:
echo "Error: Scan test did not produce any results. Failing"
exit 1
fi

9 changes: 5 additions & 4 deletions .github/workflows/python-publish-testpypi.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish Python Package - TestPyPI
# This workflow will upload a TestPyPI Python Package using Twine on demand (dispatch)

on: [ workflow_dispatch ]
on: [workflow_dispatch]

permissions:
contents: read
Expand All @@ -15,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10.x'
python-version: "3.9.x"

- name: Install Dependencies
run: |
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:

test:
if: success()
needs: [ deploy ]
needs: [deploy]
runs-on: ubuntu-latest

steps:
Expand All @@ -65,7 +65,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10.x'
python-version: "3.9.x"

- name: Install Remote Package
run: |
Expand Down Expand Up @@ -101,3 +101,4 @@ jobs:
echo "Error: Scan test did not produce any results. Failing"
exit 1
fi

4 changes: 2 additions & 2 deletions .github/workflows/version-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
fetch-depth: "0"
token: ${{ secrets.SC_GH_TAG_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10.x'
python-version: "3.9.x"
- name: Determine Tag
id: taggerVersion
run: |
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Upcoming changes...

## [1.29.0] - 2025-07-15
### Changed
- Updated minimum Python version to 3.9

## [1.28.3] - 2025-07-14
### Fixed
- Fixed scanoss.json ingestion
Expand Down Expand Up @@ -604,3 +608,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[1.28.0]: https://github.com/scanoss/scanoss.py/compare/v1.27.1...v1.28.0
[1.28.1]: https://github.com/scanoss/scanoss.py/compare/v1.28.0...v1.28.1
[1.28.2]: https://github.com/scanoss/scanoss.py/compare/v1.28.1...v1.28.2
[1.29.0]: https://github.com/scanoss/scanoss.py/compare/v1.28.2...v1.29.0

2 changes: 1 addition & 1 deletion PACKAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ if __name__ == "__main__":
```

## Requirements
Python 3.7 or higher.
Python 3.9 or higher.

## Source code
The source for this package can be found [here](https://github.com/scanoss/scanoss.py).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To leverage the CLI from within a container, please look at [GHCR.md](GHCR.md).
Before starting with development of this project, please read our [CONTRIBUTING](CONTRIBUTING.md) and [CODE OF CONDUCT](CODE_OF_CONDUCT.md).

### Requirements
Python 3.7 or higher.
Python 3.9 or higher.

The dependencies can be found in the [requirements.txt](requirements.txt) and [requirements-dev.txt](requirements-dev.txt) files.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To install (from `pypi.org <https://pypi.org/project/scanoss/>`_), run: ``pip3 i
Requirements
------------

Python 3.7 or higher.
Python 3.9 or higher.

The dependencies can be found in the `requirements.txt <https://github.com/scanoss/scanoss.py/blob/main/requirements.txt>`_ and `requirements-dev.txt <https://github.com/scanoss/scanoss.py/blob/main/requirements-dev.txt>`_ files.

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ build-backend = "setuptools.build_meta"
# Enable pycodestyle (E), pyflakes (F), isort (I), pylint (PL)
select = ["E", "F", "I", "PL"]
line-length = 120
# Assume Python 3.7+
target-version = "py37"
# Assume Python 3.9+
target-version = "py39"
exclude = [
"tests/*",
"test_*.py",
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ packages = find_namespace:
package_dir =
= src
include_package_data = True
python_requires = >=3.7
python_requires = >=3.9
install_requires =
requests
crc32c>=2.2
Expand Down
2 changes: 1 addition & 1 deletion src/scanoss/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
THE SOFTWARE.
"""

__version__ = '1.28.3'
__version__ = '1.29.0'
8 changes: 4 additions & 4 deletions src/scanoss/cyclonedx.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ def __init__(self, debug: bool = False, output_file: str = None):
self.debug = debug
self._spdx = SpdxLite(debug=debug)

def parse(self, data: json): # noqa: PLR0912, PLR0915
def parse(self, data: dict): # noqa: PLR0912, PLR0915
"""
Parse the given input (raw/plain) JSON string and return CycloneDX summary
:param data: json - JSON object
:param data: dict - JSON object
:return: CycloneDX dictionary, and vulnerability dictionary
"""
if not data:
Expand Down Expand Up @@ -170,12 +170,12 @@ def produce_from_file(self, json_file: str, output_file: str = None) -> bool:
success = self.produce_from_str(f.read(), output_file)
return success

def produce_from_json(self, data: json, output_file: str = None) -> tuple[bool, json]: # noqa: PLR0912
def produce_from_json(self, data: dict, output_file: str = None) -> tuple[bool, dict]: # noqa: PLR0912
"""
Produce the CycloneDX output from the raw scan results input data

Args:
data (json): JSON object
data (dict): JSON object
output_file (str, optional): Output file (optional). Defaults to None.

Returns:
Expand Down