Skip to content

Commit

Permalink
Fix a TypeError when a Distribution's old included attribute wa…
Browse files Browse the repository at this point in the history
…s a `tuple` -- by :user:`Avasam`
  • Loading branch information
Avasam committed Aug 17, 2024
1 parent 43d3c81 commit 66ef83e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions newsfragments/4575.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a `TypeError` when a ``Distribution``'s old included attribute was a `tuple` -- by :user:`Avasam`
1 change: 1 addition & 0 deletions newsfragments/4575.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allows using `dict` where an ordered iterable (previously restricted to `tuple` or `list`) is expected -- by :user:`Avasam`
2 changes: 1 addition & 1 deletion setuptools/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ def _include_misc(self, name: str, value: _OrderedIterable):
)
else:
new = [item for item in value if item not in old]
setattr(self, name, old + new)
setattr(self, name, list(old) + new)

def exclude(self, **attrs):
"""Remove items from distribution that are named in keyword arguments
Expand Down

0 comments on commit 66ef83e

Please sign in to comment.