Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-Faker for openSUSE:Factory 
checked in at 2022-10-29 20:16:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Faker (Old)
 and      /work/SRC/openSUSE:Factory/.python-Faker.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Faker"

Sat Oct 29 20:16:34 2022 rev:32 rq:1032044 version:15.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Faker/python-Faker.changes        
2022-10-12 18:27:42.934089285 +0200
+++ /work/SRC/openSUSE:Factory/.python-Faker.new.2275/python-Faker.changes      
2022-10-29 20:17:50.898447722 +0200
@@ -1,0 +2,11 @@
+Thu Oct 27 19:32:31 UTC 2022 - Yogalakshmi Arunachalam <yarunacha...@suse.com>
+
+- Update to v15.1.1 
+  * Fix ImportError on python <3.7.2
+- Update to v15.1.0
+  * Add enum provider.
+- Update to v15.0.0
+  * Add support for Python 3.10. Thanks @uri-rodberg.
+  * Drop support for Python 3.6.
+
+-------------------------------------------------------------------

Old:
----
  Faker-14.2.1.tar.gz

New:
----
  Faker-15.1.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-Faker.spec ++++++
--- /var/tmp/diff_new_pack.C8Gadz/_old  2022-10-29 20:17:52.126454265 +0200
+++ /var/tmp/diff_new_pack.C8Gadz/_new  2022-10-29 20:17:52.130454286 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python3-%{**}}
 %global skip_python2 1
 Name:           python-Faker
-Version:        14.2.1
+Version:        15.1.1
 Release:        0
 Summary:        Python package that generates fake data
 License:        MIT

++++++ Faker-14.2.1.tar.gz -> Faker-15.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/CHANGELOG.md 
new/Faker-15.1.1/CHANGELOG.md
--- old/Faker-14.2.1/CHANGELOG.md       2022-09-22 18:21:05.000000000 +0200
+++ new/Faker-15.1.1/CHANGELOG.md       2022-10-13 17:59:12.000000000 +0200
@@ -1,5 +1,18 @@
 ## Changelog
 
+### [v15.1.1 - 
2022-10-13](https://github.com/joke2k/faker/compare/v15.1.0...v15.1.1)
+
+* Fix ImportError on python <3.7.2. Thanks @matthewhughes934.
+
+### [v15.1.0 - 
2022-10-11](https://github.com/joke2k/faker/compare/v15.0.0...v15.1.0)
+
+* Add enum provider. Thanks @NazarioJL.
+
+### [v15.0.0 - 
2022-09-26](https://github.com/joke2k/faker/compare/v14.2.1...v15.0.0)
+
+* Add support for Python 3.10. Thanks @uri-rodberg.
+* Drop support for Python 3.6. Thanks @uri-rodberg.
+
 ### [v14.2.1 - 
2022-09-22](https://github.com/joke2k/faker/compare/v14.2.0...v14.2.1)
 
 * Fix misspelled first name in `da_DK` locale. Thanks @filson1.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/Faker.egg-info/PKG-INFO 
new/Faker-15.1.1/Faker.egg-info/PKG-INFO
--- old/Faker-14.2.1/Faker.egg-info/PKG-INFO    2022-09-22 18:33:25.000000000 
+0200
+++ new/Faker-15.1.1/Faker.egg-info/PKG-INFO    2022-10-13 17:59:50.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Faker
-Version: 14.2.1
+Version: 15.1.1
 Summary: Faker is a Python package that generates fake data for you.
 Home-page: https://github.com/joke2k/faker
 Author: joke2k
@@ -18,17 +18,17 @@
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: Software Development :: Testing
 Classifier: Topic :: Utilities
 Classifier: License :: OSI Approved :: MIT License
-Requires-Python: >=3.6
+Requires-Python: >=3.7
 License-File: LICENSE.txt
 
 *Faker* is a Python package that generates fake data for you. Whether
@@ -56,7 +56,7 @@
 -------------
 
 Starting from version ``4.0.0``, ``Faker`` dropped support for Python 2 and 
from version ``5.0.0``
-only supports Python 3.6 and above. If you still need Python 2 compatibility, 
please install version ``3.0.1`` in the
+only supports Python 3.7 and above. If you still need Python 2 compatibility, 
please install version ``3.0.1`` in the
 meantime, and please consider updating your codebase to support Python 3 so 
you can enjoy the
 latest features ``Faker`` has to offer. Please see the `extended docs`_ for 
more details, especially
 if you are upgrading from version ``2.0.4`` and below as there might be 
breaking changes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/Faker.egg-info/SOURCES.txt 
new/Faker-15.1.1/Faker.egg-info/SOURCES.txt
--- old/Faker-14.2.1/Faker.egg-info/SOURCES.txt 2022-09-22 18:33:26.000000000 
+0200
+++ new/Faker-15.1.1/Faker.egg-info/SOURCES.txt 2022-10-13 17:59:50.000000000 
+0200
@@ -630,6 +630,7 @@
 tests/providers/test_currency.py
 tests/providers/test_date_time.py
 tests/providers/test_dynamic.py
+tests/providers/test_enum.py
 tests/providers/test_file.py
 tests/providers/test_geo.py
 tests/providers/test_internet.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/Faker.egg-info/requires.txt 
new/Faker-15.1.1/Faker.egg-info/requires.txt
--- old/Faker-14.2.1/Faker.egg-info/requires.txt        2022-09-22 
18:33:25.000000000 +0200
+++ new/Faker-15.1.1/Faker.egg-info/requires.txt        2022-10-13 
17:59:50.000000000 +0200
@@ -1,4 +1,4 @@
 python-dateutil>=2.4
 
 [:python_version < "3.8"]
-typing-extensions>=3.7.4.3
+typing-extensions>=3.10.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/PKG-INFO new/Faker-15.1.1/PKG-INFO
--- old/Faker-14.2.1/PKG-INFO   2022-09-22 18:33:26.848129700 +0200
+++ new/Faker-15.1.1/PKG-INFO   2022-10-13 17:59:51.522038200 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Faker
-Version: 14.2.1
+Version: 15.1.1
 Summary: Faker is a Python package that generates fake data for you.
 Home-page: https://github.com/joke2k/faker
 Author: joke2k
@@ -18,17 +18,17 @@
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: Software Development :: Testing
 Classifier: Topic :: Utilities
 Classifier: License :: OSI Approved :: MIT License
-Requires-Python: >=3.6
+Requires-Python: >=3.7
 License-File: LICENSE.txt
 
 *Faker* is a Python package that generates fake data for you. Whether
@@ -56,7 +56,7 @@
 -------------
 
 Starting from version ``4.0.0``, ``Faker`` dropped support for Python 2 and 
from version ``5.0.0``
-only supports Python 3.6 and above. If you still need Python 2 compatibility, 
please install version ``3.0.1`` in the
+only supports Python 3.7 and above. If you still need Python 2 compatibility, 
please install version ``3.0.1`` in the
 meantime, and please consider updating your codebase to support Python 3 so 
you can enjoy the
 latest features ``Faker`` has to offer. Please see the `extended docs`_ for 
more details, especially
 if you are upgrading from version ``2.0.4`` and below as there might be 
breaking changes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/README.rst new/Faker-15.1.1/README.rst
--- old/Faker-14.2.1/README.rst 2022-02-14 18:03:10.000000000 +0100
+++ new/Faker-15.1.1/README.rst 2022-09-26 17:38:34.000000000 +0200
@@ -23,7 +23,7 @@
 -------------
 
 Starting from version ``4.0.0``, ``Faker`` dropped support for Python 2 and 
from version ``5.0.0``
-only supports Python 3.6 and above. If you still need Python 2 compatibility, 
please install version ``3.0.1`` in the
+only supports Python 3.7 and above. If you still need Python 2 compatibility, 
please install version ``3.0.1`` in the
 meantime, and please consider updating your codebase to support Python 3 so 
you can enjoy the
 latest features ``Faker`` has to offer. Please see the `extended docs`_ for 
more details, especially
 if you are upgrading from version ``2.0.4`` and below as there might be 
breaking changes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/VERSION new/Faker-15.1.1/VERSION
--- old/Faker-14.2.1/VERSION    2022-09-22 18:21:51.000000000 +0200
+++ new/Faker-15.1.1/VERSION    2022-10-13 17:59:34.000000000 +0200
@@ -1 +1 @@
-14.2.1
+15.1.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/faker/__init__.py 
new/Faker-15.1.1/faker/__init__.py
--- old/Faker-14.2.1/faker/__init__.py  2022-09-22 18:21:51.000000000 +0200
+++ new/Faker-15.1.1/faker/__init__.py  2022-10-13 17:59:34.000000000 +0200
@@ -2,6 +2,6 @@
 from faker.generator import Generator
 from faker.proxy import Faker
 
-VERSION = "14.2.1"
+VERSION = "15.1.1"
 
 __all__ = ("Factory", "Generator", "Faker")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/faker/documentor.py 
new/Faker-15.1.1/faker/documentor.py
--- old/Faker-14.2.1/faker/documentor.py        2022-03-07 17:46:40.000000000 
+0100
+++ new/Faker-15.1.1/faker/documentor.py        2022-10-11 21:13:15.000000000 
+0200
@@ -1,13 +1,21 @@
 import inspect
 import warnings
 
-from typing import Any, Dict, List, Optional, Tuple, Union
+from enum import Enum, auto
+from typing import Any, Dict, List, Optional, Tuple, Type, Union
 
 from .generator import Generator
 from .providers import BaseProvider
 from .proxy import Faker
 
 
+class FakerEnum(Enum):
+    """Required for faker.providers.enum"""
+
+    A = auto
+    B = auto
+
+
 class Documentor:
     def __init__(self, generator: Union[Generator, Faker]) -> None:
         """
@@ -52,7 +60,7 @@
                 continue
 
             arguments = []
-            faker_args: List[str] = []
+            faker_args: List[Union[str, Type[Enum]]] = []
             faker_kwargs = {}
 
             if name == "binary":
@@ -65,6 +73,9 @@
                     }
                 )
 
+            if name == "enum":
+                faker_args = [FakerEnum]
+
             if with_args:
                 # retrieve all parameter
                 argspec = inspect.getfullargspec(method)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/faker/providers/__init__.py 
new/Faker-15.1.1/faker/providers/__init__.py
--- old/Faker-14.2.1/faker/providers/__init__.py        2022-07-28 
16:57:28.000000000 +0200
+++ new/Faker-15.1.1/faker/providers/__init__.py        2022-10-13 
17:58:04.000000000 +0200
@@ -5,6 +5,7 @@
 from typing import Any, Collection, List, Optional, Sequence, TypeVar, Union
 
 from ..generator import Generator
+from ..typing import OrderedDictType
 from ..utils.distribution import choices_distribution, 
choices_distribution_unique
 
 _re_hash = re.compile(r"#")
@@ -14,8 +15,9 @@
 _re_qm = re.compile(r"\?")
 _re_cir = re.compile(r"\^")
 
+S = TypeVar("S")
 T = TypeVar("T")
-ElementsType = Collection[T]
+ElementsType = Union[Collection[T], OrderedDictType[T, float]]
 
 
 class BaseProvider:
@@ -490,7 +492,7 @@
             if not hasattr(elements, "_key_cache"):
                 elements._key_cache = tuple(elements.keys())  # type: ignore
 
-            choices = elements._key_cache  # type: ignore[attr-defined]
+            choices = elements._key_cache  # type: ignore[attr-defined, 
union-attr]
             probabilities = tuple(elements.values()) if use_weighting else None
         else:
             if unique:
@@ -568,10 +570,10 @@
 
     def random_element(
         self,
-        elements: ElementsType = ("a", "b", "c"),
+        elements: ElementsType[S] = ("a", "b", "c"),  # type: 
ignore[assignment]
         min_element_length: Optional[int] = None,
         max_element_length: Optional[int] = None,
-    ) -> T:
+    ) -> S:
         """Generate a randomly sampled object from ``elements``.
 
         For information on the ``elements`` argument, please refer to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/faker/providers/barcode/__init__.py 
new/Faker-15.1.1/faker/providers/barcode/__init__.py
--- old/Faker-14.2.1/faker/providers/barcode/__init__.py        2022-02-14 
18:03:10.000000000 +0100
+++ new/Faker-15.1.1/faker/providers/barcode/__init__.py        2022-10-11 
21:23:23.000000000 +0200
@@ -24,7 +24,7 @@
         code = [self.random_digit() for _ in range(length - 1)]
 
         if prefixes:
-            prefix: str = self.random_element(prefixes)
+            prefix: str = self.random_element(prefixes)  # type: 
ignore[assignment]
             code[: len(prefix)] = map(int, prefix)
 
         if length == 8:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/faker/providers/credit_card/__init__.py 
new/Faker-15.1.1/faker/providers/credit_card/__init__.py
--- old/Faker-14.2.1/faker/providers/credit_card/__init__.py    2022-02-14 
18:03:11.000000000 +0100
+++ new/Faker-15.1.1/faker/providers/credit_card/__init__.py    2022-10-11 
21:23:19.000000000 +0200
@@ -130,7 +130,7 @@
     def credit_card_provider(self, card_type: Optional[CardType] = None) -> 
str:
         """Generate a credit card provider name."""
         if card_type is None:
-            card_type = self.random_element(self.credit_card_types.keys())
+            card_type = self.random_element(self.credit_card_types.keys())  # 
type: ignore[assignment]
         return self._credit_card_type(card_type).name
 
     def credit_card_number(self, card_type: Optional[CardType] = None) -> str:
@@ -182,10 +182,10 @@
     def _credit_card_type(self, card_type: Optional[CardType] = None) -> 
CreditCard:
         """Generate a random CreditCard instance of the specified card type."""
         if card_type is None:
-            card_type = self.random_element(self.credit_card_types.keys())
+            card_type = self.random_element(self.credit_card_types.keys())  # 
type: ignore[assignment]
         elif isinstance(card_type, CreditCard):
             return card_type
-        return self.credit_card_types[card_type]
+        return self.credit_card_types[card_type]  # type: ignore[index]
 
     def _generate_number(self, prefix: str, length: int) -> str:
         """Generate a credit card number.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/faker/providers/profile/__init__.py 
new/Faker-15.1.1/faker/providers/profile/__init__.py
--- old/Faker-14.2.1/faker/providers/profile/__init__.py        2022-02-14 
18:03:11.000000000 +0100
+++ new/Faker-15.1.1/faker/providers/profile/__init__.py        2022-10-11 
21:13:19.000000000 +0200
@@ -4,7 +4,7 @@
 from decimal import Decimal
 from typing import Dict, List, Optional, Tuple, Union
 
-from ...typing import GenderType
+from ...typing import SexLiteral
 from .. import BaseProvider
 
 
@@ -14,7 +14,7 @@
 
     """
 
-    def simple_profile(self, sex: Optional[GenderType] = None) -> Dict[str, 
Union[str, date, GenderType]]:
+    def simple_profile(self, sex: Optional[SexLiteral] = None) -> Dict[str, 
Union[str, date, SexLiteral]]:
         """
         Generates a basic profile with personal informations
         """
@@ -33,7 +33,7 @@
         }
 
     def profile(
-        self, fields: Optional[List[str]] = None, sex: Optional[GenderType] = 
None
+        self, fields: Optional[List[str]] = None, sex: Optional[SexLiteral] = 
None
     ) -> Dict[str, Union[str, Tuple[Decimal, Decimal], List[str], date]]:
         """
         Generates a complete profile.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/faker/providers/python/__init__.py 
new/Faker-15.1.1/faker/providers/python/__init__.py
--- old/Faker-14.2.1/faker/providers/python/__init__.py 2022-08-31 
19:20:38.000000000 +0200
+++ new/Faker-15.1.1/faker/providers/python/__init__.py 2022-10-11 
21:13:15.000000000 +0200
@@ -4,12 +4,19 @@
 import warnings
 
 from decimal import Decimal
-from typing import Any, Dict, Iterable, Iterator, List, Optional, Set, Tuple, 
Type, Union, no_type_check
+from enum import Enum
+from typing import Any, Dict, Iterable, Iterator, List, Optional, Set, Tuple, 
Type, TypeVar, Union, cast, no_type_check
 
+from ...exceptions import BaseFakerException
 from .. import BaseProvider, ElementsType
 
 TypesNames = List[str]
 TypesSpec = Union[List[Type], Tuple[Type, ...]]
+TEnum = TypeVar("TEnum", bound=Enum)
+
+
+class EmptyEnumException(BaseFakerException):
+    pass
 
 
 class Provider(BaseProvider):
@@ -417,3 +424,24 @@
                 },
             }
         return types, d, nd
+
+    def enum(self, enum_cls: Type[TEnum]) -> TEnum:
+        """
+        Returns a random enum of the provided input `Enum` type.
+
+        :param enum_cls: The `Enum` type to produce the value for.
+        :returns: A randomly selected enum value.
+        """
+
+        if enum_cls is None:
+            raise ValueError("'enum_cls' cannot be None")
+
+        if not issubclass(enum_cls, Enum):
+            raise TypeError("'enum_cls' must be an Enum type")
+
+        members: List[TEnum] = list(cast(Iterable[TEnum], enum_cls))
+
+        if len(members) < 1:
+            raise EmptyEnumException(f"The provided Enum: 
'{enum_cls.__name__}' has no members.")
+
+        return self.random_element(members)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/faker/providers/ssn/hu_HU/__init__.py 
new/Faker-15.1.1/faker/providers/ssn/hu_HU/__init__.py
--- old/Faker-14.2.1/faker/providers/ssn/hu_HU/__init__.py      2022-02-14 
18:03:11.000000000 +0100
+++ new/Faker-15.1.1/faker/providers/ssn/hu_HU/__init__.py      2022-10-11 
21:13:19.000000000 +0200
@@ -2,7 +2,7 @@
 from math import fmod
 from typing import Optional
 
-from ....typing import GenderType
+from ....typing import SexLiteral
 from .. import Provider as SsnProvider
 
 
@@ -11,7 +11,7 @@
 
 
 class Provider(SsnProvider):
-    def ssn(self, dob: Optional[str] = None, gender: Optional[GenderType] = 
None) -> str:
+    def ssn(self, dob: Optional[str] = None, gender: Optional[SexLiteral] = 
None) -> str:
         """
         Generates Hungarian SSN equivalent (szem??lyazonos??t?? sz??m or, 
colloquially, szem??lyi sz??m)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/faker/providers/ssn/no_NO/__init__.py 
new/Faker-15.1.1/faker/providers/ssn/no_NO/__init__.py
--- old/Faker-14.2.1/faker/providers/ssn/no_NO/__init__.py      2022-02-14 
18:03:11.000000000 +0100
+++ new/Faker-15.1.1/faker/providers/ssn/no_NO/__init__.py      2022-10-11 
21:13:19.000000000 +0200
@@ -3,7 +3,7 @@
 
 from typing import List, Optional, Sequence
 
-from ....typing import GenderType
+from ....typing import SexLiteral
 from .. import Provider as SsnProvider
 
 
@@ -30,7 +30,7 @@
     scale1 = (3, 7, 6, 1, 8, 9, 4, 5, 2)
     scale2 = (5, 4, 3, 2, 7, 6, 5, 4, 3, 2)
 
-    def ssn(self, dob: Optional[str] = None, gender: Optional[GenderType] = 
None) -> str:
+    def ssn(self, dob: Optional[str] = None, gender: Optional[SexLiteral] = 
None) -> str:
         """
         Returns 11 character Norwegian personal identity code (F??dselsnummer).
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/faker/providers/ssn/zh_CN/__init__.py 
new/Faker-15.1.1/faker/providers/ssn/zh_CN/__init__.py
--- old/Faker-14.2.1/faker/providers/ssn/zh_CN/__init__.py      2022-02-14 
18:03:11.000000000 +0100
+++ new/Faker-15.1.1/faker/providers/ssn/zh_CN/__init__.py      2022-10-11 
21:13:19.000000000 +0200
@@ -2,7 +2,7 @@
 
 from typing import List, Optional
 
-from ....typing import GenderType
+from ....typing import SexLiteral
 from .. import Provider as SsnProvider
 
 
@@ -3524,7 +3524,7 @@
         "820000",
     ]
 
-    def ssn(self, min_age: int = 18, max_age: int = 90, gender: 
Optional[GenderType] = None) -> str:
+    def ssn(self, min_age: int = 18, max_age: int = 90, gender: 
Optional[SexLiteral] = None) -> str:
         """
         Return 18 character chinese personal identity code
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/faker/typing.py 
new/Faker-15.1.1/faker/typing.py
--- old/Faker-14.2.1/faker/typing.py    2022-05-06 16:26:12.000000000 +0200
+++ new/Faker-15.1.1/faker/typing.py    2022-10-13 17:58:04.000000000 +0200
@@ -1,3 +1,5 @@
+import sys
+
 from datetime import date, datetime, timedelta
 from typing import Sequence, TypeVar, Union
 
@@ -6,7 +8,14 @@
 except ImportError:
     from typing_extensions import Literal  # type: ignore
 
+if sys.version_info >= (3, 9):
+    from collections import OrderedDict as OrderedDictType
+elif sys.version_info >= (3, 7, 2):
+    from typing import OrderedDict as OrderedDictType
+else:
+    from typing_extensions import OrderedDict as OrderedDictType  # NOQA
+
 DateParseType = Union[date, datetime, timedelta, str, int]
 HueType = TypeVar("HueType", str, float, Sequence[int])
-GenderType = TypeVar("GenderType", bound=Literal["M", "F"])
+SexLiteral = Literal["M", "F"]
 SeedType = Union[int, float, str, bytes, bytearray, None]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/setup.py new/Faker-15.1.1/setup.py
--- old/Faker-14.2.1/setup.py   2022-08-30 21:02:33.000000000 +0200
+++ new/Faker-15.1.1/setup.py   2022-10-12 15:47:01.000000000 +0200
@@ -41,10 +41,10 @@
         "Programming Language :: Python",
         "Programming Language :: Python :: 3",
         "Programming Language :: Python :: 3 :: Only",
-        "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
+        "Programming Language :: Python :: 3.10",
         "Programming Language :: Python :: Implementation :: CPython",
         "Programming Language :: Python :: Implementation :: PyPy",
         "Topic :: Software Development :: Libraries :: Python Modules",
@@ -69,9 +69,9 @@
     },
     platforms=["any"],
     zip_safe=zip_safe,
-    python_requires=">=3.6",
+    python_requires=">=3.7",
     install_requires=[
         "python-dateutil>=2.4",
-        "typing-extensions>=3.7.4.3;python_version<'3.8'",
+        "typing-extensions>=3.10.0.1;python_version<'3.8'",
     ],
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Faker-14.2.1/tests/providers/test_enum.py 
new/Faker-15.1.1/tests/providers/test_enum.py
--- old/Faker-14.2.1/tests/providers/test_enum.py       1970-01-01 
01:00:00.000000000 +0100
+++ new/Faker-15.1.1/tests/providers/test_enum.py       2022-10-11 
21:13:15.000000000 +0200
@@ -0,0 +1,51 @@
+from enum import Enum, auto
+
+import pytest
+
+from faker.providers.python import EmptyEnumException
+
+
+class _TestEnumWithNoElements(Enum):
+    pass
+
+
+class _TestEnumWithSingleElement(Enum):
+    Single = auto
+
+
+class _TestEnum(Enum):
+    A = auto
+    B = auto
+    C = auto
+
+
+class TestEnumProvider:
+
+    num_samples = 100
+
+    def test_enum(self, faker, num_samples):
+        # (1/3) ** 100 ~ 1.94e-48 probability of this test failing because a 
specific
+        # value was not sampled
+        for _ in range(num_samples):
+            actual = faker.enum(_TestEnum)
+            assert actual in (_TestEnum.A, _TestEnum.B, _TestEnum.C)
+
+    def test_enum_single(self, faker):
+        assert faker.enum(_TestEnumWithSingleElement) == 
_TestEnumWithSingleElement.Single
+        assert faker.enum(_TestEnumWithSingleElement) == 
_TestEnumWithSingleElement.Single
+
+    def test_empty_enum_raises(self, faker):
+        with pytest.raises(
+            EmptyEnumException,
+            match="The provided Enum: '_TestEnumWithNoElements' has no 
members.",
+        ):
+            faker.enum(_TestEnumWithNoElements)
+
+    def test_none_raises(self, faker):
+        with pytest.raises(ValueError):
+            faker.enum(None)
+
+    def test_incorrect_type_raises(self, faker):
+        not_an_enum_type = type("NotAnEnumType")
+        with pytest.raises(TypeError):
+            faker.enum(not_an_enum_type)

Reply via email to