From 32c56e78eaec3b7645b87e2e9e3b9e992c126954 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Fri, 8 May 2020 23:48:48 +0200 Subject: [PATCH 01/20] simplify branching model --- CONTRIBUTING.rst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 4ad2108..f14bc2b 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -56,12 +56,9 @@ Apart from that the travis-log and the check by Landscape will provide you with GIT ^^^ -The master-branch contains code that has been released to PyPi. A release is marked with a tag -corresponding to the version. Issues are closed when they have been resolved in the development-branch. - -When you have a change to make, begin by creating a new branch from the HEAD of `python-escpos/development`. -Name your branch to indicate what you are trying to achieve. Good branch names might -be `improve/text-handling`, `feature/enable-color-printing`. +The master-branch contains the main development of the project. A release to PyPi is marked with a tag +corresponding to the version. Issues are closed when they have been resolved by merging into the master-branch. +When you have a change to make, begin by creating a new branch from the HEAD of `python-escpos/master`. Please try to group your commits into logical units. If you need to tidy up your branch, you can make use of a git feature called an 'interactive rebase' before making a pull request. A small, self-contained change-set is From e1e1ccb3f2cf466aaee79751a405000e2fc09be1 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Fri, 8 May 2020 23:50:28 +0200 Subject: [PATCH 02/20] update trove identifiers --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7220055..e80f745 100755 --- a/setup.py +++ b/setup.py @@ -66,10 +66,10 @@ setup( 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries :: Python Modules', From 7c05404ac47b6c84b3c33ebc31a0ae86f7da427d Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Fri, 8 May 2020 23:51:06 +0200 Subject: [PATCH 03/20] build docs with python 3 --- readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs.yml b/readthedocs.yml index ecf365d..d34f875 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -3,5 +3,5 @@ formats: - epub requirements_file: doc/requirements.txt python: - version: 2 + version: 3 setup_py_install: true \ No newline at end of file From cadf448c3845a3dacc75d4dd614d12060836efc5 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Fri, 8 May 2020 23:53:35 +0200 Subject: [PATCH 04/20] update travis --- .travis.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index b31199d..e65bc6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,20 +29,16 @@ matrix: osx_image: xcode10.2 language: shell env: TOXENV=py37 ESCPOS_CAPABILITIES_FILE=/Users/travis/build/python-escpos/python-escpos/capabilities-data/dist/capabilities.json - - python: 2.7 - env: TOXENV=py27 - - python: 3.4 - env: TOXENV=py34 - python: 3.5 env: TOXENV=py35 - python: 3.6 env: TOXENV=py36 - - python: 3.6-dev - env: TOXENV=py36 - python: 3.7 env: TOXENV=py37 - python: 3.7-dev env: TOXENV=py37 + - python: 3.8 + env: TOXENV=py38 - python: 3.8-dev env: TOXENV=py38 - python: nightly @@ -51,13 +47,11 @@ matrix: env: TOXENV=pypy - python: pypy3 env: TOXENV=pypy3 - - python: 3.7 + - python: 3.8 env: TOXENV=docs - - python: 3.7 + - python: 3.8 env: TOXENV=flake8 allow_failures: - - python: 2.7 - - python: 3.6-dev - python: 3.7-dev - python: 3.8-dev - python: nightly @@ -86,4 +80,4 @@ deploy: tags: true repo: python-escpos/python-escpos branch: master - condition: $TRAVIS_PYTHON_VERSION = "3.7" + condition: $TRAVIS_PYTHON_VERSION = "3.8" From c53575a155ed328842daee09a892ffddedbc2331 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:02:28 +0200 Subject: [PATCH 05/20] update tox config --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 9dc7a4f..7fcb593 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27, py34, py35, py36, py37, docs, flake8 +envlist = py35, py36, py37, py38, docs, flake8 [testenv] deps = nose From fe2e1a6d2853926377827e0037085bf70de71777 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:07:02 +0200 Subject: [PATCH 06/20] add tox task for vscode --- .vscode/tasks.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .vscode/tasks.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..d4f4af7 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,16 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "test with tox", + "type": "shell", + "command": "tox", + "group": { + "kind": "test", + "isDefault": true + } + } + ] +} \ No newline at end of file From d9d400da6d3dc0e0af9c207be64e89a3a7e71615 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:07:35 +0200 Subject: [PATCH 07/20] ignore vscode settings --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index f8415e3..ba41934 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,6 @@ test/test-cli-output/ *.swp *.swn *.swo + +# vscode +.vscode/settings.json From 4836dcd486dc40a37711dc9d8dce052cf4d60573 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:27:58 +0200 Subject: [PATCH 08/20] change pytest call in tox --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 7fcb593..f2ea147 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ deps = nose pytest-mock hypothesis!=3.56.9,<4 viivakoodi -commands = py.test --cov escpos +commands = pytest --cov escpos passenv = ESCPOS_CAPABILITIES_PICKLE_DIR ESCPOS_CAPABILITIES_FILE CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_* [testenv:docs] From 18c3a5f2983238f01f4cc74bce84eaee20fc2ca3 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:37:10 +0200 Subject: [PATCH 09/20] add capabilities to manifest --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index f1666ca..d8e439a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,7 @@ include LICENSE include INSTALL include tox.ini include capabilities-data/dist/capabilities.json +include src/escpos/capabilities.json recursive-include doc *.bat recursive-include doc *.ico recursive-include doc *.py From 95ec6d5c087c4461cfee5ffcc47583cb70e166af Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:39:41 +0200 Subject: [PATCH 10/20] update hypothesis --- setup.py | 2 +- test/test_printer_file.py | 3 --- tox.ini | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index e80f745..6f64650 100755 --- a/setup.py +++ b/setup.py @@ -100,7 +100,7 @@ setup( 'nose', 'scripttest', 'mock', - 'hypothesis!=3.56.9,<4', + 'hypothesis>4', 'flake8' ], entry_points={ diff --git a/test/test_printer_file.py b/test/test_printer_file.py index 0ab23e2..304c347 100644 --- a/test/test_printer_file.py +++ b/test/test_printer_file.py @@ -28,7 +28,6 @@ else: @pytest.mark.skip("this test is broken and has to be fixed or discarded") -@settings(use_coverage=False) @given(path=text()) def test_load_file_printer(mocker, path): """test the loading of the file-printer""" @@ -40,7 +39,6 @@ def test_load_file_printer(mocker, path): @pytest.mark.skip("this test is broken and has to be fixed or discarded") -@settings(deadline=None, use_coverage=False) @given(txt=text()) def test_auto_flush(mocker, txt): """test auto_flush in file-printer""" @@ -62,7 +60,6 @@ def test_auto_flush(mocker, txt): @pytest.mark.skip("this test is broken and has to be fixed or discarded") -@settings(deadline=None, use_coverage=False) @given(txt=text()) def test_flush_on_close(mocker, txt): """test flush on close in file-printer""" diff --git a/tox.ini b/tox.ini index f2ea147..6a5a9d6 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ deps = nose pytest!=3.2.0,!=3.3.0 pytest-cov pytest-mock - hypothesis!=3.56.9,<4 + hypothesis>4 viivakoodi commands = pytest --cov escpos passenv = ESCPOS_CAPABILITIES_PICKLE_DIR ESCPOS_CAPABILITIES_FILE CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_* From 7aa20a60e37fff19d7a55cf9282328b0c02cec7a Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:40:05 +0200 Subject: [PATCH 11/20] update capabilities --- capabilities-data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capabilities-data b/capabilities-data index 8885283..3b5b35c 160000 --- a/capabilities-data +++ b/capabilities-data @@ -1 +1 @@ -Subproject commit 8885283d71a43758aa63d633fd2301df13dce9d5 +Subproject commit 3b5b35cfd35d297f9085ec16d47d1f77c3f1e768 From 5b6b96d2a0cd830719b7e4b4eefe5222fcc0a10a Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 00:58:54 +0200 Subject: [PATCH 12/20] update changelog --- CHANGELOG.rst | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d823f07..6360a69 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,10 +1,35 @@ ********* Changelog ********* +2020-05-09 - Version 3.0a7 - "No Fixed Abode" +--------------------------------------------- +This release is the eight alpha release of the new version 3.0. +Please be aware that the API is subject to change until v3.0 +is released. + +This release also marks the point at which the project transitioned +to having only a master-branch (and not an additional development branch). + +changes +^^^^^^^ +- add Exception for NotImplementedError in detach_kernel_driver +- update installation information +- update and improve documentation +- add error handling to image centering flag +- update and fix tox and CI environment, preparing drop of support for Python 2 + +contributors +^^^^^^^^^^^^ +- Alexander Bougakov +- Brian +- Yaisel Hurtado +- Maximilan Wagenbach +- Patrick Kanzler + 2019-06-19 - Version 3.0a6 - "Mistake not..." --------------------------------------------- This release is the seventh alpha release of the new version 3.0. -Please be aware the the API is subject to change until v3.0 is +Please be aware that the API is subject to change until v3.0 is released. changes From ecbdd43dffa9dda556872dddbf9e97280f10811c Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:03:45 +0200 Subject: [PATCH 13/20] install tox in github ci --- .github/workflows/pythonpackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 407d0eb..f4b57d4 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest + pip install flake8 pytest tox if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | From baffd98a22e863f8dc589fb1073712cadddc7adb Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:05:35 +0200 Subject: [PATCH 14/20] use focal on travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e65bc6d..5977b79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: python sudo: false cache: pip -dist: xenial +dist: focal git: depth: 100000 addons: From 7ea58625e6ed7af4181a528772a1506f86a68636 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:08:16 +0200 Subject: [PATCH 15/20] use tox plugin for github --- .github/workflows/pythonpackage.yml | 4 ++-- tox.ini | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index f4b57d4..f8360ae 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest tox + pip install flake8 pytest tox tox-gh-actions if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | @@ -34,6 +34,6 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest + - name: Test with tox run: | tox diff --git a/tox.ini b/tox.ini index 6a5a9d6..53211f3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,13 @@ [tox] envlist = py35, py36, py37, py38, docs, flake8 +[gh-actions] +python = + 2.7: py27 + 3.6: py36 + 3.7: py37 + 3.8: py38 + [testenv] deps = nose jaconv From fd7bd0710e171684651d5a16debec94331ca4b97 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:11:38 +0200 Subject: [PATCH 16/20] set path to capabilities file --- .github/workflows/pythonpackage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index f8360ae..ffebe1d 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -37,3 +37,4 @@ jobs: - name: Test with tox run: | tox + env: ESCPOS_CAPABILITIES_FILE=/home/runner/work/python-escpos/python-escpos/capabilities-data/dist/capabilities.json From f0b1a89c481cabd254ea3acbe8d5e53dfc553216 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:19:32 +0200 Subject: [PATCH 17/20] fix syntax --- .github/workflows/pythonpackage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index ffebe1d..0b0cd90 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -37,4 +37,5 @@ jobs: - name: Test with tox run: | tox - env: ESCPOS_CAPABILITIES_FILE=/home/runner/work/python-escpos/python-escpos/capabilities-data/dist/capabilities.json + env: + ESCPOS_CAPABILITIES_FILE: /home/runner/work/python-escpos/python-escpos/capabilities-data/dist/capabilities.json From 673105745612ea031718f9bd1e3415bb578b4368 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:25:28 +0200 Subject: [PATCH 18/20] checkout submodules on github --- .github/workflows/pythonpackage.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 0b0cd90..2c2e3eb 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -19,6 +19,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + submodules: 'recursive' - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: From 6c27222aebf8bc3dbab7fa28c90a213d52da4244 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:30:38 +0200 Subject: [PATCH 19/20] use bionic on travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5977b79..e73318c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: python sudo: false cache: pip -dist: focal +dist: bionic git: depth: 100000 addons: From fe08fc1469c1e27c3466c7671cfdbabaf9440486 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 9 May 2020 01:34:36 +0200 Subject: [PATCH 20/20] drop pypy --- .travis.yml | 2 -- setup.py | 1 - 2 files changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e73318c..39b238e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,8 +43,6 @@ matrix: env: TOXENV=py38 - python: nightly env: TOXENV=py38 - - python: pypy - env: TOXENV=pypy - python: pypy3 env: TOXENV=pypy3 - python: 3.8 diff --git a/setup.py b/setup.py index 6f64650..f067fa2 100755 --- a/setup.py +++ b/setup.py @@ -71,7 +71,6 @@ setup( 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: Implementation :: CPython', - 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Office/Business :: Financial :: Point-Of-Sale', ],