From 042f945a09acf2dab8ec145a708f30715c8e6d41 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sat, 23 Jul 2016 14:55:19 +0200 Subject: [PATCH 1/6] doc added stump for next release --- CHANGELOG.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a8d0d63..5ae2954 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,15 @@ Changelog ********* +2016-??-?? - Version 2.1.? - "Contents May Differ" +-------------------------------------------------- + +changes +^^^^^^^ + +contributors +^^^^^^^^^^^^ + 2016-07-23 - Version 2.1.0 - "But Who's Counting?" -------------------------------------------------- From bef1a9cccf2e77c5e9b76e0c815439c078b5cbeb Mon Sep 17 00:00:00 2001 From: "Renato.Lorenzi" Date: Mon, 1 Aug 2016 09:36:48 -0300 Subject: [PATCH 2/6] Change the interface param to timeout --- src/escpos/printer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/escpos/printer.py b/src/escpos/printer.py index 41c674f..1ee1db7 100644 --- a/src/escpos/printer.py +++ b/src/escpos/printer.py @@ -34,18 +34,18 @@ class Usb(Escpos): """ - def __init__(self, idVendor, idProduct, interface=0, in_ep=0x82, out_ep=0x01, *args, **kwargs): + def __init__(self, idVendor, idProduct, timeout=0, in_ep=0x82, out_ep=0x01, *args, **kwargs): """ :param idVendor: Vendor ID :param idProduct: Product ID - :param interface: USB device interface + :param timeout: Is the time limit of the USB operation. Default without timeout. :param in_ep: Input end point :param out_ep: Output end point """ Escpos.__init__(self, *args, **kwargs) self.idVendor = idVendor self.idProduct = idProduct - self.interface = interface + self.timeout = timeout self.in_ep = in_ep self.out_ep = out_ep self.open() @@ -82,7 +82,7 @@ class Usb(Escpos): :param msg: arbitrary code to be printed :type msg: bytes """ - self.device.write(self.out_ep, msg, self.interface) + self.device.write(self.out_ep, msg, self.timeout) def close(self): """ Release USB interface """ From 37baf5cd34d562cba1bf5bba708879b45dbe96ee Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Mon, 1 Aug 2016 23:59:46 +0200 Subject: [PATCH 3/6] update changelog --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5ae2954..d12e45d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,9 +7,11 @@ Changelog changes ^^^^^^^ +- rename variable interface in USB-class to timeout contributors ^^^^^^^^^^^^ +- Renato Lorenzi 2016-07-23 - Version 2.1.0 - "But Who's Counting?" -------------------------------------------------- From c1a6da9aaa27d5b215fe5cc35498fd9c1793b1bf Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sun, 24 Jul 2016 15:06:05 +0200 Subject: [PATCH 4/6] configure codecov.io For $reasons codecov.io stopped working. Now with my account explicitly set as "bot" it works again. --- codecov.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/codecov.yml b/codecov.yml index 50302f9..3f03c93 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,4 +1,16 @@ +codecov: + bot: patkan + coverage: + status: + project: + default: # status context + target: auto + threshold: "1%" + patch: + default: + target: auto + threshold: "1%" range: "60...100" comment: off From a2e188cecf092eea5b6c969bfddc3c538381fff0 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sun, 24 Jul 2016 01:53:37 +0200 Subject: [PATCH 5/6] move pypy3 to the allowed failures and add hypothesis pypy3 is not compatible with hypothesis, which is needed for testing --- .gitignore | 1 + .travis.yml | 1 + setup.py | 2 +- tox.ini | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 247392d..944dcb3 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ build/ dist/ .coverage src/escpos/version.py +.hypothesis # testing temporary directories test/test-cli-output/ diff --git a/.travis.yml b/.travis.yml index e4d4f6e..76794ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,7 @@ matrix: allow_failures: - python: 3.5-dev - python: nightly + - python: pypy3 before_install: - pip install tox codecov script: diff --git a/setup.py b/setup.py index 7a3895b..0e3eea5 100755 --- a/setup.py +++ b/setup.py @@ -116,7 +116,7 @@ setup( setup_requires=[ 'setuptools_scm', ], - tests_require=['tox', 'nose', 'scripttest'], + tests_require=['tox', 'nose', 'scripttest', 'mock', 'hypothesis'], cmdclass={'test': Tox}, entry_points={ 'console_scripts': [ diff --git a/tox.ini b/tox.ini index b1dee64..0968270 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,8 @@ envlist = py27, py34, py35, docs deps = nose coverage scripttest + mock + hypothesis commands = nosetests --with-coverage --cover-erase --cover-branches [testenv:docs] From c92d4463ae02576b1622d1ccf9e0de91cbb50b86 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Tue, 2 Aug 2016 00:27:08 +0200 Subject: [PATCH 6/6] update changelog --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d12e45d..1ace354 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,9 +8,11 @@ Changelog changes ^^^^^^^ - rename variable interface in USB-class to timeout +- add support for hypothesis and move pypy3 to the allowed failures (pypy3 is not supported by hypothesis) contributors ^^^^^^^^^^^^ +- Patrick Kanzler - Renato Lorenzi 2016-07-23 - Version 2.1.0 - "But Who's Counting?"