Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-validators for openSUSE:Factory checked in at 2024-05-28 17:27:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-validators (Old) and /work/SRC/openSUSE:Factory/.python-validators.new.24587 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-validators" Tue May 28 17:27:35 2024 rev:23 rq:1176833 version:0.28.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-validators/python-validators.changes 2024-04-26 23:26:46.707867992 +0200 +++ /work/SRC/openSUSE:Factory/.python-validators.new.24587/python-validators.changes 2024-05-28 17:27:55.642053075 +0200 @@ -1,0 +2,14 @@ +Sat May 25 11:48:27 UTC 2024 - Mia Herkt <m...@0x0.st> + +- Update to 0.28.3 + * ensure _tld.txt is in sdist and bdist + gh#kvesteri/validators#379 +- Changes in 0.28.2: + * fix: corrects a few typo + gh#kvesteri/validators#371 + * fix(ip_address): properly handle private is false + gh#kvesteri/validators#374 + * chore(url): allow symbols and pictographs in url + gh#kvesteri/validators#375 + +------------------------------------------------------------------- Old: ---- validators-0.28.1.tar.gz New: ---- validators-0.28.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-validators.spec ++++++ --- /var/tmp/diff_new_pack.tVk2o1/_old 2024-05-28 17:27:56.486083939 +0200 +++ /var/tmp/diff_new_pack.tVk2o1/_new 2024-05-28 17:27:56.490084085 +0200 @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-validators -Version: 0.28.1 +Version: 0.28.3 Release: 0 Summary: Python Data Validation License: MIT ++++++ validators-0.28.1.tar.gz -> validators-0.28.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/.gitignore new/validators-0.28.3/.gitignore --- old/validators-0.28.1/.gitignore 2024-04-04 05:15:02.000000000 +0200 +++ new/validators-0.28.3/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,177 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ -docs/*.1 - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml -.pdm-python -.pdm-build/ - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ -.venv.dev/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -site/ - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - -# VSCode -.vscode/ - -# asdf -.tool-versions - -# rtx/mise -.rtx.toml -.mise.toml - -# ruff -.ruff_cache diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/CHANGES.md new/validators-0.28.3/CHANGES.md --- old/validators-0.28.1/CHANGES.md 2024-04-19 15:22:20.000000000 +0200 +++ new/validators-0.28.3/CHANGES.md 2024-05-25 04:52:58.000000000 +0200 @@ -9,6 +9,43 @@ --> +## 0.28.3 (2024-05-25) + +_**Breaking**_ + +> No breaking changes were introduced in this version. + +_**Features**_ + +> No features were introduced in this version. + +_**Maintenance**_ + +- hotfix: ensure `_tld.txt` is in `sdist` and `bdist` by @yozachar in [#379](https://github.com/python-validators/validators/pull/379) + +**Full Changelog**: [`0.28.2...0.28.3`](https://github.com/python-validators/validators/compare/0.28.2...0.28.3) + +## 0.28.2 (2024-05-24) + +_**Breaking**_ + +> No breaking changes were introduced in this version. + +_**Features**_ + +> No features were introduced in this version. + +_**Maintenance**_ + +- fix: corrects a few typo by @yozachar in [#371](https://github.com/python-validators/validators/pull/371) +- build(deps): bump jinja2 from 3.1.3 to 3.1.4 in /package by @dependabot in [#372](https://github.com/python-validators/validators/pull/372) +- fix(ip_address): properly handle private is false by @grleblanc in [#374](https://github.com/python-validators/validators/pull/374) +- chore(url): allow symbols and pictographs in url by @prousso in [#375](https://github.com/python-validators/validators/pull/375) +- build(deps): bump requests from 2.31.0 to 2.32.0 in /package by @dependabot in [#376](https://github.com/python-validators/validators/pull/376) +- chore: fix typo; update dev deps; bump version by @yozachar in [#377](https://github.com/python-validators/validators/pull/377) + +**Full Changelog**: [`0.28.1...0.28.2`](https://github.com/python-validators/validators/compare/0.28.1...0.28.2) + ## 0.28.1 (2024-04-19) _**Breaking**_ @@ -21,14 +58,14 @@ _**Maintenance**_ -- fix: reduce memory footprint when loading TLDs by @yozachar in [362](https://github.com/python-validators/validators/pull/362) -- build(deps): bump idna from 3.6 to 3.7 in /package by @dependabot in [365](https://github.com/python-validators/validators/pull/365) -- fix: rfc cases in the `domain` validator by @yozachar in [367](https://github.com/python-validators/validators/pull/367) -- chore: documentation maintenance by @yozachar in [368](https://github.com/python-validators/validators/pull/368) -- chore: update contribution guidelines by @yozachar in [369](https://github.com/python-validators/validators/pull/369) -- chore: updated dev dependencies; bump version by @yozachar in [370](https://github.com/python-validators/validators/pull/370) +- fix: reduce memory footprint when loading TLDs by @yozachar in [#362](https://github.com/python-validators/validators/pull/362) +- build(deps): bump idna from 3.6 to 3.7 in /package by @dependabot in [#365](https://github.com/python-validators/validators/pull/365) +- fix: rfc cases in the `domain` validator by @yozachar in [#367](https://github.com/python-validators/validators/pull/367) +- chore: documentation maintenance by @yozachar in [#368](https://github.com/python-validators/validators/pull/368) +- chore: update contribution guidelines by @yozachar in [#369](https://github.com/python-validators/validators/pull/369) +- chore: updated dev dependencies; bump version by @yozachar in [#370](https://github.com/python-validators/validators/pull/370) -**Full Changelog**: [`0.27.0...0.28.0`](https://github.com/python-validators/validators/compare/0.28.0...0.28.1) +**Full Changelog**: [`0.28.0...0.28.1`](https://github.com/python-validators/validators/compare/0.28.0...0.28.1) ## 0.28.0 (2024-04-04) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/PKG-INFO new/validators-0.28.3/PKG-INFO --- old/validators-0.28.1/PKG-INFO 2024-04-19 15:23:05.535833100 +0200 +++ new/validators-0.28.3/PKG-INFO 2024-05-25 04:55:44.355829500 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: validators -Version: 0.28.1 +Version: 0.28.3 Summary: Python Data Validation for Humans⢠Author-email: Konsta Vesterinen <kon...@fastmonkeys.com> License: MIT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/docs/validators.1 new/validators-0.28.3/docs/validators.1 --- old/validators-0.28.1/docs/validators.1 2024-04-19 15:23:03.000000000 +0200 +++ new/validators-0.28.3/docs/validators.1 2024-05-25 04:55:41.000000000 +0200 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "VALIDATORS" "1" "Apr 19, 2024" "0.28.1" "validators" +.TH "VALIDATORS" "1" "May 25, 2024" "0.28.3" "validators" .SH NAME validators \- Python Data Validation for Humans⢠.sp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/pyproject.toml new/validators-0.28.3/pyproject.toml --- old/validators-0.28.1/pyproject.toml 2024-04-19 15:22:20.000000000 +0200 +++ new/validators-0.28.3/pyproject.toml 2024-05-25 04:52:58.000000000 +0200 @@ -55,26 +55,26 @@ [tool.pdm.dev-dependencies] docs-offline = [ - "myst-parser>=2.0.0", + "myst-parser>=3.0.1", "pypandoc-binary>=1.13", "sphinx>=7.1.2", - "furo>=2024.1.29", + "furo>=2024.5.6", ] docs-online = [ - "mkdocs>=1.5.3", - "mkdocs-git-revision-date-localized-plugin>=1.2.4", - "mkdocs-material>=9.5.18", - "mkdocstrings[python]>=0.24.3", - "mike>=2.0.0", + "mkdocs>=1.6.0", + "mkdocs-git-revision-date-localized-plugin>=1.2.5", + "mkdocs-material>=9.5.24", + "mkdocstrings[python]>=0.25.1", + "mike>=2.1.1", ] package = ["build>=1.2.1"] -runner = ["tox>=4.14.2"] +runner = ["tox>=4.15.0"] sast = ["bandit[toml]>=1.7.8"] tooling = [ - "black>=24.4.0", - "ruff>=0.4.0", - "pyright>=1.1.359", - "pytest>=8.1.1", + "black>=24.4.2", + "ruff>=0.4.5", + "pyright>=1.1.364", + "pytest>=8.2.1", "pypandoc-binary>=1.13", # helps with type checking ] @@ -88,7 +88,7 @@ namespaces = false [tool.setuptools.package-data] -validators = ["py.typed"] +validators = ["py.typed", "_tld.txt"] [tool.setuptools.dynamic] version = { attr = "validators.__version__" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/src/validators/__init__.py new/validators-0.28.3/src/validators/__init__.py --- old/validators-0.28.1/src/validators/__init__.py 2024-04-19 15:22:20.000000000 +0200 +++ new/validators-0.28.3/src/validators/__init__.py 2024-05-25 04:52:58.000000000 +0200 @@ -105,4 +105,4 @@ "validator", ) -__version__ = "0.28.1" +__version__ = "0.28.3" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/src/validators/_tld.txt new/validators-0.28.3/src/validators/_tld.txt --- old/validators-0.28.1/src/validators/_tld.txt 2024-04-04 05:15:02.000000000 +0200 +++ new/validators-0.28.3/src/validators/_tld.txt 2024-05-25 04:52:58.000000000 +0200 @@ -1,4 +1,4 @@ -# Version 2024040300, Last Updated Wed Apr 3 07:07:01 2024 UTC +# Version 2024052400, Last Updated Fri May 24 07:07:01 2024 UTC AAA AARP ABB diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/src/validators/domain.py new/validators-0.28.3/src/validators/domain.py --- old/validators-0.28.1/src/validators/domain.py 2024-04-19 08:39:07.000000000 +0200 +++ new/validators-0.28.3/src/validators/domain.py 2024-05-25 04:52:58.000000000 +0200 @@ -10,6 +10,7 @@ def _iana_tld(): """Load IANA TLDs as a Generator.""" + # source: https://data.iana.org/TLD/tlds-alpha-by-domain.txt with Path(__file__).parent.joinpath("_tld.txt").open() as tld_f: _ = next(tld_f) # ignore the first line for line in tld_f: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/src/validators/ip_address.py new/validators-0.28.3/src/validators/ip_address.py --- old/validators-0.28.1/src/validators/ip_address.py 2024-04-04 05:15:02.000000000 +0200 +++ new/validators-0.28.3/src/validators/ip_address.py 2024-05-24 06:18:52.000000000 +0200 @@ -19,7 +19,7 @@ def _check_private_ip(value: str, is_private: Optional[bool]): if is_private is None: return True - if is_private and ( + if ( any( value.startswith(l_bit) for l_bit in { @@ -33,8 +33,9 @@ or re.match(r"^172\.(?:1[6-9]|2\d|3[0-1])\.", value) # private or re.match(r"^(?:22[4-9]|23[0-9]|24[0-9]|25[0-5])\.", value) # broadcast ): - return True - return False + return is_private + + return not is_private @validator diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/src/validators/url.py new/validators-0.28.3/src/validators/url.py --- old/validators-0.28.1/src/validators/url.py 2024-04-04 05:15:02.000000000 +0200 +++ new/validators-0.28.3/src/validators/url.py 2024-05-24 06:18:52.000000000 +0200 @@ -29,6 +29,8 @@ return re.compile( # allowed symbols r"^[\/a-z0-9\-\.\_\~\!\$\&\'\(\)\*\+\,\;\=\:\@\%" + # symbols / pictographs + + r"\U0001F300-\U0001F5FF" # emoticons / emoji + r"\U0001F600-\U0001F64F" # multilingual unicode ranges diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/src/validators.egg-info/PKG-INFO new/validators-0.28.3/src/validators.egg-info/PKG-INFO --- old/validators-0.28.1/src/validators.egg-info/PKG-INFO 2024-04-19 15:23:05.000000000 +0200 +++ new/validators-0.28.3/src/validators.egg-info/PKG-INFO 2024-05-25 04:55:44.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: validators -Version: 0.28.1 +Version: 0.28.3 Summary: Python Data Validation for Humans⢠Author-email: Konsta Vesterinen <kon...@fastmonkeys.com> License: MIT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/src/validators.egg-info/SOURCES.txt new/validators-0.28.3/src/validators.egg-info/SOURCES.txt --- old/validators-0.28.1/src/validators.egg-info/SOURCES.txt 2024-04-19 15:23:05.000000000 +0200 +++ new/validators-0.28.3/src/validators.egg-info/SOURCES.txt 2024-05-25 04:55:44.000000000 +0200 @@ -1,4 +1,3 @@ -.gitignore CHANGES.md LICENSE.txt MANIFEST.in diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/tests/test_ip_address.py new/validators-0.28.3/tests/test_ip_address.py --- old/validators-0.28.1/tests/test_ip_address.py 2024-04-04 05:15:02.000000000 +0200 +++ new/validators-0.28.3/tests/test_ip_address.py 2024-05-24 06:18:52.000000000 +0200 @@ -148,3 +148,59 @@ ): """Test returns failed validation on invalid ipv6 CIDR address.""" assert isinstance(ipv6(address, cidr=cidr, strict=strict, host_bit=host_bit), ValidationError) + + +@pytest.mark.parametrize( + ("address", "private"), + [ + ("10.1.1.1", True), + ("192.168.1.1", True), + ("169.254.1.1", True), + ("127.0.0.1", True), + ("0.0.0.0", True), + ], +) +def test_returns_true_on_valid_private_ipv4_address(address: str, private: bool): + """Test returns true on private ipv4 address.""" + assert ipv4(address, private=private) + + +@pytest.mark.parametrize( + ("address", "private"), + [ + ("1.1.1.1", True), + ("192.169.1.1", True), + ("7.53.12.1", True), + ], +) +def test_returns_failed_validation_on_invalid_private_ipv4_address(address: str, private: bool): + """Test returns failed validation on invalid private ipv4 address.""" + assert isinstance(ipv4(address, private=private), ValidationError) + + +@pytest.mark.parametrize( + ("address", "private"), + [ + ("1.1.1.1", False), + ("192.169.1.1", False), + ("7.53.12.1", False), + ], +) +def test_returns_true_on_valid_public_ipv4_address(address: str, private: bool): + """Test returns true on valid public ipv4 address.""" + assert ipv4(address, private=private) + + +@pytest.mark.parametrize( + ("address", "private"), + [ + ("10.1.1.1", False), + ("192.168.1.1", False), + ("169.254.1.1", False), + ("127.0.0.1", False), + ("0.0.0.0", False), + ], +) +def test_returns_failed_validation_on_invalid_public_ipv4_address(address: str, private: bool): + """Test returns failed validation on private ipv4 address.""" + assert isinstance(ipv4(address, private=private), ValidationError) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/validators-0.28.1/tests/test_url.py new/validators-0.28.3/tests/test_url.py --- old/validators-0.28.1/tests/test_url.py 2024-04-04 05:15:02.000000000 +0200 +++ new/validators-0.28.3/tests/test_url.py 2024-05-24 06:18:52.000000000 +0200 @@ -76,6 +76,7 @@ "http://[::FFFF:129.144.52.38]:80/index.html", "http://[2010:836B:4179::836B:4179]", "http://foo.bar", + "http://foo.bar/ð", "http://google.com:9/test", "http://5.196.190.0/", "http://username:passw...@example.com:4010/",