1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-09-13 09:09:58 +00:00

4 Commits

Author SHA1 Message Date
dependabot[bot]
1349ad85bf Bump actions/setup-python from 5.6.0 to 6.0.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.6.0 to 6.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.6.0...v6.0.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 12:14:08 +00:00
Gertjan van den Burg
11d46fdb66 Make logging.basicConfig conditional (#670)
Co-authored-by: Patrick Kanzler <4189642+patkan@users.noreply.github.com>
2025-08-25 01:36:17 +02:00
Hasan Sezer Taşan
1a780e8f80 ref(package) replace appdirs with platformdirs in configuration and requirements files (#697)
* ref(package) replace appdirs with platformdirs in configuration and requirements files

* ref: remove types-appdirs from dependencies in tox.ini
2025-08-25 01:30:25 +02:00
dependabot[bot]
c702204231 Bump actions/checkout from 4 to 5 (#694)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-25 01:22:31 +02:00
11 changed files with 16 additions and 16 deletions

View File

@@ -6,7 +6,7 @@ jobs:
black-code-style: black-code-style:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: psf/black@stable - uses: psf/black@stable
with: with:
version: "23.12.0" version: "23.12.0"

View File

@@ -30,7 +30,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v5
with: with:
# We must fetch at least the immediate parents so that if this is # We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head. # a pull request then we can checkout the head.

View File

@@ -19,7 +19,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: 'recursive' submodules: 'recursive'
- name: Install packages - name: Install packages

View File

@@ -15,11 +15,11 @@ jobs:
python-version: ['3.11', '3.12', '3.13'] python-version: ['3.11', '3.12', '3.13']
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: 'recursive' submodules: 'recursive'
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.6.0 uses: actions/setup-python@v6.0.0
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install dependencies - name: Install dependencies

View File

@@ -18,11 +18,11 @@ jobs:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: 'recursive' submodules: 'recursive'
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.6.0 uses: actions/setup-python@v6.0.0
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install dependencies - name: Install dependencies

View File

@@ -1,4 +1,4 @@
appdirs==1.4.4 platformdirs==4.3.8
argcomplete==3.0.8 argcomplete==3.0.8
blinker==1.6.2 blinker==1.6.2
click==8.1.3 click==8.1.3

View File

@@ -43,7 +43,7 @@ install_requires =
python-barcode>=0.15.0,<1 python-barcode>=0.15.0,<1
setuptools setuptools
six six
appdirs platformdirs
PyYAML PyYAML
argcomplete argcomplete
importlib_resources importlib_resources

View File

@@ -13,9 +13,10 @@ from typing import Any, Dict, Optional, Type
import importlib_resources import importlib_resources
import yaml import yaml
if environ.get("ESCPOS_CAPABILITIES_DEBUG", 0):
logging.basicConfig() logging.basicConfig()
logger = logging.getLogger(__name__)
logger = logging.getLogger(__name__)
pickle_dir = environ.get("ESCPOS_CAPABILITIES_PICKLE_DIR", mkdtemp()) pickle_dir = environ.get("ESCPOS_CAPABILITIES_PICKLE_DIR", mkdtemp())
pickle_path = path.join(pickle_dir, f"{platform.python_version()}.capabilities.pickle") pickle_path = path.join(pickle_dir, f"{platform.python_version()}.capabilities.pickle")
# get a temporary file from importlib_resources if no file is specified in env # get a temporary file from importlib_resources if no file is specified in env

View File

@@ -5,7 +5,7 @@ This module contains the implementations of abstract base class :py:class:`Confi
import os import os
import pathlib import pathlib
import appdirs import platformdirs
import yaml import yaml
from . import exceptions, printer from . import exceptions, printer
@@ -55,7 +55,7 @@ class Config:
if not config_path: if not config_path:
config_path = os.path.join( config_path = os.path.join(
appdirs.user_config_dir(self._app_name), self._config_file platformdirs.user_config_dir(self._app_name), self._config_file
) )
if isinstance(config_path, pathlib.Path): if isinstance(config_path, pathlib.Path):
# store string if posixpath # store string if posixpath

View File

@@ -8,7 +8,7 @@
""" """
import pathlib import pathlib
import appdirs import platformdirs
import pytest import pytest
import escpos.exceptions import escpos.exceptions
@@ -80,7 +80,7 @@ def test_config_load_from_appdir() -> None:
# generate a dummy config # generate a dummy config
config_file = ( config_file = (
pathlib.Path(appdirs.user_config_dir(config.Config._app_name)) pathlib.Path(platformdirs.user_config_dir(config.Config._app_name))
/ config.Config._config_file / config.Config._config_file
) )

View File

@@ -55,7 +55,6 @@ deps = mypy
types-six types-six
types-mock types-mock
types-PyYAML types-PyYAML
types-appdirs
types-Pillow types-Pillow
types-pyserial types-pyserial
types-pywin32>=306.0.0.6 types-pywin32>=306.0.0.6