Merge pull request #220 from alexfikl/port-platformdirs

Port from deprecated appdirs to platformdirs
This commit is contained in:
依云 2023-02-02 01:27:05 +08:00 committed by GitHub
commit e71dd309e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 8 additions and 11 deletions

View File

@ -18,7 +18,7 @@ jobs:
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-cache-pip-
- name: Install deps
run: pip3 install -U tornado pytest pytest-asyncio pytest-httpbin flaky structlog tomli aiohttp httpx mypy awesomeversion
run: pip3 install -U tornado pytest pytest-asyncio pytest-httpbin flaky structlog tomli platformdirs aiohttp httpx mypy awesomeversion
- name: Run mypy for --install-types
run: PATH=$HOME/.local/bin:$PATH mypy --namespace-packages --explicit-package-bases nvchecker nvchecker_source tests
continue-on-error: true

View File

@ -45,7 +45,7 @@ jobs:
sudo apt install -y libcurl4-openssl-dev
# werkzeug is pinned for httpbin compatibility https://github.com/postmanlabs/httpbin/issues/673
- name: Install Python deps
run: pip install -U ${{ matrix.deps }} pytest pytest-asyncio pytest-httpbin flaky structlog tomli appdirs lxml 'werkzeug<2.1' awesomeversion
run: pip install -U ${{ matrix.deps }} pytest pytest-asyncio pytest-httpbin flaky structlog tomli platformdirs lxml 'werkzeug<2.1' awesomeversion
- name: Decrypt keys
env:
KEY: ${{ secrets.KEY }}

View File

@ -24,7 +24,7 @@ This is the version 2.0 branch. For the old version 1.x, please switch to the ``
Dependency
----------
- Python 3.7+
- Python library: structlog, tomli, appdirs
- Python library: structlog, tomli, platformdirs
- One of these Python library combinations (ordered by preference):
* tornado + pycurl

View File

@ -1,6 +1,6 @@
tomli
structlog
appdirs
platformdirs
tornado>=6
sphinx>=3.2
# <5 has strange bottom margins for p, and no list indicators

View File

@ -18,7 +18,7 @@ This is the version 2.0 branch. For the old version 1.x, please switch to the ``
Dependency
----------
- Python 3.7+
- Python library: structlog, tomli, appdirs
- Python library: structlog, tomli, platformdirs
- One of these Python library combinations (ordered by preference):
* tornado + pycurl

View File

@ -18,8 +18,5 @@ ignore_missing_imports = True
[mypy-pytest_httpbin]
ignore_missing_imports = True
[mypy-appdirs]
ignore_missing_imports = True
[mypy-lxml]
ignore_missing_imports = True

View File

@ -22,7 +22,7 @@ import json
import structlog
import tomli
import appdirs
import platformdirs
from .lib import nicelogger
from . import slogconf
@ -40,7 +40,7 @@ from . import httpclient
logger = structlog.get_logger(logger_name=__name__)
def get_default_config() -> str:
confdir = appdirs.user_config_dir(appname='nvchecker')
confdir = platformdirs.user_config_dir(appname='nvchecker')
file = os.path.join(confdir, 'nvchecker.toml')
return file

View File

@ -43,7 +43,7 @@ install_requires =
setuptools; python_version<"3.8"
tomli
structlog
appdirs
platformdirs
tornado>=6
pycurl
scripts =