Hello community,
here is the log from the commit of package python-validators for
openSUSE:Factory checked in at 2020-08-25 12:38:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-validators (Old)
and /work/SRC/openSUSE:Factory/.python-validators.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-validators"
Tue Aug 25 12:38:19 2020 rev:13 rq:827972 version:0.18.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-validators/python-validators.changes
2020-07-21 15:39:25.715450471 +0200
+++
/work/SRC/openSUSE:Factory/.python-validators.new.3399/python-validators.changes
2020-08-25 12:38:24.421410393 +0200
@@ -1,0 +2,10 @@
+Thu Aug 20 04:53:07 UTC 2020 - Mia Herkt <[email protected]>
+
+- Update to 0.18.0:
+ * Added bitcoin address validator
+Changes from 0.17.0 to 0.17.1:
+ * Fixed python_requires using twine
+Changes from 0.16.0 to 0.17.0:
+ * Fix URL validator ip_last_octet regex
+
+-------------------------------------------------------------------
Old:
----
validators-0.16.0.tar.gz
New:
----
validators-0.18.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-validators.spec ++++++
--- /var/tmp/diff_new_pack.b7mLIf/_old 2020-08-25 12:38:26.705410824 +0200
+++ /var/tmp/diff_new_pack.b7mLIf/_new 2020-08-25 12:38:26.709410825 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-validators
-Version: 0.16.0
+Version: 0.18.0
Release: 0
Summary: Python Data Validation
License: MIT
++++++ validators-0.16.0.tar.gz -> validators-0.18.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/validators-0.16.0/CHANGES.rst
new/validators-0.18.0/CHANGES.rst
--- old/validators-0.16.0/CHANGES.rst 2020-07-16 13:04:41.000000000 +0200
+++ new/validators-0.18.0/CHANGES.rst 2020-08-19 13:27:38.000000000 +0200
@@ -1,6 +1,26 @@
Changelog
---------
+
+0.18.0 (2020-08-19)
+^^^^^^^^^^^^^^^^^^^
+
+- Added bitcoin address validator (#166, pull request courtesy of daveusa31)
+
+
+0.17.1 (2020-08-03)
+^^^^^^^^^^^^^^^^^^^
+
+- Fixed python_requires using twine
+
+
+0.17.0 (2020-08-02)
+^^^^^^^^^^^^^^^^^^^
+
+- Added python_requires='>=3.4' to setup.py (#163, pull request courtesy of
vphilippon)
+- Fixed URL validator ip_last_octet regex (#145, pull request courtesy of
ghost)
+
+
0.16.0 (2020-07-16)
^^^^^^^^^^^^^^^^^^^
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/validators-0.16.0/PKG-INFO
new/validators-0.18.0/PKG-INFO
--- old/validators-0.16.0/PKG-INFO 2020-07-16 13:12:48.000000000 +0200
+++ new/validators-0.18.0/PKG-INFO 2020-08-19 13:29:45.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: validators
-Version: 0.16.0
+Version: 0.18.0
Summary: Python Data Validation for Humans™.
Home-page: https://github.com/kvesteri/validators
Author: Konsta Vesterinen
@@ -27,4 +27,5 @@
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Requires-Python: >=3.4
Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/validators-0.16.0/docs/index.rst
new/validators-0.18.0/docs/index.rst
--- old/validators-0.16.0/docs/index.rst 2019-05-20 09:49:33.000000000
+0200
+++ new/validators-0.18.0/docs/index.rst 2020-08-19 13:26:43.000000000
+0200
@@ -69,6 +69,17 @@
.. autofunction:: between
+
+btc_address
+------
+
+.. module:: validators.btc_address
+
+.. autofunction:: btc_address
+
+
+
+
domain
------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/validators-0.16.0/setup.py
new/validators-0.18.0/setup.py
--- old/validators-0.16.0/setup.py 2020-04-02 15:03:56.000000000 +0200
+++ new/validators-0.18.0/setup.py 2020-08-02 09:59:00.000000000 +0200
@@ -68,5 +68,6 @@
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
- ]
+ ],
+ python_requires='>=3.4'
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/validators-0.16.0/tests/test_btc_address.py
new/validators-0.18.0/tests/test_btc_address.py
--- old/validators-0.16.0/tests/test_btc_address.py 1970-01-01
01:00:00.000000000 +0100
+++ new/validators-0.18.0/tests/test_btc_address.py 2020-08-19
13:26:43.000000000 +0200
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+import pytest
+
+from validators import btc_address, ValidationFailure
+
+
[email protected](('address',), [
+ ('17nuNm4QpgKuDvWy7Jh2AZ2nzZpMyKSKzT',),
+ ('3Cwgr2g7vsi1bXDUkpEnVoRLA9w4FZfC69',),
+])
+def test_returns_true_on_valid_mac_address(address):
+ assert btc_address(address)
+
+
[email protected](('address',), [
+ ('ff3Cwgr2g7vsi1bXDUkpEnVoRLA9w4FZfC69',),
+ ('b3Cgwgr2g7vsi1bXyjyDUkphEnVoRLA9w4FZfC69',),
+])
+def test_returns_failed_validation_on_invalid_mac_address(address):
+ assert isinstance(btc_address(address), ValidationFailure)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/validators-0.16.0/validators/__init__.py
new/validators-0.18.0/validators/__init__.py
--- old/validators-0.16.0/validators/__init__.py 2020-07-16
13:04:48.000000000 +0200
+++ new/validators-0.18.0/validators/__init__.py 2020-08-19
13:27:58.000000000 +0200
@@ -1,4 +1,5 @@
from .between import between
+from .btc_address import btc_address
from .card import (
amex,
card_number,
@@ -29,6 +30,6 @@
'ipv4_cidr', 'ipv6', 'ipv6_cidr', 'length', 'mac_address', 'slug',
'truthy', 'url', 'ValidationFailure', 'validator', 'uuid',
'card_number', 'visa', 'mastercard', 'amex', 'unionpay', 'diners',
- 'jcb', 'discover')
+ 'jcb', 'discover', 'btc_address')
-__version__ = '0.16.0'
+__version__ = '0.18.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/validators-0.16.0/validators/btc_address.py
new/validators-0.18.0/validators/btc_address.py
--- old/validators-0.16.0/validators/btc_address.py 1970-01-01
01:00:00.000000000 +0100
+++ new/validators-0.18.0/validators/btc_address.py 2020-08-19
13:26:43.000000000 +0200
@@ -0,0 +1,23 @@
+import re
+
+from .utils import validator
+
+pattern = re.compile(r"^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$")
+
+
+@validator
+def btc_address(value):
+ """
+ Return whether or not given value is a valid bitcoin address.
+
+ If the value is valid bitcoin address this function returns ``True``,
+ otherwise :class:`~validators.utils.ValidationFailure`.
+
+ Examples::
+
+ >>> btc_address('3Cwgr2g7vsi1bXDUkpEnVoRLA9w4FZfC69')
+ True
+
+ :param value: Bitcoin address string to validate
+ """
+ return pattern.match(value)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/validators-0.16.0/validators/url.py
new/validators-0.18.0/validators/url.py
--- old/validators-0.16.0/validators/url.py 2020-07-16 13:03:51.000000000
+0200
+++ new/validators-0.18.0/validators/url.py 2020-08-13 16:09:26.000000000
+0200
@@ -81,7 +81,7 @@
# port number
r"(?::\d{2,5})?"
# resource path
- u"(?:/[-a-z\u00a1-\uffff\U00010000-\U0010ffff0-9._~%!$&'()*+,;=:@/]*)?"
+ r"(?:/[-a-z\u00a1-\uffff\U00010000-\U0010ffff0-9._~%!$&'()*+,;=:@/]*)?"
# query string
r"(?:\?\S*)?"
# fragment
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/validators-0.16.0/validators.egg-info/PKG-INFO
new/validators-0.18.0/validators.egg-info/PKG-INFO
--- old/validators-0.16.0/validators.egg-info/PKG-INFO 2020-07-16
13:12:48.000000000 +0200
+++ new/validators-0.18.0/validators.egg-info/PKG-INFO 2020-08-19
13:29:45.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: validators
-Version: 0.16.0
+Version: 0.18.0
Summary: Python Data Validation for Humans™.
Home-page: https://github.com/kvesteri/validators
Author: Konsta Vesterinen
@@ -27,4 +27,5 @@
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Requires-Python: >=3.4
Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/validators-0.16.0/validators.egg-info/SOURCES.txt
new/validators-0.18.0/validators.egg-info/SOURCES.txt
--- old/validators-0.16.0/validators.egg-info/SOURCES.txt 2020-07-16
13:12:48.000000000 +0200
+++ new/validators-0.18.0/validators.egg-info/SOURCES.txt 2020-08-19
13:29:45.000000000 +0200
@@ -9,6 +9,7 @@
docs/make.bat
tests/__init__.py
tests/test_between.py
+tests/test_btc_address.py
tests/test_card.py
tests/test_domain.py
tests/test_email.py
@@ -34,6 +35,7 @@
tests/i18n/test_fi.py
validators/__init__.py
validators/between.py
+validators/btc_address.py
validators/card.py
validators/domain.py
validators/email.py