Skip to content

Commit 2383979

Browse files
authored
Merge branch 'main' into dependabot/pip/sphinx-rtd-theme-gte-2.0.0-and-lt-4
2 parents df37fde + ab4ae45 commit 2383979

File tree

187 files changed

+3078
-647
lines changed

Some content is hidden

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

187 files changed

+3078
-647
lines changed

.github/workflows/python.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ name: Python CI
44

55
on:
66
push:
7-
branches: ["main"]
7+
branches: ["main", "next"]
8+
tags: [ 'v*' ]
89
pull_request:
9-
branches-ignore: ['dependabot/**']
1010
workflow_dispatch:
1111
schedule:
12-
# schedule weekly tests, since some dependencies are not intended to be pinned
13-
# this means: at 23:42 on Fridays
14-
- cron: '42 23 * * 5'
12+
# schedule daily tests, since some dependencies are not intended to be pinned
13+
# this means: at 23:42 every day
14+
- cron: '42 23 * * *'
1515

1616
concurrency:
1717
group: ${{ github.workflow }}-${{ github.ref }}
@@ -82,7 +82,7 @@ jobs:
8282
include:
8383
- # test with the latest dependencies
8484
os: ubuntu-latest
85-
python-version: '3.12'
85+
python-version: '3.13'
8686
toxenv-factors: '-current'
8787
- # test with the lowest dependencies
8888
os: ubuntu-latest
@@ -117,7 +117,8 @@ jobs:
117117
matrix:
118118
os: ['ubuntu-latest', 'windows-latest', 'macos-13']
119119
python-version:
120-
- "3.12" # highest supported
120+
- "3.13" # highest supported
121+
- "3.12"
121122
- "3.11"
122123
- "3.10"
123124
- "3.9"
@@ -215,7 +216,7 @@ jobs:
215216
# see https://github.com/actions/setup-python
216217
uses: actions/setup-python@v5
217218
with:
218-
python-version: '>=3.8 <=3.12' # supported version range
219+
python-version: '>=3.8 <=3.13' # supported version range
219220
- name: Validate Python Environment
220221
shell: python
221222
run: |

.github/workflows/release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Release
22

33
on:
4-
push:
5-
branches: [ 'main', 'master' ]
64
workflow_dispatch:
75
inputs:
86
release_force:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
hooks:
55
- id: system
66
name: mypy
7-
entry: poetry run tox -e mypy-locked
7+
entry: poetry run tox -e mypy-current
88
pass_filenames: false
99
language: system
1010
- repo: local

CHANGELOG.md

Lines changed: 115 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,167 +1,189 @@
11
# CHANGELOG
22

33

4-
## Unreleased
54

6-
### Documentation
7-
8-
* docs(chaneglog): omit chore/ci/refactor/style/test/build (#703)
9-
10-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`a210809`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/a210809efb34c2dc895fc0c6d96a3412a9097625))
11-
12-
* docs: rephrase migration paths
5+
## v8.5.0 (2024-11-18)
136

14-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`b0260a7`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/b0260a7d45bc3e099b979001049a8c5a67b97634))
15-
16-
### Unknown
17-
18-
* Merge remote-tracking branch &#39;origin/main&#39; into 8.0.0-dev ([`b9a33e6`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/b9a33e614a84ba4a6546a1907b70a0cbfee8cd6f))
7+
### Documentation
198

20-
* rework tools xml deserializer (#700)
9+
* docs: remove invalid docsting note about auto-assigned `bom-ref` values (#733) ([`5aa5787`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/5aa5787767c60dc23fd09f6cf14e54e5b0efceb4))
2110

22-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`1a24ee6`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/1a24ee6a0853e535465f85c6380971948281ad6e))
11+
### Feature
2312

24-
* Merge remote-tracking branch &#39;origin/main&#39; into 8.0.0-dev ([`4c57fa1`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/4c57fa156516de07cdd4acd3f3057c0b20d108d7))
13+
* feat: support CycloneDX 1.6.1 (#742)
2514

15+
16+
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`55eafed`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/55eafedf50d395911a697bd9c85eeab5820934ff))
2617

2718

28-
## v7.6.2 (2024-10-07)
19+
## v8.4.0 (2024-10-29)
2920

30-
### Documentation
21+
### Feature
3122

32-
* docs: fix some doc strings
23+
* feat: add factory method `XsUri.make_bom_link()` (#728)
3324

34-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`4fa8fc1`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/4fa8fc1b6703ecf6788b72f2d53c6a17e2146cf7))
25+
26+
27+
---------
28+
29+
Signed-off-by: Saquib Saifee &lt;[email protected]&gt;
30+
Co-authored-by: Saquib Saifee &lt;[email protected]&gt; ([`5ec73d0`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/5ec73d0668b4f9e087cc11a2e1a0e242ad1b5dd6))
3531

3632
### Fix
3733

38-
* fix: behavior of and typing for crypto setters with optional values (#694)
34+
* fix: no warning for missing dependencies if no component exists (#720)
3935

40-
fixes #690
4136

4237
---------
4338

44-
Signed-off-by: Jan Kowalleck &lt;jan.kowalleck@gmail.com&gt; ([`d8b20bd`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/d8b20bdc5224ea30cf767f6f3f1a6f8ff2754973))
39+
Signed-off-by: weichslgartner &lt;weichslgartner@gmail.com&gt; ([`d9c3ded`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/d9c3ded34f443cd04f1f0041f0dd948db3db40e7))
4540

4641
### Unknown
4742

48-
* docs
49-
50-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`68c681d`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/68c681d46c85230a97c4058de97400f3d93119f5))
51-
43+
* doc: fix `Definitions` docstring (#731)
5244

53-
## v8.0.0-rc.2 (2024-09-27)
45+
46+
---------
47+
48+
Signed-off-by: Hakan Dilek &lt;[email protected]&gt; ([`5860b67`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/5860b67f562fc474903b0fb1a162c70eeca2f3d0))
5449

55-
### Fix
5650

57-
* fix: ToolRepository serialize migrated tools deduplicated (#686)
51+
## v8.3.0 (2024-10-26)
5852

59-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`35ccdd1`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/35ccdd1bfec9757457763308d16e1dbf5d9e28e9))
53+
### Documentation
6054

61-
### Unknown
55+
* docs: revisit examples readme (#725)
6256

63-
* docs
57+
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`e9020f0`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/e9020f0b709a5245d1749d2811b8568f892869bb))
6458

65-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`2e16408`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/2e16408098a3c649b80fb407d4f43aaa34aee39f))
59+
### Feature
6660

67-
* rename `ToolsRepository` -&gt; `ToolRepository` (#687)
61+
* feat: add basic support for Definitions (#701)
6862

69-
Item class of repository is to be called in singular(`Tool`).
7063

71-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`e00af17`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/e00af1739fa6d3933315e96266d96d9b290012ee))
64+
65+
---------
66+
67+
Signed-off-by: Hakan Dilek &lt;[email protected]&gt; ([`a1573e5`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/a1573e5af12bb54c7328c73971dc2c2f8d820c0a))
7268

7369

74-
## v8.0.0-rc.1 (2024-09-25)
70+
## v8.2.1 (2024-10-24)
7571

76-
### Documentation
72+
### Fix
7773

78-
* docs: migrate to v8.0.0 (#684)
74+
* fix: encode quotation mark in URL (#724)
7975

80-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`0ac84d7`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/0ac84d76f2e526f329937ab004480405492e7417))
76+
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`a7c7c97`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/a7c7c97c37ee1c7988c028aa779f74893f858c7b))
8177

82-
### Fix
8378

84-
* fix: assert copyright headers
79+
## v8.2.0 (2024-10-22)
8580

86-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`bef268b`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/bef268b7abe2c3f343274d7789906c99c80e9df9))
81+
### Feature
8782

88-
### Unknown
83+
* feat: Add Python 3.13 support (#718)
8984

90-
* Merge branch &#39;main&#39; into 8.0.0-dev
85+
Signed-off-by: gruebel &lt;[email protected]&gt; ([`d4be3ba`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/d4be3ba6b3ccc65553a7dd10ad559c1eddfbb19b))
9186

92-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`39514b3`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/39514b331eef98fbf5208ead341060831f8acddf))
9387

94-
* Merge branch &#39;main&#39; into 8.0.0-dev ([`c123aff`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/c123aff4bd479ec0f5f1982725ffe8901afb87c9))
88+
## v8.1.0 (2024-10-21)
9589

90+
### Documentation
9691

97-
## v7.6.1 (2024-09-18)
92+
* docs: fix code examples regarding outputting (#709)
9893

99-
### Breaking
94+
95+
96+
Signed-off-by: Hakan Dilek &lt;[email protected]&gt; ([`c72d5f4`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/c72d5f483d5c1990fe643c4c25e37373d4d3248f))
10097

101-
* feat!: this-builder (#649)
98+
### Feature
99+
100+
* feat: add support for Lifecycles in BOM metadata (#698)
102101

103-
reworked `ThisTool` for #635
102+
104103

105104
---------
106105

107-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`cf5d2c7`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/cf5d2c7e43883967c5d5837f465ecac5a8cc034e))
106+
Signed-off-by: Johannes Feichtner &lt;[email protected]&gt;
107+
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt;
108+
Signed-off-by: Johannes Feichtner &lt;[email protected]&gt;
109+
Co-authored-by: Jan Kowalleck &lt;[email protected]&gt; ([`6cfeb71`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/6cfeb711f11aec8fa4d7be885f6797cc2eaa7e67))
108110

109-
* refactor!: `LicenseExpression()` optional args are named args (#595)
110111

111-
fixes #594
112-
113-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`0172564`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/0172564d5f9529e7ce543da434969b552833de31))
112+
## v8.0.0 (2024-10-14)
114113

115-
* feat!: Add component and services for tools (#635)
114+
### Breaking
115+
116+
* feat!: v8.0.0 (#665)
116117

117-
CycloneDX spec 1.5 deprecated an array of tools in bom.metadata and
118-
instead prefers object with an array of components and an array of
119-
services.
118+
### BREAKING Changes
119+
120+
* Removed `cyclonedx.mode.ThisTool`, utilize `cyclonedx.builder.this.this_tool()` instead.
121+
* Moved `cyclonedx.model.Tool` to `cyclonedx.model.tool.Tool`.
122+
* Property `cyclonedx.mode.bom.BomMetaData.tools` is of type `cyclonedx.model.tool.ToolRepository` now, was `SortedSet[cyclonedx.model.Tool]`.
123+
The getter will act accordingly; the setter might act in a backwards-compatible way.
124+
* Property `cyclonedx.mode.vulnerability.Vulnerability.tools` is of type `cyclonedx.model.tool.ToolRepository` now, was `SortedSet[cyclonedx.model.Tool]`.
125+
The getter will act accordingly; the setter might act in a backwards-compatible way.
126+
* Constructor `cyclonedx.model.license.LicenseExpression()` accepts optional argument `acknowledgement` only as key-word argument, no longer as positional argument.
127+
128+
129+
### Changes
130+
131+
* Constructor of `cyclonedx.model.bom.BomMetaData` also accepts an instance of `cyclonedx.model.tool.ToolRepository` for argument `tools`.
132+
* Constructor of `cyclonedx.model.bom.BomMetaData` no longer adds this very library as a tool.
133+
Downstream users SHOULD add it manually, like `my-bom.metadata.tools.components.add(cyclonedx.builder.this.this_component())`.
134+
135+
### Fixes
120136

121-
This PR implements that.
137+
* Deserialization of CycloneDX that do not include tools in the metadata are no longer unexpectedly modified/altered.
122138

123-
This works de-serializing a Syft SBOM with a tool section like so:
124-
```
125-
&#34;metadata&#34;: {
126-
&#34;timestamp&#34;: &#34;2024-06-10T13:06:52-08:00&#34;,
127-
&#34;tools&#34;: {
128-
&#34;components&#34;: [
129-
{
130-
&#34;type&#34;: &#34;application&#34;,
131-
&#34;author&#34;: &#34;anchore&#34;,
132-
&#34;name&#34;: &#34;syft&#34;,
133-
&#34;version&#34;: &#34;1.4.1&#34;
134-
}
135-
]
136-
},
137-
&#34;component&#34;: {
138-
&#34;bom-ref&#34;: &#34;08329a07b4eb8eac&#34;,
139-
&#34;type&#34;: &#34;file&#34;,
140-
&#34;name&#34;: &#34;./&#34;
141-
}
142-
},
143-
```
144-
Next up: docs, XML (de)serialization code, and tests.
139+
### Added
140+
141+
Enabled Metadata Tools representation and serialization in accordance with CycloneDX 1.5
142+
143+
* New class `cyclonedx.model.tool.ToolRepository`.
144+
* New function `cyclonedx.builder.this.this_component()` -- representation of this very python library as a `Component`.
145+
* New function `cyclonedx.builder.this.this_tool()` -- representation of this very python library as a `Tool`.
146+
* New function `cyclonedx.model.tool.Tool.from_component()`.
145147

146-
fixes #561
148+
### Dependencies
149+
150+
* Raised runtime dependency `py-serializable&gt;=1.1.1,&lt;2`, was `&gt;=1.1.0,&lt;2`.
147151

148152
---------
149153

150-
Signed-off-by: Joshua Kugler &lt;[email protected]&gt;
151154
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt;
152-
Co-authored-by: Jan Kowalleck &lt;[email protected]&gt; ([`1f5fd7a`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/1f5fd7a6be94d93d2260622d39ea01cd74614402))
155+
Signed-off-by: Joshua Kugler &lt;[email protected]&gt;
156+
Signed-off-by: semantic-release &lt;[email protected]&gt;
157+
Co-authored-by: Joshua Kugler &lt;[email protected]&gt;
158+
Co-authored-by: semantic-release &lt;[email protected]&gt; ([`002f966`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/002f96630ce8fc6f1766ee6cc92a16b35a821c69))
153159

154-
* feat!: 8.0.0
160+
### Documentation
155161

156-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`9ba4b8e`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/9ba4b8e5d255c8dba51df214786328bfa700291c))
162+
* docs(chaneglog): omit chore/ci/refactor/style/test/build (#703)
163+
164+
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`a210809`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/a210809efb34c2dc895fc0c6d96a3412a9097625))
157165

158-
### Feature
159166

160-
* feat: don&#39;t add self to `metafata.tools` (#674)
167+
## v7.6.2 (2024-10-07)
161168

162-
fixes #673
169+
### Documentation
170+
171+
* docs: fix some doc strings
172+
173+
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`4fa8fc1`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/4fa8fc1b6703ecf6788b72f2d53c6a17e2146cf7))
174+
175+
### Fix
176+
177+
* fix: behavior of and typing for crypto setters with optional values (#694)
178+
179+
fixes #690
163180

164-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`e0a153f`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/e0a153fbd553dcf29343d72e361c1cc9122c63b4))
181+
---------
182+
183+
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`d8b20bd`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/d8b20bdc5224ea30cf767f6f3f1a6f8ff2754973))
184+
185+
186+
## v7.6.1 (2024-09-18)
165187

166188
### Fix
167189

@@ -173,16 +195,6 @@ correct headers
173195

174196
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`35e00b4`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/35e00b4ee5a9306b9e97b011025409bcbfcef309))
175197

176-
### Unknown
177-
178-
* Merge branch &#39;main&#39; into 8.0.0-dev ([`3d1548a`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/3d1548abf5db45764a22fcca96493574f96ff693))
179-
180-
* Merge branch &#39;main&#39; into 8.0.0-dev
181-
182-
Signed-off-by: Jan Kowalleck &lt;[email protected]&gt; ([`735c800`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/735c8003ce88b0c6efa802ccd806f17d22b4df89))
183-
184-
* Merge branch &#39;main&#39; into 8.0.0-dev ([`0ec785d`](https://github.com/CycloneDX/cyclonedx-python-lib/commit/0ec785d29abcc215a5a0f6feec9bf16b0994cc92))
185-
186198

187199
## v7.6.0 (2024-08-14)
188200

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ Run all tests in dedicated environments, via:
5252
poetry run tox run
5353
```
5454

55+
See also: [python test snapshots docs](tests/_data/snapshots/README.md)
56+
5557
## Sign off your commits
5658

5759
Please sign off your commits, to show that you agree to publish your changes under the current terms and licenses of the project

0 commit comments

Comments
 (0)