- Fixed packaging: include man page, source distribution did not contain all relevant files such as docs and test suite.
- Switched from setuptools to flit for setup
- Updated test suite to work with musl based distributions
- Dropped Python 2.7 support
- Removed dependency on
pkg_resources
. Segno usesimportlib.metadata
to provide plugins. For Python versions < 3.10 this introduces a dependency onimportlib-metadata
.
- Merged PR #124 implemented by missionfloyd: Remove the trailing dot of latitude/longitude information.
- Merged PR #125 implemented by missionfloyd: More lenient check how to interpret empty or false values in vCard and MeCard.
- Internal changes: Made
writers
module independent of internal version constants, they operate upon a matrix of a given size and know nothing about the QR Code version (i.e. QR Code vs. Micro QR Code). These changes are backwards incompatible but thewriters
module does not belong to the public API anyway. - Dropped testing against PyPy2
- Changed default Python test version to 3.11 (2.7 is still supported)
- Support for Python 2.7 will be dropped in the next version of Segno because it is no longer possible to run automatic tests against Python 2.x.
- Removed deprecated statements from setup.cfg (#127 thanks for the hint, Gene)
- Updated example to Pillow 10 API (#128, again thanks to Gene)
Added support for PEP 517
Removed PyQRCode from comparison / benchmarks since it adds no value anymore
Added more properties for vCard see PR #106 contributed by Tobias Udtke:
- cellphone (TEL;TYPE=CELL)
- homephone (TEL;TYPE=HOME)
- workphone (TEL;TYPE=WORK)
Signatures of segno.helpers.make_vcard and segno.helpers.make_vcard_data changed, but in a backwards compatible way.
Changed default Python test version to 3.10 (2.7 and above are still supported)
- Unreleased due to packaging failures.
- Unreleased due to packaging failures.
- Fixed Python type hints
- XPM serializer accepts
None
(transparent) for dark modules - Better docs
- Added option to print QR codes in a more compact manner to the terminal. PR #97 implemented by Christian Oudard.
- Minor doc changes
- Added more test cases
- Updated benchmark results
- Fixed #95:
helpers.make_wifi
andhelpers.make_wifi_data
may return invalid data if any input contains characters which can be interpreted as an integer. - Updated
helpers.make_wifi
andhelpers.make_wifi_data
signature and doc strings to match the stub / type hints.
- Not released due to twine issues (markup errors in README.rst)
- Fixed: Stub files (type hints) were missing from the source distribution.
- Fixed #84:
CLI
--encoding
was used for the encoding of SVG documents and not for the encoding of the QR code. Added--svgencoding
to specify the encoding of SVG documents.
- Improved API docs
- Added support for type hints for the public API (stub files)
- Added
QRCode.svg_inline
method which returns a string which can be used to embed the SVG directly in HTML pages. - Improved documentation <https://segno.readthedocs.org/>
- Improved code quality
- Switched from tox to nox
- Utilize flake8
- Moved metadata from setup.py to setup.cfg
- Support for Hanzi mode, implemented by Shi Yan
- Fixed #81: Wrong character count in Kanji mode if the user provided the QR code data as bytes.
- Improved documentation <https://segno.readthedocs.org/>
- Improved API docs
- Fixed error in Kanji encoding: Data was incomplete. Again, discovered by Shi Yan
- Better test coverage for Kanji encoding
- Fixed wrong information about character count in Kanji mode (discovered and fixed by Shi Yan)
- Fixed #72:
Encodings for
helpers.make_epc_qr
may be specified by name or by a numeric constant. - Added support for Netpbm PPM images.
- Documentation improvements (also thanks to James Addison for pr #73)
- Removed "version" parameter from
encoder.prepare_data
(does not belong to the public API anyway)
- Removed support for
color
/background
keywords (deprecated in 0.4.0). Usedark
andlight
. - Reintroduced
segno.DataOverflowError
(inherited fromValueError
) to indicate that the provided data does not fit into the provided (Micro) QR Code parameters. - Documentation improvements
- Although this lib made backwards incompatible changes since version 0.1.0, the changes should be clear since almost all changes were made very conservative with backwards compatibility in mind. Even early adopters should find a clear update path. This version marks a stable API acc. to Semantic Versioning.
- The initial stable release after nearly four years of development. Happy valentine ;)
- Removed deprecated functions, modules etc. See #56, #57, #59, #61, #67.
- Deprecated usage of keywords "color" and "background". Replacements: "dark" and "light". See #60. The deprecated keywords will be removed in 1.0.0.
- Minor performance improvements for writing SVG (at least for Py 3.7, YMMV).
- Documentation improvements
- Fixed #71: Dark / light
modules of the finder pattern may be interpreted wrong if set to
None
- Removed segno.encoder, segno.writers and segno.utils from public API (fixes #69)
- Removed segno.colors (part of segno.writers now)
- Documentation improvements
- Added support for multiple (more than two) colors to SVG (fixes #64)
- Fixed several test cases
- Removed
QRCodeError
and all derived exceptions from public API (still available but not thrown and they will be removed in 0.4.0) - Documentation improvements
- Documentation improvements: Added several examples, fixed docs
- Fixed #62: PNG serializer adds only those colors to the PLTE which are actually needed for the given (Micro) QR Code.
- Minor performance improvements
Backwards incompatibility change: QRCode.show() uses "dark" instead of "color" and "light" instead of "background" to define the color of the dark / light modules
Backwards incompatibility change: All
segno.writers
use "dark" instead of "color" and "light" instead of "background". This does not affect normal users, but only users of the low level API.Changed the keyword for setting the color of the dark modules from "color" to "dark" and for setting the light modules from "background" to "light" The former keywords are still supported. Their usage will issue a DeprecationWarning in the future.
Added
--dark
and--light
to the command line interface, see point above.`--color`
and--background
are still supported.Fixed typos, improved documentation
Deprecated
segno.moduletypes
(will be removed in release 0.4.0), moved all constants tosegno.consts
Deprecated usage of parameter "colormap" (introduced in 0.3.4). It still works but a deprecation warning is issued. Instead of:
colormap = {mt.TYPE_FINDER_PATTERN_DARK: 'darkred', mt.TYPE_ALIGNMENT_PATTERN_DARK: 'darkred', mt.TYPE_TIMING_DARK: 'darkred', mt.TYPE_DARKMODULE: 'darkred', mt.TYPE_DATA_DARK: 'darkorange', mt.TYPE_DATA_LIGHT: 'yellow', mt.TYPE_FORMAT_DARK: 'darkred'} qr.save('qrcode.png', scale=5, colormap=colormap)
use:
qr.save('qrcode.png', scale=5, dark='darkred', data_dark='darkorange', data_light='yellow')
See Colorful QR Codes for a description of available module names.
- Added support for colorful (more than two colors) QR Codes to the CLI script (fixes #58).
- Fixed Read the Docs build
- Improved documentation
- Minor performance and code improvements.
- Fixed issue #54: After last change (see 0.3.3), white background with transparent QR Code did not work. Enhanced test suite to cover all possible inputs for PNG grayscale mode
- Removed interpretation of
addad
from PNG serializer. Contradicts the claim to create small images by default. It still belongs to the function signature but will be removed in release 0.4.0 - The option
--no-ad
(CLI) is still available but ignored and will be removed in release 0.4.0. Removed the option from man page. - Added option to PNG serializer to provide more than two colors. Each module type may have its own color.
- Added support for EPC QR Codes.
- Fixed bug in
helpers.make_vcard_data
function (the "source" URL was not used, but the usual URL was added to the SOURCE field) - Better test coverage for the
segno.helpers
module
- Fixed issue #54: PNGs with white color and transparent background were rendered as transparent PNG with a black QR Code.
- Removed test environments CPython 3.4 and 3.6 from tox
- Improved documentation
- Refactored source code
- Added test cases
- Fixed bugs in
helpers.make_vcard_data
function (superfluous semicolon in birthday line, check geo coordinates) - Renamed
utils.matrix_iter_detail
intoutils.matrix_iter_verbose
. Keptmatrix_iter_detail
for backwards compatibility (deprecated, will be removed in release 0.4.0) - Moved module constants from
segno.utils
intosegno.moduletypes
, Constants fromsegno.utils
will be removed in release 0.4.0. - Added option
verbose
(default:False
) tosegno.QRCode.matrix_iter()
which returns an iterator which provides information about the module type (i.e. quiet zone, dark data module, light data module).
- Performance improvements
- Added man page for the CLI (fixes #41)
- Added more documentation and examples
- Fixed missing charts of <https://segno.readthedocs.io/en/stable/comparison-qrcode-libs.html>
- Added PyQRCodeNG <https://pypi.org/project/PyQRCodeNG/> to comparison table
- Updated CSS for a better layout of tables with a lot of content
- Removed deprecated functions
encoder.score_n1
,encoder.score_n2
,encoder.score_n3
, andencoder.score_n4
(they didn't belong to the public API anyway) - Fixed Read the Docs build
- See 0.3.2
- Performance improvements (evaluation of mask scores)
- Faster PNG output
- Faster
utils.matrix_iter
(which improves several writers, i.e. PNG) - Deprecation of
encoder.score_n1
,encoder.score_n2
,encoder.score_n3
, andencoder.score_n4
. Useencoder.mask_scores
orencoder.evaluate_mask
.
- Fixed typos
- PDF serializer: Added support for stroke and background color, initial code contributed by Serge Morel (pr #52).
- Fixed #45:
CLI does not raise exceptions but indicates errors with return code 1 and
writes the error message to
sys.stderr
- Added experimental
utils.matrix_iter_detail()
function which returns an iterator over the matrix to distinguish different dark and light modules by their function (i.e. separator, finder pattern etc.) - Minor performance improvements
- Removed Python 2.6 from test environment
- Added support for vCard TITLE attribute, contributed by Stefano Borini (pr #48)
- Added support for vCard PHOTO URI attribute, suggested by Arthur Reinhart
- Fixed dist package
- Updated and fixed docs
- Added PyPy 3 to test environment
- Added experimental support for Structured Append (divide content into max. 16 QR Code symbols)
- Internal refactoring (i.e. segno/scripts/cmd.py -> segno/cli.py)
- Added
-s
shortcut to Segno's command line interface to provide the scaling factor - Added
-b
shortcut to Segno's command line interface to provide the border / quiet zone - CLI accepts unquoted, whitespace separated content:
segno "Comfortably Numb"
can be written assegno Comfortably Numb
- Fixed #33: Some Micro QR Codes may be unreadable due to wrong format information. Further, M1 and M3 codes may be wrong due to wrong encoding of final data symbol character (8 bits instead of (correct) 4 bits). Thanks to Nicolas Boullis for the bug report, initial fix, tests and patience.
- Fixed #34: Change default error level from "M" to "L" to avoid surprises that the content does not fit into the provided version. This change is somewhat backwards incompatible.
- Fixed #35: Check of user supplied mask pattern index was wrong.
- Fixed #36: Wrong placement of codeword in M1 and M3 symbols.
- Fixed #37: Generation of M1 / M3 symbols fail if the data modules are completely filled.
- Fixed #38: Optimized mask pattern choosing algorithm: If the user supplied a preferred mask, the mask evaluation step is skipped and the preferred mask is chosen
- Added more internal checks to ensure correct (Micro) QR Codes; provided helpful exceptions
- Removed
writers.get_writable
(replaced bywriters.writable
) - Added support for serializing QR Codes as XBM (X BitMap) (supports black / white images)
- Added support for serializing QR Codes as XPM (X PixMap) (supports colors and transparency)
- Added support for encoding contact information as vCard version 3.0
(
segno.helpers
) - Added -V shortcut to Segno's command line script to show version information
- Better test coverage for command line script
- Better test coverage for M1 and M3 symbols
- Fixed #27: Email URI is wrong if CC or BCC is used.
- Fixed #32: Don't add version attribute if SVG >= 2.0
- Deprecated
writers.get_writable
; usewriters.writable
writers.writable
closes file-like objects automatically (if necessary); replacewritable, must_close = writers.get_writable(filename_or_buffer, mode)
withwith writers.writable(filename_or_buffer, mode) as f
- Added option to PNG serializer to specify an optional DPI value (thanks to Markus Ueberall for support)
- Added PAM (Portable Arbitrary Map) as serialization format (supports colors and transparency)
- Command line script reports Segno's version (
--ver
) and the version is also mentioned in the help message (-h
) (#24) - Support for creating email addresses or complete messages (
segno.helpers
) - Internal optimizations and more correct minimal version finding (#26)
- Fixed Python packaging (source distribution did not work), again
- Fixed Python packaging
- Added "color" parameter to the LaTeX serializer to define the color of the dark modules.
- Fixed serious issue #23: Segno creates invalid QR Codes if boost_error is not disabled (enabled by default)
- Removed
utils.matrix_with_border_iter
- Fixed #21 (type error while writing to terminal under Windows)
- Added option to serialize QR Codes as LaTeX vector graphic
- Added module
segno.helpers
which provides additional factory functions to create common QR Codes like a WIFI configuration, a geo location or MeCard
- Changed API: Added a feature to increase the error correction level
if it fits. Disable this feature via
boost_error=False
(#16) - Added
--no-error-boost
to the command line script to disable error correction level incrementation (#17) - Command line script: Internal changes and better test coverage
- Added tests for issue #18
- Added PBM (P1 and P4) serialization.
- Deprecated
utils.matrix_with_border_iter
, useutils.matrix_iter
utils.matrix_with_border_iter
will be removed in the next release- API change:
QRCode.matrix_iter(border)
->QRCode.matrix_iter(scale=1, border=None)
- Fixed setup
- Added QRCode.matrix_iter(border) which returns an iterator over the matrix and includes the border (as light modules).
- Invalid (empty) SVG identifiers / class names are ignored and do not result into an invalid SVG document (issue #8).
- SVG serializer: If
unit
was set toNone
, an invalid SVG document was generated (issue #14). - Better command line support:
- The command line script recognizes all SVG options (#9)
- Added
--mode
/-m
, renamed--mask
/-m
to--pattern
/-p
(issue #10) - The script used an empty string as default value for the data to encode. The data to encode has no default value anymore (issue #11)
- Added
--no-ad
to omit the commentSoftware
in PNG images (issue #12)
- Better terminal output
- Fixed issue #5: QRCode.terminal() uses a special output function (if it detects Windows) to support MS Windows which may not support ANSI escape codes.
- Added command line script "segno"
- Registered new file extension "ans" which serializes the QR Code as ANSI escape code (same output as QRCode.terminal())
- Removed deprecated methods "eps", "svg", "png", "pdf", and "txt" from segno.QRCode
- Switched from nose tests to py.test
- Updated docs
- Backward incompatible changes: Deprecated "eps", "svg", "png", "pdf", and "txt" methods from QRCode. Use QRCode.save. Methods will be removed in 0.1.3
- Fixed issue #3 (M1 and M3 codes may have undefined areas)
- Fixed issue #4 (wrong 'error' default value for encoder.encode(), factory function segno.make() wasn't affected)
- Initial release