Commit Graph

857 Commits

Author SHA1 Message Date
lilydjwg
e708d19d35 tests: update test_htmlparser to avoid httpbin.org
it produces a lot of 504 errors.
2023-06-02 00:58:24 +08:00
lilydjwg
d3603fcee8 better documentation on optional dependencies
fixes #225.
[skip ci]
2023-06-02 00:43:49 +08:00
lilydjwg
ac57d8fd15 alpmfiles: fix typing 2023-06-02 00:35:05 +08:00
依云
62ab3b05ef
Merge pull request #226 from pekkarr/alpmfiles
Add alpmfiles source
2023-06-02 00:33:02 +08:00
Pekka Ristola
8157e08b59
Add alpmfiles source
Rewritten from the `archfiles` source in archlinuxcn/lilac
2023-05-31 21:29:17 +03:00
lilydjwg
af77af34f3 fight mypy[1]
The following error will be reported without if:

  error: Name "tomllib" already defined (by an import)

While this can be silenced by a "# type: ignore", in some case[2] mypy
will report the following error:

  error: Unused "type: ignore" comment

[1]: https://github.com/python/mypy/issues/1153
[2]: https://github.com/lilydjwg/nvchecker/actions/runs/4916840821/jobs/8793454970
2023-05-09 13:31:11 +08:00
lilydjwg
62a3f336b8 bump to dev version 2023-05-08 23:28:52 +08:00
lilydjwg
e9ecbd514b silence mypy for new module 2023-05-08 23:28:20 +08:00
Felix Yan
34e87db8f9
Use tomllib on Python 3.11+
Fallback to tomli for compatibility with older Python.
2023-05-08 10:52:27 +03:00
依云
8cd75fd101
Merge pull request #223 from alexfikl/remove-sre-constants
Remove usage of deprecared sre_constants
2023-05-01 17:33:56 +08:00
Alexandru Fikl
fed4fc52ff
test_cran: bump xml2 version to pass test 2023-05-01 09:59:16 +03:00
Alexandru Fikl
1be02fc29c
remove usage of deprecared sre_constants 2023-04-30 14:12:34 +03:00
依云
4a0caf3213
Merge pull request #222 from yan12125/fix-test_alpm
Fix test_alpm in Arch chroots
2023-04-07 21:11:50 +08:00
Chih-Hsuan Yen
166dfb11a4 Fix test_alpm in Arch chroots
Arch chroots with recent devtools has options=(debug) by default, and
thus test_alpm fails:

_________________________ ERROR at setup of test_alpm __________________________

module = <module 'tests.test_alpm' from '/build/nvchecker/src/nvchecker/tests/test_alpm.py'>

    def setup_module(module):
      global temp_dir, db_path
      temp_dir = tempfile.TemporaryDirectory()
      temp_path = pathlib.Path(temp_dir.name)
      pkg_path = temp_path / 'test-pkg'
      pkg_path.mkdir()
      with (pkg_path / 'PKGBUILD').open('w') as f:
        f.write(
          'pkgname=test-pkg\n'
          'pkgver=1.2.3\n'
          'pkgrel=4\n'
          'arch=(any)\n'
          'provides=("test-provides=5.6-7" "test-provides-unversioned")\n'
        )
      subprocess.check_call(['makepkg', '--nosign'], cwd=pkg_path)
      pkg_file = subprocess.check_output(['makepkg', '--packagelist'], cwd=pkg_path, text=True).strip()
      db_path = pkg_path / 'test-db'
      db_path.mkdir()
      repo_path = db_path / 'sync'
      repo_path.mkdir()
>     subprocess.check_call([
        'repo-add',
        repo_path / 'test-repo.db.tar.gz',
        pkg_path / pkg_file
      ])

tests/test_alpm.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

popenargs = (['repo-add', PosixPath('/tmp/tmp2kl26h_y/test-pkg/test-db/sync/test-repo.db.tar.gz'), PosixPath('/pkgdest/test-pkg-1.2.3-4-any.pkg.tar.zst\n/pkgdest/test-pkg-debug-1.2.3-4-any.pkg.tar.zst')],)
kwargs = {}, retcode = 1
cmd = ['repo-add', PosixPath('/tmp/tmp2kl26h_y/test-pkg/test-db/sync/test-repo.db.tar.gz'), PosixPath('/pkgdest/test-pkg-1.2.3-4-any.pkg.tar.zst\n/pkgdest/test-pkg-debug-1.2.3-4-any.pkg.tar.zst')]

    def check_call(*popenargs, **kwargs):
        """Run command with arguments.  Wait for command to complete.  If
        the exit code was zero then return, otherwise raise
        CalledProcessError.  The CalledProcessError object will have the
        return code in the returncode attribute.

        The arguments are the same as for the call function.  Example:

        check_call(["ls", "-l"])
        """
        retcode = call(*popenargs, **kwargs)
        if retcode:
            cmd = kwargs.get("args")
            if cmd is None:
                cmd = popenargs[0]
>           raise CalledProcessError(retcode, cmd)
E           subprocess.CalledProcessError: Command '['repo-add', PosixPath('/tmp/tmp2kl26h_y/test-pkg/test-db/sync/test-repo.db.tar.gz'), PosixPath('/pkgdest/test-pkg-1.2.3-4-any.pkg.tar.zst\n/pkgdest/test-pkg-debug-1.2.3-4-any.pkg.tar.zst')]' returned non-zero exit status 1.

/usr/lib/python3.10/subprocess.py:369: CalledProcessError
---------------------------- Captured stdout setup -----------------------------
==> Making package: test-pkg 1.2.3-4 (Fri Apr  7 11:53:43 2023)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> Extracting sources...
==> Entering fakeroot environment...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "test-pkg"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: test-pkg 1.2.3-4 (Fri Apr  7 11:53:44 2023)
==> No packages modified, nothing to do.
---------------------------- Captured stderr setup -----------------------------
==> ERROR: File '/pkgdest/test-pkg-1.2.3-4-any.pkg.tar.zst
/pkgdest/test-pkg-debug-1.2.3-4-any.pkg.tar.zst' not found.
2023-04-07 20:38:17 +08:00
lilydjwg
80343945a1 bump version to 2.11 2023-04-06 21:00:56 +08:00
lilydjwg
1bbbdca638 github actions: exclude matrix containing an upstream bug 2023-03-26 20:51:19 +08:00
lilydjwg
414c20a60f update github actions versions 2023-03-26 20:02:39 +08:00
lilydjwg
931b3fdf3c github actions: test again Python 3.11 2023-03-26 18:47:38 +08:00
lilydjwg
577a42ef89 update tests
Microsoft's teams repo has gone.
2023-03-26 18:39:05 +08:00
lilydjwg
addc7d0b52 regex source: cache by url and post_data
so we can search for different regexes for the same web page.

fixes #221.
2023-03-26 17:30:08 +08:00
依云
e71dd309e7
Merge pull request #220 from alexfikl/port-platformdirs
Port from deprecated appdirs to platformdirs
2023-02-02 01:27:05 +08:00
Alexandru Fikl
8366e519d6
port from deprecated appdirs to platformdirs 2023-02-01 17:15:15 +02:00
lilydjwg
2782205efc remove unused # type: ignore 2022-11-20 14:16:33 +08:00
lilydjwg
2107e6ef6f try to fix mypy 2022-11-20 14:14:33 +08:00
lilydjwg
4bace14110 add comment about how to build and upload 2022-11-20 13:50:32 +08:00
lilydjwg
fad7cf631d Merge remote-tracking branch 'origin/pr/212'
Conflicts:
      setup.cfg
      setup.py
2022-11-20 13:42:22 +08:00
lilydjwg
add6951eae new dev version starts 2022-11-20 13:35:54 +08:00
lilydjwg
8ca78f7445 docs: update about default git branch.
[skip ci]
2022-11-08 20:57:10 +08:00
lilydjwg
324f2f5f59 bump version to 2.10 2022-10-30 13:57:00 +08:00
依云
115963ab93
Merge pull request #219 from yan12125/minor-fixes
Several minor fixes for docs and tests
2022-10-29 14:37:55 +08:00
Chih-Hsuan Yen
2fc6be9d4e Update versions in test_{openvsx,vsmarketplace} 2022-10-29 14:22:23 +08:00
Chih-Hsuan Yen
3d3d8c6136 Fix test_{archpkg,pacman}
Apparently the ipw2100-fw package is dropped. I switched to another
package that is rarely updated.
2022-10-29 14:21:02 +08:00
Chih-Hsuan Yen
51ffbbdf61 Fix docs warnings
usage.rst:886: (WARNING/2) Title underline too short.

    Check Visual Studio Code Marketplace
    ~~~~~~~~~~~~~~~
    usage.rst:886: (WARNING/2) Title underline too short.

    Check Visual Studio Code Marketplace
    ~~~~~~~~~~~~~~~
2022-10-29 14:20:07 +08:00
lilydjwg
4c4479d4ea gitea: omit default branch if not specified, fix for blm 2022-08-25 16:46:06 +08:00
依云
a1d2a1325c
Merge pull request #218 from moodyhunter/master
alpm source: support checking packages from multiple repos
2022-08-25 16:32:03 +08:00
Moody Liu
dada15505c
doc: separate 'repo' and 'repos' for alpm source 2022-08-21 15:29:07 +01:00
Moody Liu
706952609e
update alpm documentation: repos 2022-08-21 14:54:34 +01:00
Moody Liu
7b2a464821
alpm: support searching in multiple repos 2022-08-21 14:51:06 +01:00
lilydjwg
13cca483e1 update test_android_sdk.py 2022-08-12 13:52:04 +08:00
lilydjwg
9ee53041b6 catch exceptions from Worker.run 2022-08-12 13:40:33 +08:00
lilydjwg
8b8f2d1d8a nvchecker-notify: try Notify 0.8
fixes #217.
2022-07-16 15:48:59 +08:00
lilydjwg
268bd9125e begin a new version 2022-07-16 15:47:52 +08:00
lilydjwg
2325d2ac74 bump version to 2.9 2022-06-27 20:33:39 +08:00
Vanilla
2de30c0acd vsmarketplace: use better filterType
fixes #216.
2022-06-18 16:27:17 +08:00
lilydjwg
914c6414e8 fix tests trying to raise exc_info=True 2022-06-12 14:22:14 +08:00
lilydjwg
8b32c26d1e htmlparser: handle xpath pointing to element instead of text() 2022-06-12 12:31:11 +08:00
lilydjwg
e683476fb2 avoid the whole process taken down by a single _process_result 2022-06-12 12:22:07 +08:00
lilydjwg
88cbdd925c fix mypy 2022-06-05 14:41:57 +08:00
lilydjwg
ffe84cae08 add support for using awesomeversion to compare versions 2022-06-05 14:31:54 +08:00
lilydjwg
d706961669 update tests 2022-04-21 17:23:20 +08:00