Blessed

Latest version: v1.20.0

Safety actively analyzes 621064 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

1.20

* introduced :meth:`~Terminal.get_fgcolor` and :meth:`~Terminal.get_bgcolor` to query
the terminal for the currently set colors. :ghissue:`237` by :ghuser:`stefanholek`
* bugfix: Copy globals dict before iterating to avoid RuntimeError in multithreaded
applications, :ghissue:`248` by :ghuser:`adamnovak`

1.19

* introduced :meth:`~Terminal.truncate` to truncate a string while
retaining the sequences, :ghissue:`211` by :ghuser:`fishermans-friend`
* enhancement: Add small sleep in :meth:`~Terminal.kbhit` on Windows
to reduce CPU load :ghissue:`209` by :ghuser:`numerlor`
* enhancement: :meth:`~Terminal.rjust`, :meth:`~Terminal.ljust`,
and :meth:`~Terminal.center` now accept :class:`~typing.SupportsIndex` types, :ghissue:`234`
* enhancement: When 88 colors is detected, it is now interpreted as 16 colors rather than raising
an :exc:`AssertionError`, :ghissue:`235`
* bugfix: Fix global variable declarations in type annotations, :ghissue:`230` by
:ghuser:`mwchase`

1.18

* bugfix: :meth:`~Terminal.split_seqs` for some sequences
like ``term.move_left(3)``, :ghissue:`197`.
* introduced: type annotations, :ghissue:`192` by :ghuser:`dlax`.
* bugfix: do not fail when ``sys.stdin`` is unset, :ghissue:`195` by
:ghuser:`Olen`
* docfix: correct "Bottom of the screen" example to use ``end=''`` and
document about it in location.rst, :ghissue:`188` by :ghuser:`pyfisch`

1.17

* introduced: :ref:`hyperlinks`, method :meth:`~Terminal.link`, :ghissue:`116`.
* introduced: 24-bit color support, detected by ``term.number_of_colors == 1 << 24``, and 24-bit
color foreground method :meth:`~Terminal.color_rgb` and background method
:meth:`~Terminal.on_color_rgb`, as well as 676 common X11 color attribute names are now
possible, such as ``term.aquamarine_on_wheat``, :ghissue:`60`.
* introduced: ``term.move_xy``, recommended over built-in ``move`` capability, as the
argument order, ``(x, y)`` matches the return value of :meth:`~.Terminal.get_location`, and all
other common graphics library calls, :ghissue:`65`.
* introduced: :meth:`~.Terminal.move_up`, :meth:`~Terminal.move_down`, :meth:`Terminal.move_left`,
:meth:`~Terminal.move_right` which are strings that move the cursor one cell in the respective
direction, are now **also** callables for moving *n* cells to the given direction, such as
``term.move_right(9)``.
* introduced: :attr:`~Terminal.pixel_width` and :attr:`~Terminal.pixel_height` for libsixel
support or general curiosity.
* introduced: :meth:`~.Terminal.formatter` which returns callable formatters for valid text
formatters such as 'red' or 'bold_on_red', returning a
:class:`~blessed.formatters.NullCallableString` if passed an invalid text formatter.
* bugfix: prevent ``ValueError: I/O operation on closed file`` on ``sys.stdin`` in multiprocessing
environments, where the keyboard wouldn't work, anyway.
* bugfix: prevent error condition, ``ValueError: underlying buffer has been detached`` in rare
conditions where sys.__stdout__ has been detached in test frameworks. :ghissue:`126`.
* bugfix: off-by-one error in :meth:`~.Terminal.get_location`, now accounts for ``%i`` in
cursor_report, :ghissue:`94`.
* bugfix :meth:`~Terminal.split_seqs` and related functions failed to match when the color index
was greater than 15, :ghissue:`101`.
* bugfix: Context Managers, :meth:`~.Terminal.fullscreen`, :meth:`~.Terminal.hidden_cursor`, and
:meth:`~Terminal.keypad` now flush the stream after writing their sequences.
* bugfix: ``chr(127)``, ``\x7f`` has changed from keycode ``term.DELETE`` to the more common
match, ``term.BACKSPACE``, :ghissue:`115` by :ghuser:`jwezel`.
* bugfix: ensure :class:`~.FormattingOtherString` may be pickled.
* bugfix: Use ``UTF-8`` for keyboard if input encoding cannot be determined.
* deprecated: the curses ``move()`` capability is no longer recommended, suggest to use
:meth:`~.Terminal.move_xy()`, which matches the return value of :meth:`~.Terminal.get_location`.
* deprecated: ``superscript``, ``subscript``, ``shadow``, and ``dim`` are no longer "compoundable"
with colors, such as in phrase ``Terminal.blue_subscript('a')``. These attributes are not
typically supported, anyway. Use Unicode text or 256 or 24-bit color codes instead.
* deprecated: additional key names, such as ``KEY_TAB``, are no longer "injected" into the curses
module namespace.
* bugfix: briefly tried calling :func:`curses.setupterm` with :attr:`os.devnull` as the file
descriptor, reverted. :ghissue:`59`.
* deprecated: :meth:`~Terminal.inkey` no longer raises RuntimeError when :attr:`~Terminal.stream`
is not a terminal, programs using :meth:`~Terminal.inkey` to block indefinitely if a keyboard is
not attached. :ghissue:`69`.
* deprecated: using argument ``_intr_continue`` to method :meth:`~Terminal.kbhit`, behavior is as
though such value is always True since 1.9.
* bugfix: Now imports on 3.10+
* bugfix: Fix detection of shift+arrow keys when using tmux. :ghissue:`178`.
* enhancement: Instantiate SequenceTextWrapper only once in
:meth:`~.Terminal.wrap`. :ghissue:`184`.

1.16

* introduced: Windows support?! :ghpull:`110` by :ghuser:`avylove`.

1.15

* enhancement: disable timing integration tests for keyboard routines.
* enhancement: Support python 3.7. :ghpull:`102`.
* enhancement: Various fixes to test automation :ghpull:`108`

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.