File tree 4 files changed +42
-0
lines changed
lib/dependabot/python/file_updater
dependabot/python/file_updater
4 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -430,6 +430,9 @@ def pip_compile_options_from_compiled_file(requirements_file)
430
430
options << "--no-header" unless requirements_file . content . include? ( "autogenerated by pip-c" )
431
431
432
432
options << "--pre" if requirements_file . content . include? ( "--pre" )
433
+
434
+ options << "--strip-extras" if requirements_file . content . include? ( "--strip-extras" )
435
+
433
436
options
434
437
end
435
438
Original file line number Diff line number Diff line change 505
505
end
506
506
end
507
507
end
508
+
509
+ context "with stripped extras" do
510
+ let ( :manifest_fixture_name ) { "strip_extras.in" }
511
+ let ( :generated_fixture_name ) { "pip_compile_strip_extras.txt" }
512
+ let ( :dependency_name ) { "cachecontrol" }
513
+ let ( :dependency_version ) { "0.12.10" }
514
+ let ( :dependency_previous_version ) { "0.12.9" }
515
+
516
+ it "doesn't add an extras annotation on cachecontrol" do
517
+ expect ( updated_files . count ) . to eq ( 1 )
518
+ expect ( updated_files . first . content ) . to include ( "--strip-extras" )
519
+ expect ( updated_files . first . content ) . to include ( "cachecontrol==0.12.10" )
520
+ expect ( updated_files . first . content ) .
521
+ to_not include ( "cachecontrol[filecache]==" )
522
+ end
523
+ end
508
524
end
509
525
end
Original file line number Diff line number Diff line change
1
+ cachecontrol[filecache]
Original file line number Diff line number Diff line change
1
+ #
2
+ # This file is autogenerated by pip-compile with python 3.10
3
+ # To update, run:
4
+ #
5
+ # pip-compile --strip-extras --output-file=constraints.txt constraints.in
6
+ #
7
+ cachecontrol==0.12.10
8
+ # via -r constraints.in
9
+ certifi==2021.10.8
10
+ # via requests
11
+ charset-normalizer==2.0.7
12
+ # via requests
13
+ idna==3.3
14
+ # via requests
15
+ lockfile==0.12.2
16
+ # via cachecontrol
17
+ msgpack==1.0.2
18
+ # via cachecontrol
19
+ requests==2.26.0
20
+ # via cachecontrol
21
+ urllib3==1.26.7
22
+ # via requests
You can’t perform that action at this time.
0 commit comments