mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
port from deprecated appdirs to platformdirs
This commit is contained in:
parent
2782205efc
commit
8366e519d6
8 changed files with 8 additions and 11 deletions
2
.github/workflows/mypy.yaml
vendored
2
.github/workflows/mypy.yaml
vendored
|
@ -18,7 +18,7 @@ jobs:
|
||||||
${{ runner.os }}-${{ env.cache-name }}-
|
${{ runner.os }}-${{ env.cache-name }}-
|
||||||
${{ runner.os }}-cache-pip-
|
${{ runner.os }}-cache-pip-
|
||||||
- name: Install deps
|
- 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
|
- name: Run mypy for --install-types
|
||||||
run: PATH=$HOME/.local/bin:$PATH mypy --namespace-packages --explicit-package-bases nvchecker nvchecker_source tests
|
run: PATH=$HOME/.local/bin:$PATH mypy --namespace-packages --explicit-package-bases nvchecker nvchecker_source tests
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
2
.github/workflows/tests.yaml
vendored
2
.github/workflows/tests.yaml
vendored
|
@ -45,7 +45,7 @@ jobs:
|
||||||
sudo apt install -y libcurl4-openssl-dev
|
sudo apt install -y libcurl4-openssl-dev
|
||||||
# werkzeug is pinned for httpbin compatibility https://github.com/postmanlabs/httpbin/issues/673
|
# werkzeug is pinned for httpbin compatibility https://github.com/postmanlabs/httpbin/issues/673
|
||||||
- name: Install Python deps
|
- 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
|
- name: Decrypt keys
|
||||||
env:
|
env:
|
||||||
KEY: ${{ secrets.KEY }}
|
KEY: ${{ secrets.KEY }}
|
||||||
|
|
|
@ -24,7 +24,7 @@ This is the version 2.0 branch. For the old version 1.x, please switch to the ``
|
||||||
Dependency
|
Dependency
|
||||||
----------
|
----------
|
||||||
- Python 3.7+
|
- Python 3.7+
|
||||||
- Python library: structlog, tomli, appdirs
|
- Python library: structlog, tomli, platformdirs
|
||||||
- One of these Python library combinations (ordered by preference):
|
- One of these Python library combinations (ordered by preference):
|
||||||
|
|
||||||
* tornado + pycurl
|
* tornado + pycurl
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
tomli
|
tomli
|
||||||
structlog
|
structlog
|
||||||
appdirs
|
platformdirs
|
||||||
tornado>=6
|
tornado>=6
|
||||||
sphinx>=3.2
|
sphinx>=3.2
|
||||||
# <5 has strange bottom margins for p, and no list indicators
|
# <5 has strange bottom margins for p, and no list indicators
|
||||||
|
|
|
@ -18,7 +18,7 @@ This is the version 2.0 branch. For the old version 1.x, please switch to the ``
|
||||||
Dependency
|
Dependency
|
||||||
----------
|
----------
|
||||||
- Python 3.7+
|
- Python 3.7+
|
||||||
- Python library: structlog, tomli, appdirs
|
- Python library: structlog, tomli, platformdirs
|
||||||
- One of these Python library combinations (ordered by preference):
|
- One of these Python library combinations (ordered by preference):
|
||||||
|
|
||||||
* tornado + pycurl
|
* tornado + pycurl
|
||||||
|
|
3
mypy.ini
3
mypy.ini
|
@ -18,8 +18,5 @@ ignore_missing_imports = True
|
||||||
[mypy-pytest_httpbin]
|
[mypy-pytest_httpbin]
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
|
|
||||||
[mypy-appdirs]
|
|
||||||
ignore_missing_imports = True
|
|
||||||
|
|
||||||
[mypy-lxml]
|
[mypy-lxml]
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
|
|
|
@ -22,7 +22,7 @@ import json
|
||||||
|
|
||||||
import structlog
|
import structlog
|
||||||
import tomli
|
import tomli
|
||||||
import appdirs
|
import platformdirs
|
||||||
|
|
||||||
from .lib import nicelogger
|
from .lib import nicelogger
|
||||||
from . import slogconf
|
from . import slogconf
|
||||||
|
@ -40,7 +40,7 @@ from . import httpclient
|
||||||
logger = structlog.get_logger(logger_name=__name__)
|
logger = structlog.get_logger(logger_name=__name__)
|
||||||
|
|
||||||
def get_default_config() -> str:
|
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')
|
file = os.path.join(confdir, 'nvchecker.toml')
|
||||||
return file
|
return file
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ install_requires =
|
||||||
setuptools; python_version<"3.8"
|
setuptools; python_version<"3.8"
|
||||||
tomli
|
tomli
|
||||||
structlog
|
structlog
|
||||||
appdirs
|
platformdirs
|
||||||
tornado>=6
|
tornado>=6
|
||||||
pycurl
|
pycurl
|
||||||
scripts =
|
scripts =
|
||||||
|
|
Loading…
Add table
Reference in a new issue