Commit graph

438 commits

Author SHA1 Message Date
lilydjwg
9a271c030b bump version to 1.4.3 and update doc 2019-03-24 15:31:40 +08:00
Chih-Hsuan Yen
7dab7c3b6a
Get rid of warnings from logging.warn
logging.warn is deprecated [1].

[1] https://docs.python.org/3/library/logging.html#logging.Logger.warning
2019-03-23 23:59:13 +08:00
lilydjwg
2677d29f1d github: use a better API for tags so we use less requests 2019-03-22 23:47:39 +08:00
lilydjwg
7370b8d23b github: fix next_page_url
fixes #103
2019-03-22 23:42:35 +08:00
lilydjwg
c64766cc0e bump version again to 1.4.2
because 1.4.1 was bad (forgot to git pull)
2019-03-22 21:04:02 +08:00
lilydjwg
445ae6452b bump version to 1.4.1 2019-03-22 21:03:46 +08:00
依云
34ce4b0678
Merge pull request #102 from donfranio/fix-wrong-config-param-type-max_page
read 'max_page' as int
2019-03-22 18:58:15 +08:00
Frank Scherrer
e2f68f764d
add casting 'max_page' to int 2019-03-22 10:34:01 +01:00
lilydjwg
a7f7a632a2 README: fix warnings 2019-03-16 21:32:00 +08:00
lilydjwg
c34c2e70ee version 1.4 2019-03-16 21:13:49 +08:00
lilydjwg
056fe65e79 use is not None for xml.etree.Element 2019-03-07 17:23:36 +08:00
依云
e58142e37f
Merge pull request #100 from yan12125/improve-tests
Improve tests
2019-03-07 17:08:05 +08:00
Chih-Hsuan Yen
2a9b60155b
Re-raise previous exceptions 2019-03-07 16:45:14 +08:00
Chih-Hsuan Yen
be7618988e
github: Fix "No tag found in upstream repository" with use_max_tag 2019-03-07 16:26:58 +08:00
Chih-Hsuan Yen
ab1ecc231d
Raise exceptions on all warnings and errors in tests 2019-03-07 16:25:54 +08:00
lilydjwg
5437100f08 fix github test 2019-03-06 22:45:23 +08:00
lilydjwg
ca68c44201 github: try as few API calls as possible 2019-03-06 22:37:18 +08:00
lilydjwg
c23ef737d4 add a `max_page` option to github source
also update README for other minor issue.
2019-03-06 22:33:58 +08:00
lilydjwg
e5d52a9762 add the exclude_regex list option 2019-03-06 22:15:50 +08:00
lilydjwg
5b47391af0 fix gitlab test 2019-03-06 22:03:35 +08:00
lilydjwg
de381bf26d fix github test and update the doc 2019-03-06 22:01:07 +08:00
lilydjwg
7897317294 add the "list options" feature
closes #83
old options will be removed in #99
2019-03-06 21:51:04 +08:00
lilydjwg
58a68957e9 update document for the new list options 2019-03-06 21:33:21 +08:00
lilydjwg
6e60b84740 README: minor fix 2019-03-06 21:18:07 +08:00
lilydjwg
5a8577dec6 minor usage update 2019-02-24 19:49:43 +08:00
lilydjwg
87a55c6cf9 fix README link and remove unused section 2019-02-15 20:32:43 +08:00
lilydjwg
a6315985d0 support for retry on failure
resolves #94
2019-02-15 20:16:49 +08:00
依云
f482ee6499
Merge pull request #93 from petronny/master
added path to github source
2019-01-28 20:07:10 +08:00
Jingbei Li
620c7a89cd added path to github source 2019-01-28 19:36:41 +08:00
依云
2f24822c88
Merge pull request #92 from yan12125/fix-pypi
pypi: fix valueless items
2019-01-07 14:19:50 +08:00
Chih-Hsuan Yen
d2d0279d56
Fix tests
Workaround pytest-asyncio incompatibility with pytest 4.1 [1]

[1] https://github.com/pytest-dev/pytest-asyncio/issues/104
2019-01-07 14:08:18 +08:00
Chih-Hsuan Yen
b108d9624a
pypi: fix valueless items
Fix checking for such an nvchecker.ini:

[logcat-color]
pypi =
2019-01-07 02:19:30 +08:00
lilydjwg
ae011170af update README for pypi use_pre_release config 2019-01-01 22:06:33 +08:00
Bruce Zhang
2e55a7db60 pypi: use_pre_release support
Signed-off-by: Bruce Zhang <zttt183525594@gmail.com>
2019-01-01 22:05:16 +08:00
依云
22c7b5db20
Merge pull request #90 from yan12125/fix-for-python38
Fix running on Python 3.8
2018-12-27 16:29:45 +08:00
Chih-Hsuan Yen
6002e273a9
Fix running on Python 3.8
Fix the following 2 errors when running on Python 3.8

```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/yen/Projects/nvchecker/nvchecker/main.py", line 33, in main
    if core.process_common_arguments(args):
  File "/home/yen/Projects/nvchecker/nvchecker/core.py", line 46, in process_common_arguments
    nicelogger.enable_pretty_logging(
  File "/home/yen/Projects/nvchecker/nvchecker/lib/nicelogger.py", line 93, in enable_pretty_logging
    formatter = TornadoLogFormatter(color=color)
  File "/home/yen/Projects/nvchecker/nvchecker/lib/nicelogger.py", line 16, in __init__
    super().__init__(self, *args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 589, in __init__
    self._style.validate()
  File "/usr/lib/python3.8/logging/__init__.py", line 441, in validate
    if not self.validation_pattern.search(self._fmt):
TypeError: expected string or bytes-like object
```

```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/yen/Projects/nvchecker/nvchecker/main.py", line 42, in main
    ioloop.run_until_complete(s.check())
  File "/usr/lib/python3.8/asyncio/base_events.py", line 589, in run_until_complete
    return future.result()
  File "/home/yen/Projects/nvchecker/nvchecker/core.py", line 177, in check
    self.print_version_update(name, result)
  File "/home/yen/Projects/nvchecker/nvchecker/core.py", line 190, in print_version_update
    logger.info('updated', name=name, version=version, old_version=oldver)
  File "/home/yen/.local/lib/python3.8/site-packages/structlog/_base.py", line 191, in _proxy_to_logger
    args, kw = self._process_event(method_name, event, event_kw)
  File "/home/yen/.local/lib/python3.8/site-packages/structlog/_base.py", line 151, in _process_event
    event_dict = proc(self._logger, method_name, event_dict)
  File "/home/yen/Projects/nvchecker/nvchecker/slogconf.py", line 48, in stdlib_renderer
    getattr(logger, level)(
  File "/usr/lib/python3.8/logging/__init__.py", line 1441, in info
    self._log(INFO, msg, args, **kwargs)
  File "/usr/lib/python3.8/logging/__init__.py", line 1572, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given
```

To fix the second issue, I backported relevant CPython changes [1] to slogconf.py

Test command: `python3.8 -c 'from nvchecker.main import main; main()' sample_source.ini`

[1] dde9fdbe45 (diff-c11fc567cf5b6e518eb855c23b5599bcR1400)
2018-12-26 11:39:23 +08:00
lilydjwg
77de8da557 make README look better 2018-12-16 14:17:58 +08:00
lilydjwg
13441ea88a 1.3 release, bump version 2018-12-16 13:30:10 +08:00
lilydjwg
d6067a3e86 add repology badge
thanks to @farseerfc
2018-12-16 13:28:40 +08:00
依云
377242f70b
Merge pull request #89 from yan12125/cache-vcs-by-name
Use the name as the fallback cache key for vcs packages
2018-12-16 13:24:37 +08:00
Chih-Hsuan Yen
0301155177
Use the name as the fallback cache key for vcs packages
Fixes #88
2018-12-15 21:45:11 +08:00
lilydjwg
5848aa39d9 travis-ci: fix pypy3, and python 3.7 works now 2018-12-05 17:14:46 +08:00
lilydjwg
b5fce0a3b9 tests: maybe newer pytest works now? 2018-12-05 16:46:23 +08:00
lilydjwg
eb75dc8305 Revert "tests: disable bitbucket tests because Travis-CI chooses the obsolete TLS 1.0 protocol"
This reverts commit 1da0e785db.

Trying other methods...
2018-12-05 16:38:45 +08:00
lilydjwg
5d3b5ed10c travis: use xenial 2018-12-05 16:38:09 +08:00
lilydjwg
1da0e785db tests: disable bitbucket tests because Travis-CI chooses the obsolete TLS 1.0 protocol 2018-12-05 16:34:57 +08:00
Chih-Hsuan Yen
6c6aff99b1
Workaround some pycurl.error issues
In my experiments, pycurl.error issues [1][2] do not appear if no 30x redirection involved.

Tested with https://github.com/tornadoweb/tornado/files/2624772/nv.log

[1] https://github.com/tornadoweb/tornado/issues/2542
[2] https://github.com/curl/curl/issues/3324
2018-12-04 22:23:04 +08:00
lilydjwg
5af558d214 tests: example.net certificate has expired, use http instead 2018-11-29 13:31:08 +08:00
Felix Yan
c1e5822f07
Handle graceful exit and timeout
Timeout was refactored and the defaults work correctly here.
2018-11-29 06:39:14 +08:00
Felix Yan
e3d62d4169
Ignore content type checking for aiohttp
Pass content_type=None as per the document suggests:

https://docs.aiohttp.org/en/stable/client_advanced.html#disabling-content-type-validation-for-json-responses
2018-11-29 06:37:47 +08:00