File tree 2 files changed +3
-2
lines changed
src/pip/_internal/commands
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -100,11 +100,11 @@ def _get_requiring_packages(current_dist: BaseDistribution) -> Iterator[str]:
100
100
except KeyError :
101
101
continue
102
102
103
- requires = []
103
+ requires = set ()
104
104
# Avoid duplicates in requirements due to environment markers
105
105
for req in dist .iter_dependencies ():
106
106
if req .name not in requires :
107
- requires .append (req .name )
107
+ requires .add (req .name )
108
108
requires = sorted (requires , key = str .lower )
109
109
required_by = sorted (_get_requiring_packages (dist ), key = str .lower )
110
110
Original file line number Diff line number Diff line change @@ -364,6 +364,7 @@ def test_show_deduplicate_requirements(script: PipTestEnvironment) -> None:
364
364
name = "simple" ,
365
365
version = "1.0" ,
366
366
install_requires = [
367
+ "pip >= 19.0.1" ,
367
368
'pip >= 19.3.1; python_version < "3.8"' ,
368
369
'pip >= 23.0.1; python_version < "3.9"' ,
369
370
],
You can’t perform that action at this time.
0 commit comments