File tree 3 files changed +9
-2
lines changed
src/apispec/ext/marshmallow
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -85,3 +85,4 @@ Contributors (chronological)
85
85
- `<https://github.com/kolditz-senec >`_
86
86
- Theron Luhn `@luhn <https://github.com/luhn >`_
87
87
- Robert Shepley `@ShepleySound <https://github.com/ShepleySound >`_
88
+ - Robin `@allrob23 <https://github.com/allrob23 >`_
Original file line number Diff line number Diff line change 1
1
Changelog
2
2
---------
3
3
4
+ (unreleased)
5
+ ************
6
+
7
+ - Perf improvement to ``filter_excluded_fields `` (:issue: `972 `).
8
+ Thanks :user: `allrob23 ` for the PR.
9
+
4
10
6.8.1 (2025-01-07)
5
11
******************
6
12
Original file line number Diff line number Diff line change @@ -95,9 +95,9 @@ def filter_excluded_fields(
95
95
:param Meta: the schema's Meta class
96
96
:param bool exclude_dump_only: whether to filter dump_only fields
97
97
"""
98
- exclude = list (getattr (Meta , "exclude" , []))
98
+ exclude = set (getattr (Meta , "exclude" , []))
99
99
if exclude_dump_only :
100
- exclude .extend (getattr (Meta , "dump_only" , []))
100
+ exclude .update (getattr (Meta , "dump_only" , []))
101
101
102
102
filtered_fields = {
103
103
key : value
You can’t perform that action at this time.
0 commit comments