Skip to content

Commit f27593a

Browse files
authoredJul 16, 2024
gh-120522: Revert "Add a --with-app-store-compliance configure option to patch out problematic code" (gh-120984) (#121844)
This reverts commit 48cd104 prior to the release of 3.13.0b4 to allow for additional review time.
1 parent 8549559 commit f27593a

File tree

9 files changed

+2
-238
lines changed

9 files changed

+2
-238
lines changed
 

‎Doc/library/urllib.parse.rst

+1-9
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,11 @@ to an absolute URL given a "base URL."
2222

2323
The module has been designed to match the internet RFC on Relative Uniform
2424
Resource Locators. It supports the following URL schemes: ``file``, ``ftp``,
25-
``gopher``, ``hdl``, ``http``, ``https``, ``imap``, ``itms-services``, ``mailto``, ``mms``,
25+
``gopher``, ``hdl``, ``http``, ``https``, ``imap``, ``mailto``, ``mms``,
2626
``news``, ``nntp``, ``prospero``, ``rsync``, ``rtsp``, ``rtsps``, ``rtspu``,
2727
``sftp``, ``shttp``, ``sip``, ``sips``, ``snews``, ``svn``, ``svn+ssh``,
2828
``telnet``, ``wais``, ``ws``, ``wss``.
2929

30-
.. impl-detail::
31-
32-
The inclusion of the ``itms-services`` URL scheme can prevent an app from
33-
passing Apple's App Store review process for the macOS and iOS App Stores.
34-
Handling for the ``itms-services`` scheme is always removed on iOS; on
35-
macOS, it *may* be removed if CPython has been built with the
36-
:option:`--with-app-store-compliance` option.
37-
3830
The :mod:`urllib.parse` module defines functions that fall into two broad
3931
categories: URL parsing and URL quoting. These are covered in detail in
4032
the following sections.

‎Doc/using/configure.rst

-11
Original file line numberDiff line numberDiff line change
@@ -945,17 +945,6 @@ See :source:`Mac/README.rst`.
945945
Specify the name for the python framework on macOS only valid when
946946
:option:`--enable-framework` is set (default: ``Python``).
947947

948-
.. option:: --with-app-store-compliance
949-
.. option:: --with-app-store-compliance=PATCH-FILE
950-
951-
The Python standard library contains strings that are known to trigger
952-
automated inspection tool errors when submitted for distribution by
953-
the macOS and iOS App Stores. If enabled, this option will apply the list of
954-
patches that are known to correct app store compliance. A custom patch
955-
file can also be specified. This option is disabled by default.
956-
957-
.. versionadded:: 3.13
958-
959948
iOS Options
960949
-----------
961950

‎Doc/using/ios.rst

-18
Original file line numberDiff line numberDiff line change
@@ -323,21 +323,3 @@ modules in your app, some additional steps will be required:
323323

324324
* If you're using a separate folder for third-party packages, ensure that folder
325325
is included as part of the ``PYTHONPATH`` configuration in step 10.
326-
327-
App Store Compliance
328-
====================
329-
330-
The only mechanism for distributing apps to third-party iOS devices is to
331-
submit the app to the iOS App Store; apps submitted for distribution must pass
332-
Apple's app review process. This process includes a set of automated validation
333-
rules that inspect the submitted application bundle for problematic code.
334-
335-
The Python standard library contains some code that is known to violate these
336-
automated rules. While these violations appear to be false positives, Apple's
337-
review rules cannot be challenged; so, it is necessary to modify the Python
338-
standard library for an app to pass App Store review.
339-
340-
The Python source tree contains
341-
:source:`a patch file <Mac/Resources/app-store-compliance.patch>` that will remove
342-
all code that is known to cause issues with the App Store review process. This
343-
patch is applied automatically when building for iOS.

‎Doc/using/mac.rst

-22
Original file line numberDiff line numberDiff line change
@@ -188,28 +188,6 @@ distributable application:
188188
* `PyInstaller <https://pyinstaller.org/>`__: A cross-platform packaging tool that creates
189189
a single file or folder as a distributable artifact.
190190

191-
App Store Compliance
192-
--------------------
193-
194-
Apps submitted for distribution through the macOS App Store must pass Apple's
195-
app review process. This process includes a set of automated validation rules
196-
that inspect the submitted application bundle for problematic code.
197-
198-
The Python standard library contains some code that is known to violate these
199-
automated rules. While these violations appear to be false positives, Apple's
200-
review rules cannot be challenged. Therefore, it is necessary to modify the
201-
Python standard library for an app to pass App Store review.
202-
203-
The Python source tree contains
204-
:source:`a patch file <Mac/Resources/app-store-compliance.patch>` that will remove
205-
all code that is known to cause issues with the App Store review process. This
206-
patch is applied automatically when CPython is configured with the
207-
:option:`--with-app-store-compliance` option.
208-
209-
This patch is not normally required to use CPython on a Mac; nor is it required
210-
if you are distributing an app *outside* the macOS App Store. It is *only*
211-
required if you are using the macOS App Store as a distribution channel.
212-
213191
Other Resources
214192
===============
215193

‎Mac/Resources/app-store-compliance.patch

-29
This file was deleted.

‎Makefile.pre.in

+1-16
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,6 @@ EXPORTSFROM= @EXPORTSFROM@
179179
EXE= @EXEEXT@
180180
BUILDEXE= @BUILDEXEEXT@
181181

182-
# Name of the patch file to apply for app store compliance
183-
APP_STORE_COMPLIANCE_PATCH=@APP_STORE_COMPLIANCE_PATCH@
184-
185182
# Short name and location for Mac OS X Python framework
186183
UNIVERSALSDK=@UNIVERSALSDK@
187184
PYTHONFRAMEWORK= @PYTHONFRAMEWORK@
@@ -695,7 +692,7 @@ list-targets:
695692
@grep -E '^[A-Za-z][-A-Za-z0-9]+:' Makefile | awk -F : '{print $$1}'
696693

697694
.PHONY: build_all
698-
build_all: check-clean-src @APP_STORE_COMPLIANCE_PATCH_TARGET@ $(BUILDPYTHON) platform sharedmods \
695+
build_all: check-clean-src $(BUILDPYTHON) platform sharedmods \
699696
gdbhooks Programs/_testembed scripts checksharedmods rundsymutil
700697

701698
.PHONY: build_wasm
@@ -931,18 +928,6 @@ SRC_GDB_HOOKS=$(srcdir)/Tools/gdb/libpython.py
931928
$(BUILDPYTHON)-gdb.py: $(SRC_GDB_HOOKS)
932929
$(INSTALL_DATA) $(SRC_GDB_HOOKS) $(BUILDPYTHON)-gdb.py
933930

934-
# Compliance with app stores (such as iOS and macOS) sometimes requires making
935-
# modifications to the Python standard library. If enabled, apply the patch of
936-
# known modifications to the source tree before building. The patch will be
937-
# applied in a dry-run mode (validating, but not applying the patch) on builds
938-
# that *have* a compliance patch, but where compliance has not been enabled.
939-
build/app-store-compliant:
940-
patch @APP_STORE_COMPLIANCE_PATCH_FLAGS@ --forward --strip=1 --directory="$(srcdir)" --input "$(APP_STORE_COMPLIANCE_PATCH)"
941-
@if test "@APP_STORE_COMPLIANCE_PATCH_FLAGS@" == ""; then \
942-
mkdir -p build ; \
943-
echo "$(APP_STORE_COMPLIANCE_PATCH)" > build/app-store-compliant ; \
944-
fi
945-
946931
# This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
947932
# minimal framework (not including the Lib directory and such) in the current
948933
# directory.

‎Misc/NEWS.d/next/Build/2024-06-25-15-29-27.gh-issue-120522.5_n515.rst

-2
This file was deleted.

‎configure

-73
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎configure.ac

-58
Original file line numberDiff line numberDiff line change
@@ -695,64 +695,6 @@ AC_SUBST([INSTALLTARGETS])
695695
AC_DEFINE_UNQUOTED([_PYTHONFRAMEWORK], ["${PYTHONFRAMEWORK}"],
696696
[framework name])
697697

698-
dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
699-
AC_MSG_CHECKING([for --with-app-store-compliance])
700-
AC_ARG_WITH(
701-
[app_store_compliance],
702-
[AS_HELP_STRING(
703-
[--with-app-store-compliance=@<:@PATCH-FILE@:>@],
704-
[Enable any patches required for compiliance with app stores.
705-
Optional PATCH-FILE specifies the custom patch to apply.]
706-
)],[
707-
case "$withval" in
708-
yes)
709-
case $ac_sys_system in
710-
Darwin|iOS)
711-
# iOS is able to share the macOS patch
712-
APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch"
713-
APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant"
714-
APP_STORE_COMPLIANCE_PATCH_FLAGS=
715-
;;
716-
*) AC_MSG_ERROR([no default app store compliance patch available for $ac_sys_system]) ;;
717-
esac
718-
AC_MSG_RESULT([applying default app store compliance patch])
719-
;;
720-
*)
721-
APP_STORE_COMPLIANCE_PATCH="${withval}"
722-
APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant"
723-
APP_STORE_COMPLIANCE_PATCH_FLAGS=
724-
AC_MSG_RESULT([applying custom app store compliance patch])
725-
;;
726-
esac
727-
],[
728-
case $ac_sys_system in
729-
iOS)
730-
# Always apply the compliance patch on iOS; we can use the macOS patch
731-
APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch"
732-
APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant"
733-
APP_STORE_COMPLIANCE_PATCH_FLAGS=
734-
AC_MSG_RESULT([applying default app store compliance patch])
735-
;;
736-
Darwin)
737-
# Always *check* the compliance patch on macOS
738-
APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch"
739-
APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant"
740-
APP_STORE_COMPLIANCE_PATCH_FLAGS="--dry-run"
741-
AC_MSG_RESULT([checking (not applying) default app store compliance patch])
742-
;;
743-
*)
744-
# No app compliance patching on any other platform
745-
APP_STORE_COMPLIANCE_PATCH=
746-
APP_STORE_COMPLIANCE_PATCH_TARGET=
747-
APP_STORE_COMPLIANCE_PATCH_FLAGS=
748-
AC_MSG_RESULT([not patching for app store compliance])
749-
;;
750-
esac
751-
])
752-
AC_SUBST([APP_STORE_COMPLIANCE_PATCH])
753-
AC_SUBST([APP_STORE_COMPLIANCE_PATCH_TARGET])
754-
AC_SUBST([APP_STORE_COMPLIANCE_PATCH_FLAGS])
755-
756698
AC_SUBST([_PYTHON_HOST_PLATFORM])
757699
if test "$cross_compiling" = yes; then
758700
case "$host" in

0 commit comments

Comments
 (0)