Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-adblock for openSUSE:Factory checked in at 2022-07-26 19:44:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-adblock (Old) and /work/SRC/openSUSE:Factory/.python-adblock.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-adblock" Tue Jul 26 19:44:09 2022 rev:7 rq:990893 version:0.6.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-adblock/python-adblock.changes 2022-06-16 18:22:10.340247217 +0200 +++ /work/SRC/openSUSE:Factory/.python-adblock.new.1533/python-adblock.changes 2022-07-26 19:44:35.146309000 +0200 @@ -1,0 +2,13 @@ +Sun Jul 24 16:35:11 UTC 2022 - Mia Herkt <m...@0x0.st> + +- Update to 0.6.0 +Added + * Added aliases optional argument to Engine.add_resource. +Changes + * Update PyO3 dependency to 0.16. + * Update upstream dependency to 0.5.6. +Breaks + * Minimum Rust version is now 1.53. + * Minimum Python version is now 3.7. + +------------------------------------------------------------------- Old: ---- python-adblock-0.5.2.tar.gz New: ---- python-adblock-0.6.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-adblock.spec ++++++ --- /var/tmp/diff_new_pack.Jex3sw/_old 2022-07-26 19:44:35.826203939 +0200 +++ /var/tmp/diff_new_pack.Jex3sw/_new 2022-07-26 19:44:35.830203321 +0200 @@ -16,9 +16,10 @@ # +%define skip_python36 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-adblock -Version: 0.5.2 +Version: 0.6.0 Release: 0 Summary: Brave's adblock library in Python License: Apache-2.0 OR MIT @@ -40,9 +41,9 @@ Python wrapper for Brave's adblocking library. %prep -%setup -q -n adblock-%{version} -# build flavor-specific versions -- otherwise py3.9 wheel will not work -sed -i 's/"abi3-py36", //' Cargo.toml +%setup -q +# build flavor-specific versions -- otherwise wheels will not work +sed -i 's/"abi3-py37", //' Cargo.toml tar xf %{SOURCE1} ++++++ python-adblock-0.5.2.tar.gz -> python-adblock-0.6.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adblock-0.5.2/.github/workflows/ci.yml new/python-adblock-0.6.0/.github/workflows/ci.yml --- old/adblock-0.5.2/.github/workflows/ci.yml 2022-03-01 13:55:59.000000000 +0100 +++ new/python-adblock-0.6.0/.github/workflows/ci.yml 2022-07-18 00:57:45.000000000 +0200 @@ -26,15 +26,19 @@ command: fmt args: -- --check - - name: Lint with clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-targets --all-features -- -D clippy::all + # Disabled because of https://github.com/rust-lang/rust-clippy/issues/8971 + # - name: Lint with clippy + # uses: actions-rs/cargo@v1 + # with: + # command: clippy + # args: --all-targets --all-features -- -D clippy::all - name: Lint with Black run: pip install black && black --check . + - name: Lint with mypy + run: pip install mypy && mypy --non-interactive --install-types --ignore-missing-imports . + macos: runs-on: macos-latest needs: lint @@ -43,7 +47,7 @@ - uses: actions/setup-python@v2 with: - python-version: 3.6 + python-version: 3.7 - name: Install Rust toolchain uses: actions-rs/toolchain@v1 @@ -68,7 +72,7 @@ PYO3_CROSS_LIB_DIR: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib run: | # Build wheels - maturin build -i python --release --universal2 --out dist --no-sdist + maturin build -i python --release --universal2 --out dist pip install adblock --no-index --find-links dist --force-reinstall - name: Run PyTest @@ -101,7 +105,7 @@ - uses: actions/setup-python@v2 with: - python-version: 3.6 + python-version: 3.7 architecture: ${{ matrix.platform.python-architecture }} - name: Install Rust toolchain @@ -117,7 +121,7 @@ - name: Build wheels run: | - maturin build -i python --release --out dist --no-sdist --target ${{ matrix.platform.target }} + maturin build -i python --release --out dist --target ${{ matrix.platform.target }} pip install adblock --no-index --find-links dist --force-reinstall - name: Run PyTest @@ -143,25 +147,25 @@ platform: [ { - toolchain: "1.49", + toolchain: "1.53", manylinux: "2010", target: "x86_64-unknown-linux-gnu", arch: "x86_64", - python-version: "3.6" + python-version: "3.7" }, { toolchain: "nightly", manylinux: "2010", target: "x86_64-unknown-linux-gnu", arch: "x86_64", - python-version: "3.6" + python-version: "3.7" }, { toolchain: "stable", manylinux: "2010", target: "x86_64-unknown-linux-gnu", arch: "x86_64", - python-version: "3.6" + python-version: "3.7" }, { toolchain: "stable", @@ -169,7 +173,7 @@ target: "x86_64-unknown-linux-gnu", arch: "x86_64", python-version: "3.10" - }, + } ] steps: - uses: actions/checkout@v2 @@ -184,7 +188,7 @@ source ~/.cargo/env export PATH=/opt/python/cp38-cp38/bin:$PATH pip install maturin - maturin build -i python --release --out dist --no-sdist --target ${{ matrix.platform.target }} --manylinux ${{ matrix.platform.manylinux }} + maturin build -i python --release --out dist --target ${{ matrix.platform.target }} --manylinux ${{ matrix.platform.manylinux }} ' > build-wheel.sh chmod +x build-wheel.sh docker run --rm -v "$PWD":/io -w /io quay.io/pypa/manylinux${{ matrix.platform.manylinux }}_${{ matrix.platform.arch }} bash build-wheel.sh @@ -234,23 +238,23 @@ - uses: actions/setup-python@v2 with: - python-version: 3.6 + python-version: 3.7 - name: Build Wheels run: | echo 'curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable source ~/.cargo/env rustup target add ${{ matrix.platform.target }} - maturin build -i python --release --out dist --no-sdist --target ${{ matrix.platform.target }} --manylinux ${{ matrix.platform.manylinux }} + maturin build -i python --release --out dist --target ${{ matrix.platform.target }} --manylinux ${{ matrix.platform.manylinux }} ' > build-wheel.sh chmod +x build-wheel.sh docker run --rm -v "$PWD":/io -w /io messense/manylinux2014-cross:${{ matrix.platform.arch }} bash build-wheel.sh - - uses: uraimo/run-on-arch-action@v2.0.5 + - uses: uraimo/run-on-arch-action@v2.2.0 name: Install built wheel with: arch: ${{ matrix.platform.arch }} - distro: ubuntu18.04 + distro: ubuntu22.04 # Mount the dist directory as /artifacts in the container dockerRunArgs: | --volume "${PWD}/dist:/artifacts" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adblock-0.5.2/CHANGELOG.md new/python-adblock-0.6.0/CHANGELOG.md --- old/adblock-0.5.2/CHANGELOG.md 2022-03-01 13:56:00.000000000 +0100 +++ new/python-adblock-0.6.0/CHANGELOG.md 2022-07-18 00:57:45.000000000 +0200 @@ -6,6 +6,19 @@ ## Unreleased --- +## 0.6.0 - (2022-07-17) +--- +### Added +* Added `aliases` optional argument to `Engine.add_resource` + +### Changes +* Update PyO3 dependency to `0.16`. +* Update upstream dependency to `0.5.6`. + +### Breaks +* Minimum Rust version is now `1.53`. +* Minimum Python version is now `3.7`. + ## 0.5.2 - (2022-03-01) --- * Include complete redirect rule feature ([#59](https://github.com/ArniDagur/python-adblock/pull/59)). Thanks @x0day! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adblock-0.5.2/Cargo.lock new/python-adblock-0.6.0/Cargo.lock --- old/adblock-0.5.2/Cargo.lock 1970-01-01 01:00:00.000000000 +0100 +++ new/python-adblock-0.6.0/Cargo.lock 2022-07-18 00:57:45.000000000 +0200 @@ -0,0 +1,556 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "adblock" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27785ef5b89bc88fd2def3e1ecfefdf5ec1583795b916667afd15b13058f8315" +dependencies = [ + "addr", + "base64", + "bitflags", + "flate2", + "idna", + "itertools", + "once_cell", + "percent-encoding", + "regex", + "rmp-serde 0.13.7", + "rmp-serde 0.15.5", + "seahash", + "serde", + "twoway", + "url", +] + +[[package]] +name = "adblock" +version = "0.6.0" +dependencies = [ + "adblock 0.5.6", + "pyo3", +] + +[[package]] +name = "addr" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c54ccac949a2afafdfc889e15c753bbc6ee8783e026bbe3d057b00b13907db70" +dependencies = [ + "psl", + "psl-types", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aho-corasick" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +dependencies = [ + "memchr", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "either" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" + +[[package]] +name = "flate2" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "form_urlencoded" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +dependencies = [ + "matches", + "percent-encoding", +] + +[[package]] +name = "idna" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indoc" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05a0bd019339e5d968b37855180087b7b9d512c5046fbd244cf8c95687927d6e" + +[[package]] +name = "itertools" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" +dependencies = [ + "either", +] + +[[package]] +name = "libc" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" + +[[package]] +name = "lock_api" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "matches" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "miniz_oxide" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" +dependencies = [ + "adler", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-sys", +] + +[[package]] +name = "paste" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" + +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" + +[[package]] +name = "proc-macro2" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "psl" +version = "2.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9c7d362659b525758d09e2a3ae965e371b347605e5fb2bc5bec5c2a1ecf41b" +dependencies = [ + "psl-types", +] + +[[package]] +name = "psl-types" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8eda7c62d9ecaafdf8b62374c006de0adf61666ae96a96ba74a37134aa4e470" + +[[package]] +name = "pyo3" +version = "0.16.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6302e85060011447471887705bb7838f14aba43fcb06957d823739a496b3dc" +dependencies = [ + "cfg-if", + "indoc", + "libc", + "parking_lot", + "pyo3-build-config", + "pyo3-ffi", + "pyo3-macros", + "unindent", +] + +[[package]] +name = "pyo3-build-config" +version = "0.16.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b65b546c35d8a3b1b2f0ddbac7c6a569d759f357f2b9df884f5d6b719152c8" +dependencies = [ + "once_cell", + "target-lexicon", +] + +[[package]] +name = "pyo3-ffi" +version = "0.16.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c275a07127c1aca33031a563e384ffdd485aee34ef131116fcd58e3430d1742b" +dependencies = [ + "libc", + "pyo3-build-config", +] + +[[package]] +name = "pyo3-macros" +version = "0.16.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284fc4485bfbcc9850a6d661d627783f18d19c2ab55880b021671c4ba83e90f7" +dependencies = [ + "proc-macro2", + "pyo3-macros-backend", + "quote", + "syn", +] + +[[package]] +name = "pyo3-macros-backend" +version = "0.16.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53bda0f58f73f5c5429693c96ed57f7abdb38fdfc28ae06da4101a257adb7faf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "quote" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "redox_syscall" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" + +[[package]] +name = "rmp" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44519172358fd6d58656c86ab8e7fbc9e1490c3e8f14d35ed78ca0dd07403c9f" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "0.13.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "011e1d58446e9fa3af7cdc1fb91295b10621d3ac4cb3a85cc86385ee9ca50cd3" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "rmp-serde" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "723ecff9ad04f4ad92fe1c8ca6c20d2196d9286e9c60727c4cb5511629260e9d" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "seahash" +version = "3.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58f57ca1d128a43733fd71d583e837b1f22239a37ebea09cde11d8d9a9080f47" + +[[package]] +name = "serde" +version = "1.0.139" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0171ebb889e45aa68b44aee0859b3eede84c6f5f5c228e6f140c0b2a0a46cad6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.139" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1d3230c1de7932af58ad8ffbe1d784bd55efd5a9d84ac24f69c72d83543dfb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "smallvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" + +[[package]] +name = "syn" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "target-lexicon" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1" + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "twoway" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c57ffb460d7c24cd6eda43694110189030a3d1dfe418416d9468fd1c1d290b47" +dependencies = [ + "memchr", + "unchecked-index", +] + +[[package]] +name = "unchecked-index" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeba86d422ce181a719445e51872fa30f1f7413b62becb52e95ec91aa262d85c" + +[[package]] +name = "unicode-bidi" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" + +[[package]] +name = "unicode-ident" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7" + +[[package]] +name = "unicode-normalization" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unindent" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52fee519a3e570f7df377a06a1a7775cdbfb7aa460be7e08de2b1f0e69973a44" + +[[package]] +name = "url" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +dependencies = [ + "form_urlencoded", + "idna", + "matches", + "percent-encoding", +] + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adblock-0.5.2/Cargo.toml new/python-adblock-0.6.0/Cargo.toml --- old/adblock-0.5.2/Cargo.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/python-adblock-0.6.0/Cargo.toml 2022-07-18 00:57:45.000000000 +0200 @@ -1,7 +1,7 @@ [package] publish = false name = "adblock" -version = "0.5.2" +version = "0.6.0" edition = "2018" authors = ["??rni Dagur <a...@dagur.eu>"] license = "MIT OR Apache-2.0" @@ -16,14 +16,14 @@ "License :: OSI Approved :: MIT License", "License :: OSI Approved :: Apache Software License", ] -requires-python = ">=3.6" +requires-python = ">=3.7" [profile.release] debug = true [dependencies] -adblock = { version = "=0.4.3", default-features = false, features = ["full-regex-handling", "embedded-domain-resolver"] } -pyo3 = { version = "0.15", features = ["abi3-py36", "extension-module"] } +adblock = { version = "=0.5.6", default-features = false, features = ["full-regex-handling", "embedded-domain-resolver"] } +pyo3 = { version = "0.16", features = ["abi3-py37", "extension-module"] } [lib] name = "adblock" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adblock-0.5.2/PKG-INFO new/python-adblock-0.6.0/PKG-INFO --- old/adblock-0.5.2/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/python-adblock-0.6.0/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,79 +0,0 @@ -Metadata-Version: 2.1 -Name: adblock -Version: 0.5.2 -Classifier: Programming Language :: Python -Classifier: Programming Language :: Rust -Classifier: License :: OSI Approved :: MIT License -Classifier: License :: OSI Approved :: Apache Software License -Home-Page: https://github.com/ArniDagur/python-adblock -Author: ??rni Dagur <a...@dagur.eu> -Author-email: ??rni Dagur <a...@dagur.eu> -License: MIT OR Apache-2.0 -Requires-Python: >=3.6 -Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM -Project-URL: Source Code, https://github.com/ArniDagur/python-adblock - -# python-adblock - -Python wrapper for Brave's adblocking library, which is written in Rust. - -### Building from source - -#### Build dependencies - -| Build Dependency | Versions | Arch Linux | Url | -| ---------------- | -------- | ---------- | ------------------------------- | -| Python | `>=3.6` | `python` | - | -| Rust | `>=1.49` | `rust` | - | -| Maturin | `>=0.10` | `maturin` | https://github.com/PyO3/maturin | - -#### PEP 517 - -The `python-adblock` library is [PEP 517](https://www.python.org/dev/peps/pep-0517/) compatible, so you can build and install it from source, simply by running - -``` -pip install . -``` - -from the root of this directory. - -#### Wheels - -To create a wheel for this library, run the following command - -``` -maturin build --release --no-sdist --out dist/ -``` - -the result can be found in the `dist/` directory. - -### Developing - -I use Poetry for development. To create and enter a virtual environment, do - -``` -poetry install -poetry shell -``` - -then, to install the `adblock` module into the virtual environment, do - -``` -maturin develop -``` - -### Documentation - -Rust documentation for the latest `master` branch can be found at https://arnidagur.github.io/python-adblock/docs/adblock/index.html. - -### License - -This project is licensed under either of - -- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or - http://www.apache.org/licenses/LICENSE-2.0) -- MIT license ([LICENSE-MIT](LICENSE-MIT) or - http://opensource.org/licenses/MIT) - -at your option. - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adblock-0.5.2/README.md new/python-adblock-0.6.0/README.md --- old/adblock-0.5.2/README.md 2022-03-01 13:56:00.000000000 +0100 +++ new/python-adblock-0.6.0/README.md 2022-07-18 00:57:45.000000000 +0200 @@ -8,8 +8,8 @@ | Build Dependency | Versions | Arch Linux | Url | | ---------------- | -------- | ---------- | ------------------------------- | -| Python | `>=3.6` | `python` | - | -| Rust | `>=1.49` | `rust` | - | +| Python | `>=3.7` | `python` | - | +| Rust | `>=1.53` | `rust` | - | | Maturin | `>=0.10` | `maturin` | https://github.com/PyO3/maturin | #### PEP 517 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adblock-0.5.2/adblock/adblock.pyi new/python-adblock-0.6.0/adblock/adblock.pyi --- old/adblock-0.5.2/adblock/adblock.pyi 2022-03-01 13:56:00.000000000 +0100 +++ new/python-adblock-0.6.0/adblock/adblock.pyi 2022-07-18 00:57:45.000000000 +0200 @@ -1,5 +1,7 @@ from typing import Optional, Dict, List, Set +__version__: str + class AdblockException(Exception): pass @@ -58,6 +60,7 @@ filter_list: str, format: str = "standard", include_redirect_urls: bool = False, + rule_types: str = "all", ) -> None: pass def add_filters( @@ -65,6 +68,7 @@ filters: List[str], format: str = "standard", include_redirect_urls: bool = False, + rule_types: str = "all", ) -> None: pass @@ -113,7 +117,13 @@ pass def tag_exists(self, tag: str) -> bool: pass - def add_resource(self, name: str, content_type: str, content: str) -> bool: + def add_resource( + self, + name: str, + content_type: str, + content: str, + aliases: Optional[List[str]] = None, + ) -> bool: pass def url_cosmetic_resources(self, url: str) -> UrlSpecificResources: pass diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adblock-0.5.2/src/lib.rs new/python-adblock-0.6.0/src/lib.rs --- old/adblock-0.5.2/src/lib.rs 2022-03-01 13:56:00.000000000 +0100 +++ new/python-adblock-0.6.0/src/lib.rs 2022-07-18 00:57:45.000000000 +0200 @@ -16,8 +16,7 @@ use adblock::cosmetic_filter_cache::UrlSpecificResources as RustUrlSpecificResources; use adblock::engine::Engine as RustEngine; use adblock::lists::FilterSet as RustFilterSet; -use adblock::lists::{FilterFormat, ParseOptions}; -use pyo3::class::PyObjectProtocol; +use adblock::lists::{FilterFormat, ParseOptions, RuleTypes}; use pyo3::create_exception; use pyo3::exceptions::PyException; use pyo3::prelude::*; @@ -145,8 +144,8 @@ } } -#[pyproto] -impl PyObjectProtocol for BlockerResult { +#[pymethods] +impl BlockerResult { fn __repr__(&self) -> PyResult<String> { Ok(format!( "BlockerResult(matched={}, important={}, redirect={}, exception={}, filter={}, error={})", @@ -231,7 +230,18 @@ match filter_format { "standard" => Ok(FilterFormat::Standard), "hosts" => Ok(FilterFormat::Hosts), - _ => Err(PyErr::new::<AdblockException, _>("Invalid format value")), + _ => Err(PyErr::new::<AdblockException, _>( + "Invalid FilterFormat value", + )), + } +} + +fn rule_types_from_string(rule_types: &str) -> PyResult<RuleTypes> { + match rule_types { + "all" => Ok(RuleTypes::All), + "networkonly" => Ok(RuleTypes::NetworkOnly), + "cosmeticonly" => Ok(RuleTypes::CosmeticOnly), + _ => Err(PyErr::new::<AdblockException, _>("Invalid RuleTypes value")), } } @@ -269,20 +279,28 @@ /// /// The format is a string containing either "standard" (ABP/uBO-style) /// or "hosts". - #[pyo3(text_signature = "($self, filter_list, format, include_redirect_urls)")] - #[args(filter_list, format = "\"standard\"", include_redirect_urls = "false")] + #[pyo3(text_signature = "($self, filter_list, format, include_redirect_urls, rule_types)")] + #[args( + filter_list, + format = "\"standard\"", + include_redirect_urls = "false", + rule_types = "\"all\"" + )] pub fn add_filter_list( &mut self, filter_list: &str, format: &str, include_redirect_urls: bool, + rule_types: &str, ) -> PyResult<()> { let filter_format = filter_format_from_string(format)?; + let rule_types = rule_types_from_string(rule_types)?; self.filter_set.add_filter_list( filter_list, ParseOptions { format: filter_format, include_redirect_urls, + rule_types, }, ); Ok(()) @@ -293,28 +311,33 @@ /// /// The format is a string containing either "standard" (ABP/uBO-style) /// or "hosts". - #[pyo3(text_signature = "($self, filters, format, include_redirect_urls)")] - #[args(filters, format = "\"standard\"", include_redirect_urls = "false")] + #[pyo3(text_signature = "($self, filters, format, include_redirect_urls, rule_types)")] + #[args( + filters, + format = "\"standard\"", + include_redirect_urls = "false", + rule_types = "\"all\"" + )] pub fn add_filters( &mut self, filters: Vec<String>, format: &str, include_redirect_urls: bool, + rule_types: &str, ) -> PyResult<()> { let filter_format = filter_format_from_string(format)?; + let rule_types = rule_types_from_string(rule_types)?; self.filter_set.add_filters( &filters, ParseOptions { format: filter_format, include_redirect_urls, + rule_types, }, ); Ok(()) } -} -#[pyproto] -impl PyObjectProtocol for FilterSet { fn __repr__(&self) -> PyResult<String> { Ok(format!("FilterSet(debug={})", self.debug.diy_python_repr())) } @@ -361,8 +384,8 @@ } } -#[pyproto] -impl PyObjectProtocol for UrlSpecificResources { +#[pymethods] +impl UrlSpecificResources { fn __repr__(&self) -> PyResult<String> { Ok(format!( "UrlSpecificResources<{} hide selectors, {} style selectors, {} exceptions, injected_javascript={}, generichide={}>", @@ -507,16 +530,27 @@ /// /// # Arguments /// * `name`: Represents the primary name of the resource, often a filename - /// * `content_type`: How to interpret the resource data within `content` + /// * `content_type`: How to interpret the resource data within `content`. + /// Use `"template"` if wanting to specify a template resource type. /// * `content`: The resource data, encoded using standard base64 configuration - #[pyo3(text_signature = "($self, name, content_type, content)")] - pub fn add_resource(&mut self, name: &str, content_type: &str, content: &str) -> PyResult<()> { + /// * `aliases`: List of aliases for the resource + #[pyo3(text_signature = "($self, name, content_type, content, aliases)")] + pub fn add_resource( + &mut self, + name: &str, + content_type: &str, + content: &str, + aliases: Option<Vec<String>>, + ) -> PyResult<()> { let result = self.engine.add_resource(Resource { name: name.to_string(), - aliases: vec![], - kind: ResourceType::Mime(MimeType::from(std::borrow::Cow::from( - content_type.to_string(), - ))), + aliases: aliases.unwrap_or_default(), + kind: match content_type { + "template" => ResourceType::Template, + _ => ResourceType::Mime(MimeType::from(std::borrow::Cow::from( + content_type.to_string(), + ))), + }, content: content.to_string(), }); @@ -662,10 +696,7 @@ .engine .hidden_class_id_selectors(&classes, &ids, &exceptions)) } -} -#[pyproto] -impl PyObjectProtocol for Engine { fn __repr__(&self) -> PyResult<String> { Ok(format!( "Engine<optimize={}>", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adblock-0.5.2/tests/test_exceptions.py new/python-adblock-0.6.0/tests/test_exceptions.py --- old/adblock-0.5.2/tests/test_exceptions.py 2022-03-01 13:56:00.000000000 +0100 +++ new/python-adblock-0.6.0/tests/test_exceptions.py 2022-07-18 00:57:45.000000000 +0200 @@ -30,6 +30,9 @@ # } # xOO6ww== => base64.b64encode('??????'.encode('gbk')) engine.add_resource( - name="aa", content_type="application/javascript", content="xOO6ww==" + name="aa", + content_type="application/javascript", + content="xOO6ww==", + aliases=[], ) assert "invalid utf content" in str(exc.value) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adblock-0.5.2/tests/test_redirect.py new/python-adblock-0.6.0/tests/test_redirect.py --- old/adblock-0.5.2/tests/test_redirect.py 2022-03-01 13:56:01.000000000 +0100 +++ new/python-adblock-0.6.0/tests/test_redirect.py 2022-07-18 00:57:45.000000000 +0200 @@ -35,11 +35,11 @@ def test_redirect_url_exception(): # https://github.com/brave/adblock-rust/blob/b7f29af8c0a0d000201d8d769b6a0b25a9dd4e89/src/blocker.rs#L1314 filter_set = adblock.FilterSet(debug=True) - filter_set.add_filter_list( - """ - ||imdb-video.media-imdb.com$media,redirect-url=http://xyz.com - @@||imdb-video.media-imdb.com^$domain=imdb.com - """, + filter_set.add_filters( + [ + "||imdb-video.media-imdb.com$media,redirect-url=http://xyz.com", + "@@||imdb-video.media-imdb.com^$domain=imdb.com", + ], include_redirect_urls=True, ) @@ -50,10 +50,11 @@ "https://www.imdb.com/video/13", "media", ) + assert res.error is None assert res.matched is False assert res.redirect == "http://xyz.com" assert res.redirect_type == "url" - assert res.exception == "@@||imdb-video.media-imdb.com^$domain=imdb.com" + assert res.exception is None def test_redirect_with_custom_resource(): ++++++ vendor.tar.xz ++++++ /work/SRC/openSUSE:Factory/python-adblock/vendor.tar.xz /work/SRC/openSUSE:Factory/.python-adblock.new.1533/vendor.tar.xz differ: char 27, line 1