Repository: joke2k/faker
Pull request #1924 (2023-10-09 20:38:59)

use DE base for AddressProvider (#1916)
### What does this change
Partial fix for #1916 

The original base (via `providers/date_time/__init__.py`) still loads strings with the wrong encoding.


Patch:
diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index f31d0ae4..aaac4d7c 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 19.8.0
+current_version = 19.8.1
 files = VERSION faker/__init__.py docs/conf.py
 commit = True
 tag = True
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 86536504..eec339f3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 ## Changelog
 
+### [v19.8.1 - 2023-10-10](https://github.com/joke2k/faker/compare/v19.8.0...v19.8.1)
+
+* Fix `person` Latvian provider.
+
 ### [v19.8.0 - 2023-10-09](https://github.com/joke2k/faker/compare/v19.7.0...v19.8.0)
 
 *  Add Gender support for Latvian (`lv_LV`) names. Thanks @OskarsPakers.
diff --git a/VERSION b/VERSION
index 67bfd2c5..97b43825 100644
--- a/VERSION
+++ b/VERSION
@@ -1,1 +1,1 @@
-19.8.0
+19.8.1
diff --git a/docs/conf.py b/docs/conf.py
index bb853d6c..79be1332 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 = "19.8.0"
+version = "19.8.1"
 # The full version, including alpha/beta/rc tags.
-release = "19.8.0"
+release = "19.8.1"
 
 # 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 f8ec6f45..099e1071 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 = "19.8.0"
+VERSION = "19.8.1"
 
 __all__ = ("Factory", "Generator", "Faker")
diff --git a/faker/providers/address/de_CH/__init__.py b/faker/providers/address/de_CH/__init__.py
index 3a096b65..be38c107 100644
--- a/faker/providers/address/de_CH/__init__.py
+++ b/faker/providers/address/de_CH/__init__.py
@@ -1,6 +1,6 @@
 from typing import Tuple
 
-from .. import Provider as AddressProvider
+from ..de import Provider as AddressProvider
 
 
 class Provider(AddressProvider):
diff --git a/faker/providers/person/lv_LV/__init__.py b/faker/providers/person/lv_LV/__init__.py
index 05a24c23..7636995f 100644
--- a/faker/providers/person/lv_LV/__init__.py
+++ b/faker/providers/person/lv_LV/__init__.py
@@ -287,7 +287,7 @@ class Provider(PersonProvider):
 
     first_names = first_names_male + first_names_female
 
-    last_names_unisex = (
+    last_names_nonbinary = (
         "Ābele",
         "Bite",
         "Caune",
@@ -438,4 +438,4 @@ class Provider(PersonProvider):
         "Zvirbule",
     )
 
-    last_names = last_names_male + last_names_female + last_names_unisex
+    last_names = last_names_male + last_names_female + last_names_nonbinary


Test patch:
diff --git a/tests/providers/test_person.py b/tests/providers/test_person.py
index 6b24d69f..e361029a 100644
--- a/tests/providers/test_person.py
+++ b/tests/providers/test_person.py
@@ -299,21 +299,21 @@ class TestLvLV(unittest.TestCase):
         name = self.fake.first_name()
         assert name
         self.assertIsInstance(name, str)
-        assert name in LvProvider.provider.first_names
+        assert name in LvProvider.first_names
 
         # Females first name
         name = self.fake.first_name_female()
         assert name
         self.assertIsInstance(name, str)
-        assert name in LvProvider.provider.first_names
-        assert name in LvProvider.provider.first_names_female
+        assert name in LvProvider.first_names
+        assert name in LvProvider.first_names_female
 
         # Male first name
         name = self.fake.first_name_male()
         assert name
         self.assertIsInstance(name, str)
-        assert name in LvProvider.provider.first_names
-        assert name in LvProvider.provider.first_names_male
+        assert name in LvProvider.first_names
+        assert name in LvProvider.first_names_male
 
     def test_last_name(self):
         # General last name.
@@ -326,10 +326,10 @@ class TestLvLV(unittest.TestCase):
         name = self.fake.last_name_female()
         assert name
         self.assertIsInstance(name, str)
-        assert name in LvProvider.last_names_female + LvProvider.last_names_unisex
+        assert name in LvProvider.last_names_female + LvProvider.last_names_nonbinary
 
         # Females only last name.
-        name = self.fake.last_name_unique_to_female()
+        name = self.fake.last_name_female()
         assert name
         self.assertIsInstance(name, str)
         assert name in LvProvider.last_names_female
@@ -338,10 +338,10 @@ class TestLvLV(unittest.TestCase):
         name = self.fake.last_name_male()
         assert name
         self.assertIsInstance(name, str)
-        assert name in LvProvider.last_names_male + LvProvider.last_names_unisex
+        assert name in LvProvider.last_names_male + LvProvider.last_names_nonbinary
 
         # Male only last name.
-        name = self.fake.last_name_unique_to_male()
+        name = self.fake.last_name_male()
         assert name
         self.assertIsInstance(name, str)
         assert name in LvProvider.last_names_male