Skip to content

Commit faf2aca

Browse files
authored
Merge branch 'master' into master
2 parents 98f72f4 + daad7e4 commit faf2aca

21 files changed

+551
-127
lines changed

.github/workflows/ci_master.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
push:
55
branches:
66
- master
7+
workflow_dispatch:
78

89
jobs:
910
ci:
1011
uses: ./.github/workflows/code_check.yaml
11-
secrets:
12-
benchmark_token: ${{ secrets.BENCHMARK_TOKEN }}
12+
secrets: inherit
1313
with:
1414
publish_performance: true
1515
store_benchmark: true

.github/workflows/ci_pr.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: CI Pull Request
22

33
on:
44
pull_request:
5+
workflow_dispatch:
56

67
jobs:
78
ci:
89
uses: ./.github/workflows/code_check.yaml
9-
secrets:
10-
benchmark_token: ${{ secrets.BENCHMARK_TOKEN }}
10+
secrets: inherit
1111
with:
1212
publish_performance: false
1313
store_benchmark: false

.github/workflows/code_check.yaml

+7-10
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: Code Check
22

33
on:
44
workflow_call:
5-
secrets:
6-
benchmark_token:
7-
required: true
85
inputs:
96
publish_performance:
107
required: true
@@ -15,16 +12,16 @@ on:
1512

1613
jobs:
1714
check:
18-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-22.04
1916
strategy:
2017
matrix:
21-
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11']
18+
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
2219

2320
name: Python ${{ matrix.python-version }}
2421
steps:
25-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2623
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v3
24+
uses: actions/setup-python@v5
2825
with:
2926
python-version: ${{ matrix.python-version }}
3027
architecture: x64
@@ -44,10 +41,10 @@ jobs:
4441
tool: 'pytest'
4542
output-file-path: benchmark.json
4643
save-data-file: ${{ inputs.store_benchmark }}
47-
github-token: ${{ secrets.benchmark_token }}
44+
github-token: ${{ secrets.GITHUB_TOKEN }}
4845
auto-push: ${{ inputs.publish_performance }}
4946
benchmark-data-dir-path: performance/${{ matrix.python-version }}
5047
comment-always: false
5148
alert-threshold: '130%'
52-
comment-on-alert: false
53-
fail-on-alert: true
49+
comment-on-alert: true
50+
fail-on-alert: false

.github/workflows/publish.yaml

+25-4
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,44 @@
11
name: Publish
22
on:
3+
workflow_dispatch:
34
release:
45
types: [published]
56

67
jobs:
7-
publish:
8+
build:
89
runs-on: ubuntu-latest
910
steps:
10-
- uses: actions/checkout@v3
11-
- uses: actions/setup-python@v3
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-python@v5
1213
with:
1314
python-version: '3.11'
1415
architecture: x64
1516
- name: Build package
1617
run: |
1718
python -m pip install --upgrade build
1819
python -m build
20+
- name: Store the distribution packages
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: python-package-distributions
24+
path: dist/
25+
publish:
26+
name: Publish to PyPI
27+
needs:
28+
- build
29+
runs-on: ubuntu-latest
30+
environment:
31+
name: pypi
32+
url: https://pypi.org/p/dacite
33+
permissions:
34+
id-token: write # IMPORTANT: mandatory for trusted publishing
35+
steps:
36+
- name: Download dist
37+
uses: actions/download-artifact@v4
38+
with:
39+
name: python-package-distributions
40+
path: dist/
1941
- name: Publish package to PyPI
2042
uses: pypa/gh-action-pypi-publish@release/v1
2143
with:
22-
user: __token__
2344
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ build/
66
.idea
77

88
venv*
9+
dacite-env*
910

1011
.benchmarks
1112
benchmark.json

.pylintrc

+1-2
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ disable=print-statement,
150150
import-outside-toplevel,
151151
isinstance-second-argument-not-valid-type,
152152
unsubscriptable-object,
153-
comparison-with-callable,
154-
raise-missing-from
153+
comparison-with-callable
155154

156155
# Enable the message, report, category or checker with the given id(s). You can
157156
# either give multiple identifier separated by comma (,) or put this option

CHANGELOG.md

+29-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
...
11+
12+
## [1.9.2] - 2025-02-05
13+
14+
- Clean up the fix for readonly attribute `__args__` (introduced in v1.9.1)
15+
- Improve class `Data(Protocol)` typing to avoid pyright errors
16+
17+
## [1.9.1] - 2025-01-29
18+
19+
### Fixed
20+
21+
- Fix `AttributeError` when trying to concretize `list` or `tuple`. Introduced in 1.9.0.
22+
23+
## [1.9.0] - 2025-01-29
24+
25+
### Added
26+
27+
- [Support generics](https://github.com/konradhalas/dacite/pull/272)
28+
- Change type definition for `Data` in order to be more permissive
29+
30+
### Fixed
31+
32+
- [Fix union matches using .popitem() when no matches are found](https://github.com/konradhalas/dacite/pull/233)
33+
- [Supress unnecessary context in some stack trackes](https://github.com/konradhalas/dacite/pull/265)
1034
- Fix issues with caching internal function calls
1135

1236
## [1.8.1] - 2023-05-12
1337

1438
### Fixed
1539

1640
- Fix value creation for a field with a default factory
41+
- Suppress context in dacite ForwardReferenceError and MissingValueError
1742

1843
## [1.8.0] - 2023-01-26
1944

@@ -119,7 +144,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
119144

120145
- Validate type for generic collection fields
121146

122-
[Unreleased]: https://github.com/konradhalas/dacite/compare/v1.8.1...HEAD
147+
[Unreleased]: https://github.com/konradhalas/dacite/compare/v1.9.2...HEAD
148+
[1.9.2]: https://github.com/konradhalas/dacite/compare/v1.9.1...v1.9.2
149+
[1.9.1]: https://github.com/konradhalas/dacite/compare/v1.9.0...v1.9.1
150+
[1.9.0]: https://github.com/konradhalas/dacite/compare/v1.8.1...v1.9.0
123151
[1.8.1]: https://github.com/konradhalas/dacite/compare/v1.8.0...v1.8.1
124152
[1.8.0]: https://github.com/konradhalas/dacite/compare/v1.7.0...v1.8.0
125153
[1.7.0]: https://github.com/konradhalas/dacite/compare/v1.6.0...v1.7.0

0 commit comments

Comments
 (0)