From 529228a171e792dfc7eaeacdc07b2d7340c7205a Mon Sep 17 00:00:00 2001 From: Isaak Uchakaev Date: Sat, 6 Aug 2022 23:13:43 +0300 Subject: [PATCH] Version 5.6.1 --- CHANGELOG.rst | 11 +++++++++++ mimesis/__init__.py | 2 +- mimesis/data/int/person.py | 2 +- mimesis/providers/internet.py | 4 +--- pyproject.toml | 2 +- tests/test_providers/test_internet.py | 6 ++---- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index dde13f8e8..6d8d3cdb0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,14 @@ +Version 5.6.1 +------------- + +**Fixed**: + +- Fixed ``ValidationFailure`` for ``Internet().uri()``. + +**Removed**: + +- Removed support of ``port`` parameter in ``Internet().uri()``. + Version 5.6.0 **Added**: diff --git a/mimesis/__init__.py b/mimesis/__init__.py index 92a7d9b19..20907eca7 100644 --- a/mimesis/__init__.py +++ b/mimesis/__init__.py @@ -69,7 +69,7 @@ "__license__", ] -__version__ = "5.6.0" +__version__ = "5.6.1" __title__ = "mimesis" __description__ = "Mimesis: fake data generator." __url__ = "https://github.com/lk-geimfari/mimesis" diff --git a/mimesis/data/int/person.py b/mimesis/data/int/person.py index 2f0c18767..8f248ee05 100644 --- a/mimesis/data/int/person.py +++ b/mimesis/data/int/person.py @@ -2863,7 +2863,7 @@ "employ", "employed", "employee", - "employees_db", + "employees", "employer", "employers", "employment", diff --git a/mimesis/providers/internet.py b/mimesis/providers/internet.py index 0ea191093..8c9cea589 100644 --- a/mimesis/providers/internet.py +++ b/mimesis/providers/internet.py @@ -272,7 +272,6 @@ def url( def uri( self, scheme: t.Optional[URLScheme] = URLScheme.HTTPS, - port_range: t.Optional[PortRange] = None, tld_type: t.Optional[TLDType] = None, subdomains: t.Optional[t.List[str]] = None, query_params_count: t.Optional[int] = None, @@ -280,7 +279,6 @@ def uri( """Generate a random URI. :param scheme: Scheme. - :param port_range: PortRange enum object. :param tld_type: TLDType. :param subdomains: List of subdomains (make sure they are valid). :param query_params_count: Query params. @@ -291,7 +289,7 @@ def uri( .strftime("%Y-%m-%d") .replace("-", "/") ) - url = self.url(scheme, port_range, tld_type, subdomains) + url = self.url(scheme, None, tld_type, subdomains) uri = f"{url}{directory}/{self.slug()}" if query_params_count: diff --git a/pyproject.toml b/pyproject.toml index 6d32a46b8..e390895c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "mimesis" -version = "5.6.0" +version = "5.6.1" description = "Mimesis: Fake Data Generator." authors = ["Isaak Uchakaev "] license = "MIT" diff --git a/tests/test_providers/test_internet.py b/tests/test_providers/test_internet.py index d59700584..1106840a0 100644 --- a/tests/test_providers/test_internet.py +++ b/tests/test_providers/test_internet.py @@ -84,11 +84,10 @@ def test_default(self, net): @pytest.mark.repeat(10) @pytest.mark.parametrize( - "scheme, port_range, tld_type, subdomains, query_params_count", + "scheme, tld_type, subdomains, query_params_count", [ ( URLScheme.HTTPS, - PortRange.WELL_KNOWN, TLDType.GTLD, ["core", "app", "test", "dev"], 5, @@ -96,11 +95,10 @@ def test_default(self, net): ], ) def test_uri_with_parameters( - self, net, scheme, port_range, tld_type, subdomains, query_params_count + self, net, scheme, tld_type, subdomains, query_params_count ): uri = net.uri( scheme=scheme, - port_range=port_range, tld_type=tld_type, subdomains=subdomains, query_params_count=query_params_count,