Repository: joke2k/faker

Issue:
Bug in `mac_platform_token`
* Faker version: Latest
* OS: Any

`mac_platform_token` generates a MacOS platform token used in user agent strings. However, during https://github.com/joke2k/faker/commit/da1ae11a06a8f64bd4b0f7d1391d7661521e4caf#diff-7d7f34af58b0ae686b413e6ed3463229243aacfb0891fbc544cb951224c5af97L220, looks like it got missing underscore. Now, it generates `Macintosh; PPC Mac OS X 10 6_5` where as it should be `Macintosh; PPC Mac OS X 10_6_5`

### Expected behavior

Output of `mac_platform_token` should be `Macintosh; PPC Mac OS X 10_6_5`

### Actual behavior
`Macintosh; PPC Mac OS X 10 6_5`


Discussion:
iamkeyur: @fcurella Take a look whenever you're free.

Patch:
diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 5044895e..3782252e 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 8.12.1
+current_version = 8.12.2
 files = VERSION faker/__init__.py docs/conf.py
 commit = True
 tag = True
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d894e767..71f21924 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 ## Changelog
 
+### [v8.12.2 - 2021-09-15](https://github.com/joke2k/faker/compare/v8.12.1...v8.12.2)
+
+*  Remove period/fullstop from ``en_GB`` prefixes. Thanks @stephengruppetta.
+
 ### [v8.12.1 - 2021-08-24](https://github.com/joke2k/faker/compare/v8.12.0...v8.12.1)
 
 * Add missing diacritics in ``fr_FR`` ``person`` provider. Thanks @laowantong.
diff --git a/VERSION b/VERSION
index fd32ca6a..db4bcecc 100644
--- a/VERSION
+++ b/VERSION
@@ -1,1 +1,1 @@
-8.12.1
+8.12.2
diff --git a/docs/conf.py b/docs/conf.py
index 1b17444e..35a8d959 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -51,9 +51,9 @@ copyright = '2014, Daniele Faraglia'
 # built documents.
 #
 # The short X.Y version.
-version = '8.12.1'
+version = '8.12.2'
 # The full version, including alpha/beta/rc tags.
-release = '8.12.1'
+release = '8.12.2'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/faker/__init__.py b/faker/__init__.py
index 7672a90a..c945f2b6 100644
--- a/faker/__init__.py
+++ b/faker/__init__.py
@@ -2,6 +2,6 @@ from faker.factory import Factory
 from faker.generator import Generator
 from faker.proxy import Faker
 
-VERSION = '8.12.1'
+VERSION = '8.12.2'
 
 __all__ = ('Factory', 'Generator', 'Faker')
diff --git a/faker/providers/user_agent/__init__.py b/faker/providers/user_agent/__init__.py
index 2a4c8a7d..40fe1830 100644
--- a/faker/providers/user_agent/__init__.py
+++ b/faker/providers/user_agent/__init__.py
@@ -192,7 +192,7 @@ class Provider(BaseProvider):
 
     def mac_platform_token(self):
         """Generate a MacOS platform token used in user agent strings."""
-        return (f'Macintosh; {self.random_element(self.mac_processors)} Mac OS X 10 '
+        return (f'Macintosh; {self.random_element(self.mac_processors)} Mac OS X 10_'
                 f'{self.generator.random.randint(5, 12)}_{self.generator.random.randint(0, 9)}')
 
     def android_platform_token(self):


Test patch:
diff --git a/tests/providers/test_user_agent.py b/tests/providers/test_user_agent.py
index 0e8ab70c..cda2fccc 100644
--- a/tests/providers/test_user_agent.py
+++ b/tests/providers/test_user_agent.py
@@ -8,6 +8,7 @@ class TestUserAgentProvider:
     num_samples = 1000
     android_token_pattern = re.compile(r'Android (?P<android_version>\d+(?:\.\d){0,2})')
     ios_token_pattern = re.compile(r'^(?P<apple_device>.*?); CPU \1 OS (?P<ios_version>\d+(?:_\d){0,2}) like Mac OS X')
+    mac_token_pattern = re.compile(r'Macintosh; (?P<mac_processor>.*?) Mac OS X 10_([5-9]|1[0-2])_(\d)')
 
     def test_android_platform_token(self, faker, num_samples):
         for _ in range(num_samples):
@@ -19,3 +20,8 @@ class TestUserAgentProvider:
             match = self.ios_token_pattern.fullmatch(faker.ios_platform_token())
             assert match.group('apple_device') in UaProvider.apple_devices
             assert match.group('ios_version').replace('_', '.') in UaProvider.ios_versions
+
+    def test_mac_platform_token(self, faker, num_samples):
+        for _ in range(num_samples):
+            match = self.mac_token_pattern.fullmatch(faker.mac_platform_token())
+            assert match.group('mac_processor') in UaProvider.mac_processors