Skip to content

Commit 90448eb

Browse files
authored
Correct pip usage and notarization logging. (#2149)
1 parent 841a130 commit 90448eb

File tree

11 files changed

+56
-28
lines changed

11 files changed

+56
-28
lines changed

changes/2149.bugfix.1.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Briefcase no longer uses the ``--no-python-version-warning`` option when invoking pip. This option has been deprecated, is currently a no-op, and will be removed soon.

changes/2149.bugfix.2.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Some error messages that are an expected part of the macOS notarization process are now hidden from default verbosity.

src/briefcase/commands/create.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,6 @@ def _pip_install(
601601
"pip",
602602
"install",
603603
"--disable-pip-version-check",
604-
"--no-python-version-warning",
605604
"--upgrade",
606605
"--no-user",
607606
f"--target={app_packages_path}",

src/briefcase/platforms/macOS/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,7 @@ def submit_notarization(self, app, identity: SigningIdentity) -> str:
980980
"--output-format",
981981
"json",
982982
],
983+
quiet=1,
983984
)
984985
submission_id = submission["id"]
985986
except subprocess.CalledProcessError as e:
@@ -991,6 +992,7 @@ def submit_notarization(self, app, identity: SigningIdentity) -> str:
991992
if e.returncode == 69 and not store_credentials:
992993
store_credentials = True
993994
else:
995+
self.tools.subprocess.output_error(e)
994996
raise BriefcaseCommandError(
995997
f"Unable to submit {filename.relative_to(self.base_path)} for notarization."
996998
) from e
@@ -1080,6 +1082,7 @@ def finalize_notarization(
10801082
identity.profile,
10811083
submission_id,
10821084
],
1085+
quiet=1,
10831086
)
10841087

10851088
if response["status"] == "Accepted":
@@ -1110,6 +1113,7 @@ def finalize_notarization(
11101113
# notarization isn't complete yet. Try again in 10 seconds.
11111114
time.sleep(10)
11121115
else:
1116+
self.tools.subprocess.output_error(e)
11131117
raise BriefcaseCommandError(
11141118
"Unknown problem retrieving notarization status."
11151119
) from e

tests/commands/create/test_install_app_requirements.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ def test_app_packages_valid_requires(
145145
"pip",
146146
"install",
147147
"--disable-pip-version-check",
148-
"--no-python-version-warning",
149148
"--upgrade",
150149
"--no-user",
151150
f"--target={app_packages_path}",
@@ -187,7 +186,6 @@ def test_app_packages_requirement_installer_args_no_paths(
187186
"pip",
188187
"install",
189188
"--disable-pip-version-check",
190-
"--no-python-version-warning",
191189
"--upgrade",
192190
"--no-user",
193191
f"--target={app_packages_path}",
@@ -225,7 +223,6 @@ def test_app_packages_requirement_installer_args_path_transformed(
225223
"pip",
226224
"install",
227225
"--disable-pip-version-check",
228-
"--no-python-version-warning",
229226
"--upgrade",
230227
"--no-user",
231228
f"--target={app_packages_path}",
@@ -264,7 +261,6 @@ def test_app_packages_requirement_installer_args_coincidental_path_not_transform
264261
"pip",
265262
"install",
266263
"--disable-pip-version-check",
267-
"--no-python-version-warning",
268264
"--upgrade",
269265
"--no-user",
270266
f"--target={app_packages_path}",
@@ -302,7 +298,6 @@ def test_app_packages_requirement_installer_args_path_not_transformed(
302298
"pip",
303299
"install",
304300
"--disable-pip-version-check",
305-
"--no-python-version-warning",
306301
"--upgrade",
307302
"--no-user",
308303
f"--target={app_packages_path}",
@@ -341,7 +336,6 @@ def test_app_packages_requirement_installer_args_combined_argument_not_transform
341336
"pip",
342337
"install",
343338
"--disable-pip-version-check",
344-
"--no-python-version-warning",
345339
"--upgrade",
346340
"--no-user",
347341
f"--target={app_packages_path}",
@@ -381,7 +375,6 @@ def test_app_packages_valid_requires_no_support_package(
381375
"pip",
382376
"install",
383377
"--disable-pip-version-check",
384-
"--no-python-version-warning",
385378
"--upgrade",
386379
"--no-user",
387380
f"--target={app_packages_path}",
@@ -430,7 +423,6 @@ def test_app_packages_invalid_requires(
430423
"pip",
431424
"install",
432425
"--disable-pip-version-check",
433-
"--no-python-version-warning",
434426
"--upgrade",
435427
"--no-user",
436428
f"--target={app_packages_path}",
@@ -477,7 +469,6 @@ def test_app_packages_offline(
477469
"pip",
478470
"install",
479471
"--disable-pip-version-check",
480-
"--no-python-version-warning",
481472
"--upgrade",
482473
"--no-user",
483474
f"--target={app_packages_path}",
@@ -528,7 +519,6 @@ def test_app_packages_install_requirements(
528519
"pip",
529520
"install",
530521
"--disable-pip-version-check",
531-
"--no-python-version-warning",
532522
"--upgrade",
533523
"--no-user",
534524
f"--target={app_packages_path}",
@@ -584,7 +574,6 @@ def test_app_packages_replace_existing_requirements(
584574
"pip",
585575
"install",
586576
"--disable-pip-version-check",
587-
"--no-python-version-warning",
588577
"--upgrade",
589578
"--no-user",
590579
f"--target={app_packages_path}",
@@ -996,7 +985,6 @@ def test_app_packages_test_requires(
996985
"pip",
997986
"install",
998987
"--disable-pip-version-check",
999-
"--no-python-version-warning",
1000988
"--upgrade",
1001989
"--no-user",
1002990
f"--target={app_packages_path}",
@@ -1036,7 +1024,6 @@ def test_app_packages_test_requires_test_mode(
10361024
"pip",
10371025
"install",
10381026
"--disable-pip-version-check",
1039-
"--no-python-version-warning",
10401027
"--upgrade",
10411028
"--no-user",
10421029
f"--target={app_packages_path}",
@@ -1079,7 +1066,6 @@ def test_app_packages_only_test_requires_test_mode(
10791066
"pip",
10801067
"install",
10811068
"--disable-pip-version-check",
1082-
"--no-python-version-warning",
10831069
"--upgrade",
10841070
"--no-user",
10851071
f"--target={app_packages_path}",

tests/platforms/iOS/xcode/test_create.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def test_extra_pip_args(create_command, first_app_generated, tmp_path):
5656
"pip",
5757
"install",
5858
"--disable-pip-version-check",
59-
"--no-python-version-warning",
6059
"--upgrade",
6160
"--no-user",
6261
f"--target={bundle_path / 'app_packages.iphoneos'}",
@@ -93,7 +92,6 @@ def test_extra_pip_args(create_command, first_app_generated, tmp_path):
9392
"pip",
9493
"install",
9594
"--disable-pip-version-check",
96-
"--no-python-version-warning",
9795
"--upgrade",
9896
"--no-user",
9997
f"--target={bundle_path / 'app_packages.iphonesimulator'}",

tests/platforms/iOS/xcode/test_update.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def test_extra_pip_args(update_command, first_app_generated, tmp_path):
4343
"pip",
4444
"install",
4545
"--disable-pip-version-check",
46-
"--no-python-version-warning",
4746
"--upgrade",
4847
"--no-user",
4948
f"--target={bundle_path / 'app_packages.iphoneos'}",
@@ -80,7 +79,6 @@ def test_extra_pip_args(update_command, first_app_generated, tmp_path):
8079
"pip",
8180
"install",
8281
"--disable-pip-version-check",
83-
"--no-python-version-warning",
8482
"--upgrade",
8583
"--no-user",
8684
f"--target={bundle_path / 'app_packages.iphonesimulator'}",

tests/platforms/linux/test_LocalRequirementsMixin.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ def test_install_app_requirements_in_docker(create_command, first_app_config, tm
173173
"pip",
174174
"install",
175175
"--disable-pip-version-check",
176-
"--no-python-version-warning",
177176
"--upgrade",
178177
"--no-user",
179178
"--target=/app/path/to/app_packages",
@@ -232,7 +231,6 @@ def test_install_app_requirements_no_docker(
232231
"pip",
233232
"install",
234233
"--disable-pip-version-check",
235-
"--no-python-version-warning",
236234
"--upgrade",
237235
"--no-user",
238236
f"--target={tmp_path / 'base_path/build/first-app/tester/dummy/path/to/app_packages'}",
@@ -333,7 +331,6 @@ def build_sdist(*args, **kwargs):
333331
"pip",
334332
"install",
335333
"--disable-pip-version-check",
336-
"--no-python-version-warning",
337334
"--upgrade",
338335
"--no-user",
339336
"--target=/app/path/to/app_packages",

0 commit comments

Comments
 (0)