This change replaces the simple lists and dictionaries
defined in brother_ql/devicedependent.py with data class
definitions based on attrs. They are split into two
new modules:
* brother_ql/models.py and
* brother_ql/labels.py.
To keep the compatibility with other software relying on
this package, the old brother_ql/devicedependent.py module
can still be imported. Its content is recreated with the
help of the new modules in some _populate_legacy_structures()
functions.
There is a big problem with this commit - it only works with:
* Python 3.5 and later due to
type hints being introduced with
PEP-484 https://www.python.org/dev/peps/pep-0484/
lead to syntax errors on earlier versions.
* (even worse) only with Python 3.6+ due to
PEP 526 variable annotations (introduced in 3.6)
needed by dataclasses too.
We aim, however, at Python 2.7 compatibility with this project.
So after all, I reverse the commit and will implement the changes
in a different way.
This change replaces the simple lists and dictionaries
defined in brother_ql/devicedependent.py with data class
based definitions split into two new modules:
* brother_ql/models.py and
* brother_ql/labels.py.
To keep the compatibility with other software relying on
this package, the old brother_ql/devicedependent.py module
can still be imported. Its content is recreated with the
help of the new modules in some _populate_legacy_structures()
functions.
This command lists the running conditions as shown below:
##################
Information about the running environment of brother_ql.
(Please provide this information when reporting any issue.)
About the computer:
* Platform: Linux-4.4.138-59-default-x86_64-with-SuSE-42.3-x86_64
* Processor: x86_64
* Release: 4.4.138-59-default
* System: Linux
* Machine: x86_64
* Architecture: ('64bit', 'ELF')
About the installed Python version:
* 3.7.0 (default, Jul 31 2018, 19:42:44) [GCC 4.8.5]
About the brother_ql package:
* package location: /local/pyvenv/py37loc/lib/python3.7/site-packages
* package version: 0.9.dev0
* brother_ql CLI path: /local/pyvenv/py37loc/bin/brother_ql
About the requirements of brother_ql:
requirement | requested | installed version
-------------- | ---------- | -----------------
click | any | 6.7
future | any | 0.16.0
packbits | any | 0.6
pillow | >= 3.3.0 | 5.2.0
##################
* The installation instructions were extended to cover
the cases where pip was (willingly or not) used with
the --user flag.
See issue #36 were this came up.
* The use of brother_ql_{create,print,debug,analyze,info}
is now considered deprecated.
* Furthermore: wording on brother_ql_web improved