Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-mdurl for openSUSE:Factory checked in at 2022-09-30 17:57:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-mdurl (Old) and /work/SRC/openSUSE:Factory/.python-mdurl.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mdurl" Fri Sep 30 17:57:45 2022 rev:2 rq:1007062 version:0.1.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-mdurl/python-mdurl.changes 2022-04-28 23:08:30.280719331 +0200 +++ /work/SRC/openSUSE:Factory/.python-mdurl.new.2275/python-mdurl.changes 2022-09-30 17:58:04.157283862 +0200 @@ -1,0 +2,9 @@ +Thu Sep 29 15:58:15 UTC 2022 - Yogalakshmi Arunachalam <yarunacha...@suse.com> + +- Update to 0.1.2 + Add a decode test with invalid utf8 + * Bump version: 0.1.1 ??? 0.1.2 + * Fix decode returning utf-16 code units (#9) + * [pre-commit.ci] pre-commit autoupdate (#8) + +------------------------------------------------------------------- Old: ---- python-mdurl-0.1.1.tar.gz New: ---- python-mdurl-0.1.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-mdurl.spec ++++++ --- /var/tmp/diff_new_pack.e0U6H5/_old 2022-09-30 17:58:04.613284836 +0200 +++ /var/tmp/diff_new_pack.e0U6H5/_new 2022-09-30 17:58:04.613284836 +0200 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-mdurl -Version: 0.1.1 +Version: 0.1.2 Release: 0 Summary: Markdown URL utilities License: MIT @@ -26,10 +26,10 @@ Source: https://github.com/executablebooks/mdurl/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz #Source: https://files.pythonhosted.org/packages/source/m/mdurl/mdurl-%%{version}.tar.gz BuildRequires: python-rpm-macros -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module pip} BuildRequires: %{python_module flit} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildArch: noarch %python_subpackages ++++++ python-mdurl-0.1.1.tar.gz -> python-mdurl-0.1.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdurl-0.1.1/.bumpversion.cfg new/mdurl-0.1.2/.bumpversion.cfg --- old/mdurl-0.1.1/.bumpversion.cfg 2022-04-12 22:15:42.000000000 +0200 +++ new/mdurl-0.1.2/.bumpversion.cfg 2022-08-14 14:35:21.000000000 +0200 @@ -2,7 +2,7 @@ commit = True tag = True tag_name = {new_version} -current_version = 0.1.1 +current_version = 0.1.2 [bumpversion:file:pyproject.toml] search = version = "{current_version}" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdurl-0.1.1/.pre-commit-config.yaml new/mdurl-0.1.2/.pre-commit-config.yaml --- old/mdurl-0.1.1/.pre-commit-config.yaml 2022-04-12 22:15:42.000000000 +0200 +++ new/mdurl-0.1.2/.pre-commit-config.yaml 2022-08-14 14:35:21.000000000 +0200 @@ -6,7 +6,7 @@ additional_dependencies: - mdformat-gfm - repo: https://github.com/asottile/yesqa - rev: 35cf7dc24fa922927caded7a21b2a8cb04bf8e10 # frozen: v1.3.0 + rev: 265e9ff7c83add4949f81bb5fe14f4a743ffb04c # frozen: v1.4.0 hooks: - id: yesqa additional_dependencies: @@ -18,7 +18,7 @@ hooks: - id: isort - repo: https://github.com/psf/black - rev: ae2c0758c9e61a385df9700dc9c231bf54887041 # frozen: 22.3.0 + rev: f6c139c5215ce04fd3e73a900f1372942d58eca0 # frozen: 22.6.0 hooks: - id: black - repo: https://github.com/myint/docformatter @@ -26,7 +26,7 @@ hooks: - id: docformatter - repo: https://github.com/pre-commit/pre-commit-hooks - rev: db7346d375eda68a0174f2c057dd97f2fbffe030 # frozen: v4.2.0 + rev: 3298ddab3c13dd77d6ce1fc0baf97691430d84b0 # frozen: v4.3.0 hooks: - id: check-yaml - repo: https://github.com/pre-commit/pygrep-hooks @@ -36,7 +36,7 @@ - id: python-check-blanket-noqa - id: python-check-blanket-type-ignore - repo: https://github.com/PyCQA/flake8 - rev: cbeb4c9c4137cff1568659fcc48e8b85cddd0c8d # frozen: 4.0.1 + rev: f8e1b317742036ff11ff86356fd2b68147e169f7 # frozen: 5.0.4 hooks: - id: flake8 additional_dependencies: @@ -44,7 +44,7 @@ - flake8-builtins - flake8-comprehensions - repo: https://github.com/pre-commit/mirrors-mypy - rev: bdfdfda2221c4fd123dbc9ac0f2074951bd5af58 # frozen: v0.942 + rev: fde4bb992b03943ecb94207a52739ba07957bd06 # frozen: v0.971 hooks: - id: mypy args: ["--scripts-are-modules"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdurl-0.1.1/pyproject.toml new/mdurl-0.1.2/pyproject.toml --- old/mdurl-0.1.1/pyproject.toml 2022-04-12 22:15:42.000000000 +0200 +++ new/mdurl-0.1.2/pyproject.toml 2022-08-14 14:35:21.000000000 +0200 @@ -4,7 +4,7 @@ [project] name = "mdurl" -version = "0.1.1" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT +version = "0.1.2" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT description = "Markdown URL utilities" authors = [ { name = "Taneli Hukkinen", email = "huk...@users.noreply.github.com" }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdurl-0.1.1/src/mdurl/__init__.py new/mdurl-0.1.2/src/mdurl/__init__.py --- old/mdurl-0.1.1/src/mdurl/__init__.py 2022-04-12 22:15:42.000000000 +0200 +++ new/mdurl-0.1.2/src/mdurl/__init__.py 2022-08-14 14:35:21.000000000 +0200 @@ -9,7 +9,7 @@ "parse", "URL", ) -__version__ = "0.1.1" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT +__version__ = "0.1.2" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT from mdurl._decode import DECODE_COMPONENT_CHARS, DECODE_DEFAULT_CHARS, decode from mdurl._encode import ENCODE_COMPONENT_CHARS, ENCODE_DEFAULT_CHARS, encode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdurl-0.1.1/src/mdurl/_decode.py new/mdurl-0.1.2/src/mdurl/_decode.py --- old/mdurl-0.1.1/src/mdurl/_decode.py 2022-04-12 22:15:42.000000000 +0200 +++ new/mdurl-0.1.2/src/mdurl/_decode.py 2022-08-14 14:35:21.000000000 +0200 @@ -55,12 +55,11 @@ b2 = int(seq[i + 4 : i + 6], 16) if (b2 & 0xC0) == 0x80: - chr_ = ((b1 << 6) & 0x7C0) | (b2 & 0x3F) - - if chr_ < 0x80: - result += "\ufffd\ufffd" - else: - result += chr(chr_) + all_bytes = bytes((b1, b2)) + try: + result += all_bytes.decode() + except UnicodeDecodeError: + result += "\ufffd" * 2 i += 3 i += 3 # emulate JS for loop statement3 @@ -72,12 +71,11 @@ b3 = int(seq[i + 7 : i + 9], 16) if (b2 & 0xC0) == 0x80 and (b3 & 0xC0) == 0x80: - chr_ = ((b1 << 12) & 0xF000) | ((b2 << 6) & 0xFC0) | (b3 & 0x3F) - - if chr_ < 0x800 or (chr_ >= 0xD800 and chr_ <= 0xDFFF): - result += "\ufffd\ufffd\ufffd" - else: - result += chr(chr_) + all_bytes = bytes((b1, b2, b3)) + try: + result += all_bytes.decode() + except UnicodeDecodeError: + result += "\ufffd" * 3 i += 6 i += 3 # emulate JS for loop statement3 @@ -90,18 +88,11 @@ b4 = int(seq[i + 10 : i + 12], 16) if (b2 & 0xC0) == 0x80 and (b3 & 0xC0) == 0x80 and (b4 & 0xC0) == 0x80: - chr_ = ( - ((b1 << 18) & 0x1C0000) - | ((b2 << 12) & 0x3F000) - | ((b3 << 6) & 0xFC0) - | (b4 & 0x3F) - ) - - if chr_ < 0x10000 or chr_ > 0x10FFFF: - result += "\ufffd\ufffd\ufffd\ufffd" - else: - chr_ -= 0x10000 - result += chr(0xD800 + (chr_ >> 10)) + chr(0xDC00 + (chr_ & 0x3FF)) + all_bytes = bytes((b1, b2, b3, b4)) + try: + result += all_bytes.decode() + except UnicodeDecodeError: + result += "\ufffd" * 4 i += 9 i += 3 # emulate JS for loop statement3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdurl-0.1.1/tests/test_decode.py new/mdurl-0.1.2/tests/test_decode.py --- old/mdurl-0.1.1/tests/test_decode.py 1970-01-01 01:00:00.000000000 +0100 +++ new/mdurl-0.1.2/tests/test_decode.py 2022-08-14 14:35:21.000000000 +0200 @@ -0,0 +1,5 @@ +from mdurl import decode + + +def test_decode_multi_byte(): + assert decode("https://host.invalid/%F0%9F%91%A9") == "https://host.invalid/????"