Skip to content

Commit ea676f5

Browse files
authored
🐛 Fix the python error appearing from python > 3.11 (#90)
<!-- Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved. SPDX-License-Identifier: Apache-2.0 --> ### Description :bug: Fix the python error appearing from python > 3.11 ### Test Coverage <!-- Please put an `x` in the correct box e.g. `[x]` to indicate the testing coverage of this change. --> - [x] This change is covered by existing or additional automated tests. - [ ] Manual testing has been performed (and evidence provided) as automated testing was not feasible. - [ ] Additional tests are not required for this change (e.g. documentation update).
1 parent 4213c0f commit ea676f5

File tree

126 files changed

+155
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+155
-138
lines changed

.github/ISSUE_TEMPLATE.md

+1-1

.github/PULL_REQUEST_TEMPLATE.md

+1-1

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
python_cache_macOS_path: ~/Library/Caches/pip
1111
python_cache_windows_path: ~\AppData\Local\pip\Cache
1212
python_cache_ubuntu_path: ~/.cache/pip
13-
pipenv_version: 2022.11.25
13+
pipenv_version: 2024.4.0
1414
python_version: '3.11'
1515

1616
jobs:
@@ -166,7 +166,7 @@ jobs:
166166
fail-fast: false
167167
matrix:
168168
os: [ubuntu-latest ] # FIXME add other platforms when much quicker macOS-latest, windows-latest]
169-
python-version: ["3.8", "3.9", "3.10", "3.11"]
169+
python-version: ["3.8", "3.9", "3.10", "3.11"] # FIXME Test on later python versions, "3.12", "3.13"]
170170
multi-platform:
171171
- ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }}
172172
# include:

CHANGELOG.md

+1-1

CODE_OF_CONDUCT.md

+1-1

CONTRIBUTING.md

+1-1

DEVELOPMENT.md

+1-1

KNOWN_ISSUES.md

+1-1

Pipfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ continuous-delivery-scripts = {editable = true, path = "."}
2222
allow_prereleases = false
2323

2424
[packages]
25-
continuous-delivery-scripts = {editable = true, path = "."}
2625
types-toml = "*"
2726
types-setuptools = "*"
27+
continuous-delivery-scripts = {file = ".", editable = true}

README.md

+1-1

continuous_delivery_scripts/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Scripts and utilities used by the CI pipeline."""

continuous_delivery_scripts/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2023 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""The version number is based on semantic versioning.

continuous_delivery_scripts/assert_news.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Checks if valid news files are created for changes in the project."""

continuous_delivery_scripts/create_news_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Easy news files generation.

continuous_delivery_scripts/generate_docs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Generates documentation."""

continuous_delivery_scripts/generate_news.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Handles usage of towncrier for automated changelog generation and pyautoversion for versioning."""

continuous_delivery_scripts/get_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Retrieves configuration values."""

continuous_delivery_scripts/get_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Determine the project new version."""

continuous_delivery_scripts/language_specifics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Language plugins Loader."""

continuous_delivery_scripts/license_files.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Apply copyright and licensing to all source files present in a project.

continuous_delivery_scripts/plugins/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Language specific actions."""

continuous_delivery_scripts/plugins/basic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Basic plugin."""

continuous_delivery_scripts/plugins/ci.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Plugin for CI projects."""

continuous_delivery_scripts/plugins/docker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Plugin for Docker projects."""

continuous_delivery_scripts/plugins/github_actions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Plugin for CI projects."""

continuous_delivery_scripts/plugins/golang.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Plugin for Golang projects."""

continuous_delivery_scripts/plugins/noop.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""No Operation plugin."""

continuous_delivery_scripts/plugins/python.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Plugin for Python projects."""

continuous_delivery_scripts/report_third_party_ip.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Script providing information about licensing and third party IP in order to comply with OpenChain.

continuous_delivery_scripts/spdx_report/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Module in charge of handling SPDX documents.

continuous_delivery_scripts/spdx_report/spdx_dependency.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Definition of dependency SPDX Document."""

continuous_delivery_scripts/spdx_report/spdx_document.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Definition of an SPDX Document."""

continuous_delivery_scripts/spdx_report/spdx_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Definition of an SPDX File."""

continuous_delivery_scripts/spdx_report/spdx_helpers.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Facilities regarding SPDX.
@@ -33,8 +33,8 @@
3333
logger = logging.getLogger(__name__)
3434

3535
# Copyright similar to the regex defined in flake8-copyright
36-
COPYRIGHT_PATTERN = r"(?i)Copyright.*$"
37-
COPYRIGHT_REGEX_PATTERN = re.compile(COPYRIGHT_PATTERN, re.MULTILINE)
36+
COPYRIGHT_PATTERN = r"Copyright.*$"
37+
COPYRIGHT_REGEX_PATTERN = re.compile(COPYRIGHT_PATTERN, flags=re.MULTILINE | re.IGNORECASE)
3838
# Specification of the identifier based on https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b
3939
# and https://spdx.org/ids-how
4040
SPDX_LICENCE_IDENTIFIER_PATTERN = r"SPDX-License-Identifier: ([\.\w+\-\(\)\s]+)[\*]?$"

continuous_delivery_scripts/spdx_report/spdx_package.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Definition of an SPDX Package."""

continuous_delivery_scripts/spdx_report/spdx_project.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Definition of an SPDX report for a Python project."""

continuous_delivery_scripts/spdx_report/spdx_summary.py

+16-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Summary generators."""
@@ -63,11 +63,13 @@ def _generate_template_arguments(self) -> Dict[str, Any]:
6363
"name": self.project.name,
6464
"compliance": global_compliance,
6565
"compliance_details": (
66-
f"Project [{self.project.name}]'s licence is compliant: {self.project.licence}."
67-
"All its dependencies are also compliant licence-wise."
68-
)
69-
if global_compliance
70-
else f"Project [{self.project.name}] or one, at least, of its dependencies has a non compliant licence",
66+
(
67+
f"Project [{self.project.name}]'s licence is compliant: {self.project.licence}."
68+
"All its dependencies are also compliant licence-wise."
69+
)
70+
if global_compliance
71+
else f"Project [{self.project.name}] or one, at least, of its dependencies has a non compliant licence"
72+
),
7173
}
7274
arguments["packages"] = description_list
7375
arguments["render_time"] = datetime.datetime.now()
@@ -105,12 +107,14 @@ def _generate_description_for_one_package(
105107
"licence": p.licence,
106108
"is_compliant": is_compliant,
107109
"mark_as_problematic": not is_licence_compliant,
108-
"licence_compliance_details": "Licence is compliant."
109-
if is_licence_compliant
110-
else (
111-
f"Package's licence manually checked: {manual_check_details}"
112-
if package_manually_checked
113-
else "Licence is not compliant according to project's configuration."
110+
"licence_compliance_details": (
111+
"Licence is compliant."
112+
if is_licence_compliant
113+
else (
114+
f"Package's licence manually checked: {manual_check_details}"
115+
if package_manually_checked
116+
else "Licence is not compliant according to project's configuration."
117+
)
114118
),
115119
}
116120

continuous_delivery_scripts/tag_and_release.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Orchestrates release process."""
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Utility scripts to abstract and assist with scripts run in the CI."""

continuous_delivery_scripts/utils/aws_helpers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Helpers for interacting with AWS services such as S3.

continuous_delivery_scripts/utils/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Utilities in charge of fetching configuration values for the ci scripts."""

continuous_delivery_scripts/utils/definitions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Place to store generic project concepts for the ci scripts."""

continuous_delivery_scripts/utils/filesystem_helpers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Helpers with regards to actions on the filesystem."""

continuous_delivery_scripts/utils/git_helpers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Utility script to abstract git operations for our CI scripts."""

continuous_delivery_scripts/utils/hash_helpers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Helpers for calculating hashes or UUID."""

continuous_delivery_scripts/utils/language_specifics_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Base class for all Language plugins."""

continuous_delivery_scripts/utils/logging.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Helpers for logging errors according to severity of the exception."""

continuous_delivery_scripts/utils/news_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors. All rights reserved.
2+
# Copyright (C) 2020-2025 Arm Limited or its affiliates and Contributors. All rights reserved.
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
"""Helpers with regards to news files."""

0 commit comments

Comments
 (0)