Skip to content

[issue-839] Drop Python 3.7 support and fix CI pipeline issues #841

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
8 changes: 1 addition & 7 deletions .github/workflows/check_codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
exclude: # see https://github.com/actions/runner-images/issues/9770#issuecomment-2085623315
- python-version: "3.7"
os: macos-latest
include:
- python-version: "3.7"
os: macos-13
python-version: [ "3.8", "3.9", "3.10", "3.11" ]

steps:
- uses: actions/checkout@v3
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/install_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
exclude: # see https://github.com/actions/runner-images/issues/9770#issuecomment-2085623315
- python-version: "3.7"
os: macos-latest
include:
- python-version: "3.7"
os: macos-13
python-version: [ "3.8", "3.9", "3.10", "3.11" ]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.8'
- name: Set up dependencies
run: |
python -m pip install --upgrade pip
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,21 @@ classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
urls = { Homepage = "https://github.com/spdx/tools-python" }
requires-python = ">=3.7"
requires-python = ">=3.8"
dependencies = ["click", "pyyaml", "xmltodict", "rdflib", "beartype", "uritools", "license_expression", "ply", "semantic_version"]
dynamic = ["version"]

[project.optional-dependencies]
test = ["pytest", "pyshacl", "tzdata"]
code_style = ["isort", "black", "flake8"]
graph_generation = ["pygraphviz", "networkx"]
development = ["black", "flake8", "isort", "networkx", "pytest"]
development = ["black", "flake8", "isort", "networkx", "pytest", "pyshacl"]

[project.scripts]
pyspdxtools = "spdx_tools.spdx.clitools.pyspdxtools:main"
Expand Down
4 changes: 2 additions & 2 deletions src/spdx_tools/common/typing/dataclass_with_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from dataclasses import dataclass

from beartype import beartype
from beartype.roar import BeartypeCallHintException
from beartype.roar import BeartypeCallHintParamViolation

Comment on lines 5 to 8
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this relate to #844, does this change fix the issue mentioned there?


def dataclass_with_properties(cls):
Expand All @@ -30,7 +30,7 @@ def set_field(self, value: field_type):
def set_field_with_error_conversion(self, value: field_type):
try:
set_field(self, value)
except BeartypeCallHintException as err:
except BeartypeCallHintParamViolation as err:
error_message: str = f"SetterError {self.__class__.__name__}: {err}"

# As setters are created dynamically, their argument name is always "value". We replace it by the
Expand Down
2 changes: 1 addition & 1 deletion src/spdx_tools/spdx/parser/jsonlikedict/snippet_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def validate_pointer_and_get_type(pointer: Dict) -> RangeType:

@staticmethod
def convert_range_from_str(
_range: Tuple[Union[int, str], Union[int, str]]
_range: Tuple[Union[int, str], Union[int, str]],
) -> Tuple[Union[int, str], Union[int, str]]:
# XML does not support integers, so we have to convert from string (if possible)
if not _range:
Expand Down
2 changes: 1 addition & 1 deletion src/spdx_tools/spdx3/bump_from_spdx2/relationship.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def bump_relationship(


def determine_completeness_and_to(
related_spdx_element_id: Union[str, SpdxNone, SpdxNoAssertion]
related_spdx_element_id: Union[str, SpdxNone, SpdxNoAssertion],
) -> Tuple[Optional[RelationshipCompleteness], List[str]]:
if isinstance(related_spdx_element_id, SpdxNoAssertion):
completeness = RelationshipCompleteness.NOASSERTION
Expand Down
4 changes: 2 additions & 2 deletions src/spdx_tools/spdx3/writer/console/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-FileCopyrightText: 2023 spdx contributors
#
# SPDX-License-Identifier: Apache-2.0
""" This is a temporary package to write the implemented model of spdx_tools.spdx3.0 to console. As soon as
serialization formats are properly defined this package can be deleted."""
"""This is a temporary package to write the implemented model of spdx_tools.spdx3.0 to console. As soon as
serialization formats are properly defined this package can be deleted."""
Loading