Repository: beeware/briefcase

Issue:
overly aggressive restriction on bundle identifiers restricts my idiom
### Describe the bug

All my apps have bundle IDs of the form `im.glyph.and.this.is.<app name>` but that doesn't work with `briefcase new`, due to this error:

```
Bundle Identifier [com.example]: im.glyph.and.this.is.examplecase

Invalid value; 'im.glyph.and.this.is.examplecase' is not a valid bundle identifier.

The bundle should be a reversed domain name. It must contain at least 2
dot-separated sections; each section may only include letters, numbers,
and hyphens; and each section may not contain any reserved words (like
'switch', or 'while').
```


### Steps to reproduce

Just run `briefcase new` and use the aforementioned bundle id.

### Expected behavior

It accepts the input.

### Screenshots

_No response_

### Environment

- Operating System: ```
ProductName:		macOS
ProductVersion:		13.3.1
BuildVersion:		22E261
```
- Python version: Python 3.11.3
- Software versions:
  - Briefcase: 0.3.14


### Logs

```

```


### Additional context

_No response_

Discussion:

Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a87e6959..df39e5b1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -67,7 +67,7 @@ jobs:
             python-version: "3.8"
     steps:
     - name: Checkout
-      uses: actions/checkout@v4.1.6
+      uses: actions/checkout@v4.1.5
       with:
         fetch-depth: 0
 
@@ -118,7 +118,7 @@ jobs:
     if: always() && contains('success,failure', needs.unit-tests.result)
     steps:
     - name: Checkout
-      uses: actions/checkout@v4.1.6
+      uses: actions/checkout@v4.1.5
       with:
         fetch-depth: 0
 
diff --git a/changes/1212.bugfix.rst b/changes/1212.bugfix.rst
new file mode 100644
index 00000000..b0ac69af
--- /dev/null
+++ b/changes/1212.bugfix.rst
@@ -0,0 +1,1 @@
+Validation rules for bundle identifiers have been loosened. App IDs that contain country codes or language reserved words are no longer flagged as invalid.
diff --git a/changes/1703.doc.rst b/changes/1703.doc.rst
deleted file mode 100644
index 69665d17..00000000
--- a/changes/1703.doc.rst
+++ /dev/null
@@ -1,1 +0,0 @@
-Added documentation describing manual signing requirement for Android packages.
diff --git a/changes/1786.doc.rst b/changes/1786.doc.rst
deleted file mode 100644
index dcb6efe9..00000000
--- a/changes/1786.doc.rst
+++ /dev/null
@@ -1,1 +0,0 @@
-Specific examples added for requires under configuration.
diff --git a/changes/1798.misc.rst b/changes/1798.misc.rst
deleted file mode 100644
index a79d1f79..00000000
--- a/changes/1798.misc.rst
+++ /dev/null
@@ -1,1 +0,0 @@
-Updated actions/checkout from 4.1.5 to 4.1.6.
diff --git a/changes/1799.misc.rst b/changes/1799.misc.rst
deleted file mode 100644
index 08cd276c..00000000
--- a/changes/1799.misc.rst
+++ /dev/null
@@ -1,1 +0,0 @@
-The pinned dependencies in pyproject.toml and tox.ini were updated to their latest versions.
diff --git a/changes/1816.doc.rst b/changes/1816.doc.rst
deleted file mode 100644
index 282537f3..00000000
--- a/changes/1816.doc.rst
+++ /dev/null
@@ -1,1 +0,0 @@
-Updated Android publishing documentation to encourage users to set non-default passwords.
diff --git a/changes/1817.misc.rst b/changes/1817.misc.rst
deleted file mode 100644
index 5b26b3b4..00000000
--- a/changes/1817.misc.rst
+++ /dev/null
@@ -1,1 +0,0 @@
-Pytest was bumped from version 8.1.2 to 8.2.1.
diff --git a/docs/background/releases.rst b/docs/background/releases.rst
index 84d4847e..a61c2906 100644
--- a/docs/background/releases.rst
+++ b/docs/background/releases.rst
@@ -466,12 +466,12 @@ Features
 --------
 
 * Apps can be updated as part of a call to package. (#473)
-* The Android emulator can now be used on Apple Silicon hardware. (#616)
+* The Android emulator can now be used on Apple M1 hardware. (#616)
 * Names that are reserved words in Python (or other common programming languages) are now prevented when creating apps. (#617)
 * Names that are invalid on Windows as filenames (such as CON and LPT0) are now invalid as app names. (#685)
 * Verbose logging via ``-v`` and ``-vv`` now includes the return code, output, and environment variables for shell commands (#704)
 * When the output of a wrapped command cannot be parsed, full command output, and failure reason is now logged. (#728)
-* The iOS emulator will now run apps natively on Apple Silicon hardware, rather than through Rosetta emulation. (#739)
+* The iOS emulator will now run apps natively on M1 hardware, rather than through Rosetta emulation. (#739)
 
 
 Bugfixes
@@ -481,7 +481,7 @@ Bugfixes
 * The error reporting when the user is on an unsupported platform or Python version has been improved. (#541)
 * When the formal name uses non-Latin characters, the suggested Class and App names are now valid. (#612)
 * The code signing process for macOS apps has been made more robust. (#652)
-* macOS app binaries are now adhoc signed by default, ensuring they can run on Apple Silicon hardware. (#664)
+* macOS app binaries are now adhoc signed by default, ensuring they can run on M1 hardware. (#664)
 * Xcode version checks are now more robust. (#668)
 * Android projects that have punctuation in their formal names can now build without error. (#696)
 * Bundle name validation no longer excludes valid country identifiers (like ``in.example``). (#709)
diff --git a/docs/how-to/code-signing/android.rst b/docs/how-to/code-signing/android.rst
index 7c9c1464..a8c0f716 100644
--- a/docs/how-to/code-signing/android.rst
+++ b/docs/how-to/code-signing/android.rst
@@ -77,8 +77,8 @@ used as an upload key for the Google Play store, we call the key "upload-key".
 
 We use a password of ``android``. This is the `default password for common
 Android keystores <https://developers.google.com/android/guides/client-auth>`__.
-You should change the password. It is most critical to limit who
-has access to the keystore file, but changing the password is also important.
+You can change the password if you like. It is more important to limit who
+has access to the keystore file than to change the password.
 
 See :doc:`Publishing your app <../publishing/android/>` for instructions
 on using this key to upload an app to the Google Play store.
diff --git a/docs/how-to/contribute-docs.rst b/docs/how-to/contribute-docs.rst
index 1dc38ea2..43cd7654 100644
--- a/docs/how-to/contribute-docs.rst
+++ b/docs/how-to/contribute-docs.rst
@@ -34,7 +34,7 @@ You'll also need to install the Enchant spell checking library.
 
       (venv) $ brew install enchant
 
-    If you're on an Apple Silicon machine, you'll also need to manually set the location
+    If you're on an M1 machine, you'll also need to manually set the location
     of the Enchant library:
 
     .. code-block:: console
diff --git a/docs/reference/configuration.rst b/docs/reference/configuration.rst
index 9cf896f4..f038f238 100644
--- a/docs/reference/configuration.rst
+++ b/docs/reference/configuration.rst
@@ -313,9 +313,6 @@ A hexadecimal RGB color value (e.g., ``#008577``) used alongside the primary
 color. This setting is only used if the platform allows color modification,
 otherwise it is ignored.
 
-
-.. _configuration-requires-key:
-
 ``requires``
 ~~~~~~~~~~~~
 
@@ -327,35 +324,6 @@ application level, *and* platform level, the final set of requirements will be
 the *concatenation* of requirements from all levels, starting from least to
 most specific.
 
-Any PEP 508 version specifier is legal. For example:
-
-* Bare package name::
-
-    requires = ["pillow"]
-
-* Package name with version specifier::
-
-    requires = ["pillow==9.1.0"]
-
-* Install from source using the ``--no-binary`` entry::
-
-    requires = [
-        "pillow==9.1.0",
-        "--no-binary", "pillow",
-    ]
-
-* Git repository::
-
-    requires=["git+https://github.com/beeware/briefcase.git"]
-
-* Local directory::
-
-    requires=["mysrc/myapp"]
-
-* Local wheel file::
-
-    requires=["fullpath/wheelfile.whl"]
-
 ``revision``
 ~~~~~~~~~~~~
 
@@ -434,8 +402,6 @@ level, application level, *and* platform level, the final set of requirements
 will be the *concatenation* of requirements from all levels, starting from least
 to most specific.
 
-See :ref:`requires <configuration-requires-key>` for examples.
-
 ``test_sources``
 ~~~~~~~~~~~~~~~~
 
diff --git a/docs/reference/platforms/android/gradle.rst b/docs/reference/platforms/android/gradle.rst
index 14da87b1..065f87b5 100644
--- a/docs/reference/platforms/android/gradle.rst
+++ b/docs/reference/platforms/android/gradle.rst
@@ -380,10 +380,3 @@ recipes for building the packages that are stored in the `secondary package repo
 can be submitted as pull requests. Or, if you have a particular package that you'd like
 us to support, please visit the `issue tracker
 <https://github.com/chaquo/chaquopy/issues>`__ and provide details about that package.
-
-While it is possible to use `briefcase package android` to produce an APK or AAB
-file for distribution, the file is *not* usable as-is. It must be signed
-regardless of whether you're distributing your app through the Play Store, or
-via loading the APK directly. For details on how to manually sign your code,
-see the instructions on `signing an Android App Bundle
-<https://briefcase.readthedocs.io/en/stable/how-to/publishing/android.html#sign-the-android-app-bundle>`__.```
diff --git a/pyproject.toml b/pyproject.toml
index e1f4f264..7fe18ed5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -101,7 +101,7 @@ dev = [
     # Pre-commit 3.6.0 deprecated support for Python 3.8
     "pre-commit == 3.5.0 ; python_version < '3.9'",
     "pre-commit == 3.7.1 ; python_version >= '3.9'",
-    "pytest == 8.2.1",
+    "pytest == 8.1.2",
     "pytest-xdist == 3.6.1",
     "setuptools_scm == 8.0.4",
     "tox == 4.15.0",
diff --git a/src/briefcase/config.py b/src/briefcase/config.py
index 34d50800..39ef2edb 100644
--- a/src/briefcase/config.py
+++ b/src/briefcase/config.py
@@ -87,15 +87,6 @@ def is_valid_bundle_identifier(bundle):
     if not VALID_BUNDLE_RE.match(bundle):
         return False
 
-    for part in bundle.split("."):
-        # *Some* 2-letter country codes are valid identifiers,
-        # even though they're reserved words; see:
-        #    https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html
-        # `.do` *should* be on this list, but as of Apr 2022, `.do` breaks
-        # the Android build tooling.
-        if is_reserved_keyword(part) and part not in {"in", "is"}:
-            return False
-
     return True
 
 
diff --git a/src/briefcase/platforms/macOS/app.py b/src/briefcase/platforms/macOS/app.py
index 2ff7ae34..263cf2b6 100644
--- a/src/briefcase/platforms/macOS/app.py
+++ b/src/briefcase/platforms/macOS/app.py
@@ -93,7 +93,7 @@ class macOSAppBuildCommand(macOSAppMixin, macOSSigningMixin, BuildCommand):
         :param app: The application to build
         """
         # macOS apps don't have anything to compile, but they do need to be
-        # signed to be able to execute on Apple Silicon hardware - even if it's only an
+        # signed to be able to execute on M1 hardware - even if it's only an
         # ad-hoc signing identity. Apply an ad-hoc signing identity to the
         # app bundle.
         self.logger.info("Ad-hoc signing app...", prefix=app.app_name)
diff --git a/tox.ini b/tox.ini
index c8d8e8d0..5d3e5b0b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -118,7 +118,7 @@ package = wheel
 wheel_build_env = .pkg
 extras = docs
 passenv =
-    # On macOS Apple Silicon, you need to manually set the location of the PyEnchant
+    # On macOS M1, you need to manually set the location of the PyEnchant
     # library:
     #     export PYENCHANT_LIBRARY_PATH=/opt/homebrew/lib/libenchant-2.2.dylib
     PYENCHANT_LIBRARY_PATH
@@ -134,7 +134,7 @@ skip_install = True
 passenv = FORCE_COLOR
 deps =
     build==1.2.1
-    twine==5.1.0
+    twine==5.0.0
 commands =
     python -m build . --outdir dist{/}
     with-automation: python -m build automation --outdir dist{/}


Test patch:
diff --git a/tests/commands/new/test_validate_bundle.py b/tests/commands/new/test_validate_bundle.py
index 0952d34d..5643acf1 100644
--- a/tests/commands/new/test_validate_bundle.py
+++ b/tests/commands/new/test_validate_bundle.py
@@ -8,6 +8,10 @@ import pytest
         "com.example.more",
         "com.example42.more",
         "com.example-42.more",
+        "ca.example.issue1212",
+        "au.example.issue1212",
+        "in.example.issue1212",
+        "im.glyph.and.this.is.1212",
     ],
 )
 def test_valid_bundle(new_command, bundle):
@@ -23,7 +27,6 @@ def test_valid_bundle(new_command, bundle):
         "com.hello_world",  # underscore
         "com.hello,world",  # comma
         "com.hello world!",  # exclamation point
-        "com.pass.example",  # Reserved word
     ],
 )
 def test_invalid_bundle(new_command, bundle):
diff --git a/tests/config/test_AppConfig.py b/tests/config/test_AppConfig.py
index bddd122c..1595857e 100644
--- a/tests/config/test_AppConfig.py
+++ b/tests/config/test_AppConfig.py
@@ -170,10 +170,6 @@ def test_valid_bundle(bundle):
         "com.hello_world",  # underscore
         "com.hello,world",  # comma
         "com.hello world!",  # exclamation point
-        "com.pass",  # Python reserved word
-        "com.pass.example",  # Python reserved word
-        "com.switch",  # Java reserved word
-        "com.switch.example",  # Java reserved word
     ],
 )
 def test_invalid_bundle_identifier(bundle):
diff --git a/tests/config/test_is_valid_bundle_identifier.py b/tests/config/test_is_valid_bundle_identifier.py
index bdf83262..d8382267 100644
--- a/tests/config/test_is_valid_bundle_identifier.py
+++ b/tests/config/test_is_valid_bundle_identifier.py
@@ -28,12 +28,6 @@ def test_valid_bundle(bundle):
         "com.hello_world",  # underscore
         "com.hello,world",  # comma
         "com.hello world!",  # exclamation point
-        "com.pass",  # Python reserved word
-        "com.pass.example",  # Python reserved word
-        "com.switch",  # Java reserved word
-        "com.switch.example",  # Java reserved word
-        "int.example",  # Valid identifier with a reserved word as the TLD
-        "do.example",  # This *should* be valid by the Java spec, but Android chokes.
     ],
 )
 def test_invalid_bundle(bundle):