Repository: joke2k/faker
Pull request #2016 (2024-03-30 22:52:33)

feat(phone) Upgrade UA phone provider
Fix MSISDN format
Add real country codes

lozik4: @fcurella I did it, but some test in another 
tests/providers/test_phone_number.py::TestSkSk::test_phone_number FAILED 

Patch:
diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index a1e25851..e0339585 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 24.7.1
+current_version = 24.8.0
 files = VERSION faker/__init__.py docs/conf.py
 commit = True
 tag = True
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ab6f685c..c0e8d922 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 ## Changelog
 
+### [v24.8.0 - 2024-04-09](https://github.com/joke2k/faker/compare/v24.7.1...v24.8.0)
+
+* Fix wrong pricetag format in `ru_RU` locale. Thanks @Pandede.
+
 ### [v24.7.1 - 2024-04-05](https://github.com/joke2k/faker/compare/v24.7.0...v24.7.1)
 
 * Fix previous release issue.
diff --git a/VERSION b/VERSION
index 7ecb5c88..b4040276 100644
--- a/VERSION
+++ b/VERSION
@@ -1,1 +1,1 @@
-24.7.1
+24.8.0
diff --git a/docs/coding_style.rst b/docs/coding_style.rst
index a0263b74..ba763397 100644
--- a/docs/coding_style.rst
+++ b/docs/coding_style.rst
@@ -16,7 +16,7 @@ Data Sets
 ---------
 
 For each data set, please provide a comment with reference to the source
-and/or origin of the data.
+and/or origin of the data. If the source is a wiki, please also include the date and time it was last checked.
 
 We only accept new data if it's coming from statistical sources, such as census or government institutions.
 This includes names and their distribution.
diff --git a/docs/conf.py b/docs/conf.py
index 82f7a660..c462179e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -51,9 +51,9 @@ copyright = "2014-{0}, Daniele Faraglia".format(datetime.now().year)
 # built documents.
 #
 # The short X.Y version.
-version = "24.7.1"
+version = "24.8.0"
 # The full version, including alpha/beta/rc tags.
-release = "24.7.1"
+release = "24.8.0"
 
 # 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 4968de05..f3a602e5 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 = "24.7.1"
+VERSION = "24.8.0"
 
 __all__ = ("Factory", "Generator", "Faker")
diff --git a/faker/providers/currency/ru_RU/__init__.py b/faker/providers/currency/ru_RU/__init__.py
index f6843c22..36d796ad 100644
--- a/faker/providers/currency/ru_RU/__init__.py
+++ b/faker/providers/currency/ru_RU/__init__.py
@@ -171,7 +171,7 @@ class Provider(CurrencyProvider):
         ("ZWD", "Доллар Зимбабве"),
     )
 
-    price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"]
+    price_formats = ["#,##", "%#,##", "%##,##", "% ###,##", "%# ###,##"]
 
     def pricetag(self) -> str:
         return (
diff --git a/faker/providers/internet/__init__.py b/faker/providers/internet/__init__.py
index d8d96fe7..1d84b928 100644
--- a/faker/providers/internet/__init__.py
+++ b/faker/providers/internet/__init__.py
@@ -132,8 +132,6 @@ class Provider(BaseProvider):
         "PATCH",
     )
     http_assigned_codes: ElementsType[int] = (
-        100,
-        101,
         100,
         101,
         102,
diff --git a/faker/providers/phone_number/uk_UA/__init__.py b/faker/providers/phone_number/uk_UA/__init__.py
index d26d3365..bd31f641 100644
--- a/faker/providers/phone_number/uk_UA/__init__.py
+++ b/faker/providers/phone_number/uk_UA/__init__.py
@@ -1,8 +1,9 @@
+from .. import ElementsType
 from .. import Provider as PhoneNumberProvider
 
 
 class Provider(PhoneNumberProvider):
-    formats = (
+    formats: ElementsType[str] = (
         "###-##-##",
         "### ## ##",
         "0## ### ## ##",
@@ -12,3 +13,64 @@ class Provider(PhoneNumberProvider):
         "+380 (##) ###-##-##",
         "+380 ## ### ## ##",
     )
+
+    # info: https://ru.wikipedia.org/wiki/MSISDN
+    msisdn_formats: ElementsType[str] = ("############",)
+
+    # info: https://en.wikipedia.org/wiki/Telephone_numbers_in_Ukraine
+    country_calling_codes: ElementsType[str] = (
+        "+38031",
+        "+38032",
+        "+38033",
+        "+38034",
+        "+38035",
+        "+38036",
+        "+38037",
+        "+38038",
+
+        "+38041",
+        "+38043",
+        "+38044",
+        "+38045",
+        "+38046",
+        "+38047",
+        "+38048",
+        "+38049",
+
+        "+38050",
+        "+38051",
+        "+38052",
+        "+38053",
+        "+38054",
+        "+38055",
+        "+38056",
+        "+38057",
+
+        "+38061",
+        "+38062",
+        "+38063",
+        "+38063",
+        "+38065",
+        "+38066",
+        "+38067",
+        "+38068",
+        "+38069",
+
+        "+38070",
+        "+38071",
+        "+38072",
+        "+38073",
+
+        "+3800",
+
+        "+38090",
+        "+38091",
+        "+38092",
+        "+38093",
+        "+38094",
+        "+38095",
+        "+38096",
+        "+38097",
+        "+38098",
+        "+38099",
+    )


Test patch:
diff --git a/tests/providers/test_currency.py b/tests/providers/test_currency.py
index 862a5081..5161749d 100644
--- a/tests/providers/test_currency.py
+++ b/tests/providers/test_currency.py
@@ -1,3 +1,5 @@
+import re
+
 from unittest.mock import patch
 
 import pytest
@@ -117,6 +119,8 @@ class TestRuRu:
         cls.currencies = cls.provider.currencies
         cls.currency_codes, cls.currency_names = tuple(zip(*cls.currencies))
 
+        cls.pricetag_pattern = re.compile(r"\d{1,3}(?:\s\d{3})*,\d{2}\sр\.")
+
     def test_currency(self, faker, num_samples):
         for _ in range(num_samples):
             cur = faker.currency()
@@ -131,6 +135,7 @@ class TestRuRu:
         for _ in range(num_samples):
             pricetag = faker.pricetag()
             assert isinstance(pricetag, str)
+            assert self.pricetag_pattern.fullmatch(pricetag)
 
 
 class TestCsCz: