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 2023-05-09 13:05:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Faker (Old) and /work/SRC/openSUSE:Factory/.python-Faker.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Faker" Tue May 9 13:05:54 2023 rev:41 rq:1084848 version:18.6.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Faker/python-Faker.changes 2023-04-27 19:59:53.241556184 +0200 +++ /work/SRC/openSUSE:Factory/.python-Faker.new.1533/python-Faker.changes 2023-05-09 13:05:56.584522884 +0200 @@ -1,0 +2,7 @@ +Thu May 4 19:12:32 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 18.6.0: + * Add a separate `basic_phone_number` for `en_US`. Thanks + @dlwrnc. + +------------------------------------------------------------------- Old: ---- Faker-18.5.1.tar.gz New: ---- Faker-18.6.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Faker.spec ++++++ --- /var/tmp/diff_new_pack.L4ok7g/_old 2023-05-09 13:05:57.220526669 +0200 +++ /var/tmp/diff_new_pack.L4ok7g/_new 2023-05-09 13:05:57.228526717 +0200 @@ -20,7 +20,7 @@ %global skip_python2 1 %{?sle15_python_module_pythons} Name: python-Faker -Version: 18.5.1 +Version: 18.6.0 Release: 0 Summary: Python package that generates fake data License: MIT @@ -28,12 +28,13 @@ Source: https://files.pythonhosted.org/packages/source/F/Faker/Faker-%{version}.tar.gz BuildRequires: %{python_module UkPostcodeParser >= 1.1.1} BuildRequires: %{python_module freezegun} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest >= 6.0.1} BuildRequires: %{python_module python-dateutil >= 2.4} BuildRequires: %{python_module random2} -BuildRequires: %{python_module setuptools} BuildRequires: %{python_module text-unidecode >= 1.3} BuildRequires: %{python_module validators >= 0.13.0} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-python-dateutil >= 2.4 @@ -58,10 +59,10 @@ sed -i -e 's:==:>=:g' setup.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/faker %python_expand %fdupes %{buildroot}%{$python_sitelib} ++++++ Faker-18.5.1.tar.gz -> Faker-18.6.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-18.5.1/CHANGELOG.md new/Faker-18.6.0/CHANGELOG.md --- old/Faker-18.5.1/CHANGELOG.md 2023-04-24 17:54:53.000000000 +0200 +++ new/Faker-18.6.0/CHANGELOG.md 2023-04-27 17:11:43.000000000 +0200 @@ -1,6 +1,10 @@ ## Changelog -### [v18.5.1 - 2023-04-24](https://github.com/joke2k/faker/compare/v18.5.1...v18.5.1) +### [v18.6.0 - 2023-04-27](https://github.com/joke2k/faker/compare/v18.5.1...v18.6.0) + +* Add a separate `basic_phone_number` for `en_US`. Thanks @dlwrnc. + +### [v18.5.1 - 2023-04-24](https://github.com/joke2k/faker/compare/v18.5.0...v18.5.1) * Fix release. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-18.5.1/Faker.egg-info/PKG-INFO new/Faker-18.6.0/Faker.egg-info/PKG-INFO --- old/Faker-18.5.1/Faker.egg-info/PKG-INFO 2023-04-24 17:55:26.000000000 +0200 +++ new/Faker-18.6.0/Faker.egg-info/PKG-INFO 2023-04-27 17:12:52.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: Faker -Version: 18.5.1 +Version: 18.6.0 Summary: Faker is a Python package that generates fake data for you. Home-page: https://github.com/joke2k/faker Author: joke2k diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-18.5.1/PKG-INFO new/Faker-18.6.0/PKG-INFO --- old/Faker-18.5.1/PKG-INFO 2023-04-24 17:55:29.350040400 +0200 +++ new/Faker-18.6.0/PKG-INFO 2023-04-27 17:12:55.708264400 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: Faker -Version: 18.5.1 +Version: 18.6.0 Summary: Faker is a Python package that generates fake data for you. Home-page: https://github.com/joke2k/faker Author: joke2k diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-18.5.1/VERSION new/Faker-18.6.0/VERSION --- old/Faker-18.5.1/VERSION 2023-04-24 17:55:02.000000000 +0200 +++ new/Faker-18.6.0/VERSION 2023-04-27 17:12:12.000000000 +0200 @@ -1 +1 @@ -18.5.1 +18.6.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-18.5.1/faker/__init__.py new/Faker-18.6.0/faker/__init__.py --- old/Faker-18.5.1/faker/__init__.py 2023-04-24 17:55:02.000000000 +0200 +++ new/Faker-18.6.0/faker/__init__.py 2023-04-27 17:12:12.000000000 +0200 @@ -2,6 +2,6 @@ from faker.generator import Generator from faker.proxy import Faker -VERSION = "18.5.1" +VERSION = "18.6.0" __all__ = ("Factory", "Generator", "Faker") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-18.5.1/faker/providers/phone_number/en_US/__init__.py new/Faker-18.6.0/faker/providers/phone_number/en_US/__init__.py --- old/Faker-18.5.1/faker/providers/phone_number/en_US/__init__.py 2022-02-14 18:03:11.000000000 +0100 +++ new/Faker-18.6.0/faker/providers/phone_number/en_US/__init__.py 2023-04-27 17:10:29.000000000 +0200 @@ -37,3 +37,14 @@ "001-###-###-####x####", "001-###-###-####x#####", ) + + basic_formats = ( + # basic 10-digit phone number format with no extensions + "##########", + "###-###-####", + "(###)###-####", + ) + + def basic_phone_number(self) -> str: + pattern: str = self.random_element(self.basic_formats) + return self.numerify(self.generator.parse(pattern)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-18.5.1/tests/providers/test_phone_number.py new/Faker-18.6.0/tests/providers/test_phone_number.py --- old/Faker-18.5.1/tests/providers/test_phone_number.py 2022-02-14 18:03:11.000000000 +0100 +++ new/Faker-18.6.0/tests/providers/test_phone_number.py 2023-04-27 17:10:29.000000000 +0200 @@ -364,3 +364,18 @@ for _ in range(num_samples): phone_number = faker.phone_number() assert any([re.match(pattern, phone_number) for pattern in patterns]) + + +class TestEnUs: + """Test En_US phone provider methods""" + + def test_basic_phone_number(self, faker, num_samples): + pattern_no_whitespaces: Pattern = re.compile( + r"\d{9}", + ) + pattern_dashes: Pattern = re.compile(r"\d{3}-\d{3}-\d{4}") + pattern_parens: Pattern = re.compile(r"\(\d{3}\)\d{3}-\d{4}") + patterns = [pattern_no_whitespaces, pattern_dashes, pattern_parens] + for _ in range(num_samples): + phone_number = faker.basic_phone_number() + assert any([re.match(pattern, phone_number) for pattern in patterns])