| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix TextCanvas `CanvasError("Attribute extends beyond text...")
* `[[]] * ...` causes
list of 1 list with pointers
amount equal to multiplier
instead of "list of lists"
* Add 2 basic font tests which check for Canvas create issue
* Add few type annotations during debug process
Fix: #554
* Force tests to restore default encoding in tearDown
Tests order change should not cause tests failures
---------
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
| |
Fix #552
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Revert "Allow to pass parameters when open pop_up (#480)"
This reverts commit 55b6a920
Fix #480
* Update gitignore: reverted PR contained MacOS specific files not intended to present in repo
---------
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Return original code to the deprecated getters and setters
* Make more aggressive deprecation warning
Fix: #548
* Return original code to the deprecated getters and setters
* Make more aggressive deprecation warning
Fix: #548
---------
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix incorrect type cast in vterm (`apply_mapping` should return `bytes`)
Add `time.sleep(0.1)` to the event loop tests:
in the worst scenario on windows and slow machine
function in parallel thread/async can wait up to 80 milliseconds (tested)
Add type annotations to the `vterm` and `test_vterm` to simplify error lookup.
* Fix `DeprecationWarning` in doctests & examples
* Add `pytest` configuration in `pyproject.toml` without migration
* `Signals.emit()` rework: stop `user_args` join with `weak_args`
Partial: #544
Partial: #512
Partial: #406
* drop `sleep`: not enough effective with pytest
* set timer for errors raise to 0: faster raise, faster test done
---------
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`line_width - 1` (#543)
* Fix text layout for `align="center", wrap="clip"`
- Fix: Prevent zero run length in text layout.
Refs: urwid#542
* Add test for "clip" text layout fix
Refs: #542
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#541)
* [BREAKING CHANGE] Fix: #90 Remove idle emulation from asyncio event loop
Re-implement abandoned PR #418
* Fix "not hashable `AttrSpec`" and it's instance creation price (use `__slots__`)
`AttrSpec` instances may be created in huge amount,
with slots this process consume less resources.
* `Terminal` is always created with event loop,
if not provided -> `SelectEventLoop` is used
* Fixed `TornadoEventLoop` & `AsyncioEventLoop` logic
(Tornado IOLoop is asyncio based)
For extra details see original PR.
* Make `AttrSpec` immutable and hash-reusable
* Update IDLE callback comment
* Update urwid/display_common.py
Co-authored-by: Ian Ward <ian@excess.org>
---------
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
Co-authored-by: Ian Ward <ian@excess.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add type annotations and optimize `urwid.font`
* optimize `separate_glyphs`: do not mutate `gl`, less temporary variables
* add `__repr__` and human-friendly exception reraise on render
* add type annotations to satisfy mypy
Partial: #406
* Add FontRegistry metaclass and use self-registration for fonts.
---------
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Deprecate `__super` hack
`super()` should be called explicit
* Update urwid/util.py
Co-authored-by: Ian Ward <ian@excess.org>
---------
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
Co-authored-by: Ian Ward <ian@excess.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [BREAKING CHANGE] Refactoring: Split event loop in several modules
* `urwid.main_loop` is split into multiple modules which is easier to maintain
* `urwid.compat` is not used anymore and removed
* `TornadoEventLoop`, `GLibEventLoop`, `TwistedEventLoop` and `TrioEventLoop`
accessible ONLY if required dependencies installed
(like: Tornado installed -> `TornadoEventLoop` is accessible for import)
* `TornadoEventLoop` use the same idle logic as `AsyncioLoop`:
tornado.ioloop.IOLoop is asyncio based.
* Trio < 0.15 is not supported. Version 0.15 was released almost 3 years ago.
* Tornado < 5.0 is not supported. Tornado 5.0 was released 5 years ago.
* Remove useless shebang
* `EventLoop` should be real abstract
* add new module docstrings
* Fix docstrings
* remove unneeded import
---------
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
|
| |
The DEC_TAG cs type should not be escaped when a lone SO is found
and should be used in the same way as when both SO and S1 are
present.
Fixes #322
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add digits for new mosaic font
* Patch get_width
* Change from 5x8 to 5x7 matrix
* Give the fonts a better name, add a small numbers font
* Add uppercase to larger sextant font
* Fix odd breakage
---------
Co-authored-by: Ricardo Bánffy <ricardo.banffy@workday.com>
|
| |
|
|
|
|
|
| |
* not switching to Unicode-only at this moment, so make simple
Fix #408
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
| |
`focus` in constructor (#535)
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
|
|
| |
* If body is not `Sized` - `__len__` call should raise `AttributeError`
* Downside: since body can be replaced, `__len__` is always set ant `ListBox` by itself will pass `Sized` instance check
* Relax `SimpleListWalker` constructor rules: any Iterable is allowed as source due to `list` is used internally
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Deprecate legacy property creation
* Drop long time ago removed methods (never returning methods)
* Move large part of property implementations under `@property`
* Emit `PendingDeprecationWarning`
for old compatibility code
for public methods used as core for property and methods for compatibility
* Emit `DeprecationWarning`
for private methods used in property construction
using `property()` call
Due to amount of copy-paste like changes, for containers shared part is moved to the existing base classes
Add `__len__` to the list based containers. Related #445
Fix typo in type annotation for `Frame.mouse_event`
* Update urwid/canvas.py
Co-authored-by: Ian Ward <ian@excess.org>
* Update urwid/canvas.py
Co-authored-by: Ian Ward <ian@excess.org>
* Update urwid/tests/test_container.py
Co-authored-by: Ian Ward <ian@excess.org>
* Fix typo in test name
* Frame `header`, `body` and `footer` also has property and methods from pre-property era
Make consistent with other containers
---------
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
Co-authored-by: Ian Ward <ian@excess.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* add basic mypy config for better tracking
(now crazy amount of warnings without `strict`)
* Useless check in `raw_display` (`if not Popen` will be always `False`)
* use explicit `return None`
Partial: #406
Related: #512
Related: #408
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
| |
fix #525
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
* keypress always receive `str`
* fix `CF635Screen`: was missed return parameter in get_input_nonblocking
* fix `LCDScreen`: wrong type used for buffer (pyserial return `bytes`, concatenation to `str` is wrong)
Partial #406
Partial #512
Related #408
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
checking (#529)
* Use `super()` where possible instead of direct base class
Related #525
Partial #406
Fix #510
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix #479 (#528)
* Handle impossibility to set locale in tests
(docker container scenario)
* `detect_encoding` start from non-destructive behavior
(do not change locale)
and restore exact locale in destructive
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
| |
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
| |
* Sunset of travis: non-commercial travis is closed
* Use PEP517 driven build
* stop calling tests deprecated way (via setup.py)
* Update readme to allow removing of magic (badges maybe included in package)
* Temporary do not display coverage: coveralls require reconfiguration
* Remove unsupported python mention in readme
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
|
|
| |
Not all terminals will necessarily respond to the TIOCGWINSZ ioctl,
particularly much older ones providing vt100 or ansi terminals, which
will have a fixed 80x24 size. If they respond with some kind of
non-sensical value here, then at least give the ansi and vt100 terminals
their default so they can draw.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Initial migration to the python 3.7: Semi-automatic changes
CI related:
Update `tox.ini` and `.travis.yml` to run python3 only tests
Python 3.11 tests is commented-out on travis until #517 is not merged
Manual changes:
* `setup.py`: classifiers, remove python2 compatibility code
* `docs/manual/wcur2.py`: looks like file was never completed, syntax is invalid
* `urwid.compat`: removed `ord2`, `bytes3`, `text_type`, `xrange` and `text_types`
Automatic changes (no manual editing, AST validated equality:
* removed `u` prefix from all strings: not allowed in modern python code
* `bytes()` -> `b''`
* `== None` -> `is None`
* subclassing of `object`
* `super(<Class>`, self>)` ->`super()`
* `from __future__ import ...` python3 compatibility imports
* `set(<Iterable[Hashable]>)` -> `{<Hashable>}`
* partial f-strings conversion
* (`IOError`, `select.error`, `socket.error`) -> `OSError`
* Switch to f-strings (automatic changes)
* Remove `urwid.compat.B`
* Remove `urwid.compat.with_metaclass`
* use native `super()` instead of `self.__super`
* Remove `urwid.compat.chr2`
* Remove `urwid.split_repr.python3_repr`
* Use native `@classmethod` and `@property` where overload is not possible
* Add `from __future__ import annotations`
* automatically sort imports
* Add DeprecationWarning to the deprecated methods
most IDE's will recognize it and annotate during new code usage
call with "warnings as errors" mode will help to refactor other users
* Address comments
* replace homepage address in all files
* remove outdated comments in compat.py
* make wcur2.py correct python code. For example subclass
* replace `self.__super` by `super()` in examples
* fix asyncio_socket_server.py: magic with `asyncio` became wrong
* Remove `widget.update_wrapper`: this was backport of python `functools.update_wrapper`
* display_common.py: fix trivial typo in _colors calculation
* use `sorted` method instead of list construction with later sorting
* Address comments
* `wcur2` include in docs
* warning on `signals.Signals.emit`
---------
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
|
|
| |
Ensure that the cached canvas is marked invalidated when a newly set ListBox.body is modified at runtime.
Fixes #428
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* asyncio coroutine was not awaited, so test was false-positive (poor visible on Travis CI)
Fix test.
* FloatEdit unittests passed, incorrect output doctests not caused exception on CI
* warnings on version number
* warnings about deprecated setup.py usage for tests run
* python2.7 is not able to execute tests for asyncio due to mandatory syntax changes (async def).
Fix logic:
1. added `isinstance` check before getting significance
2. Fix FloatEdit and add corner case tests
3. normalize version number
4. execute tests via `unittest`
5. stop using python 2.7 in tests run instead of increasing complexity
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
|
| |
|
| |
Resolves #499 - FloatEdit mangles decimals
|
| | |
|
| |
|
|
| |
(#453)
|
| |
|
|
|
| |
There is a small typo in urwid/numedit.py.
Should read `incompatible` rather than `incompatable`.
|
| |
|
|
|
|
|
| |
Previously, nested markup could lead to corrupted output if consecutive
elements from different lists shared the same attributes, due to the
deletion of the wrong element while merging attributes.
Fixes #303.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Drop python < 2.4 compat in apply_target_encoding()
* Drop compat about bytes for python < 2.6
Support for python 2.4 and 2.5 got dropped in version 1.2.0.
Also, these declarations confuse mypy.
---------
Co-authored-by: Maxim Ivanov <ulidtko@gmail.com>
|
| | |
|
| | |
|
| |
|
| |
squash and merge
|
| |
|
| |
squash and merge
|
| | |
|
| |\
| |
| | |
fix: use trio.lowlevel instead of trio.hazmat with Trio >= 0.15
|
| | | |
|
| |/
|
|
| |
a nursery arg any more
|
| | |
|
| | |
|
| |\
| |
| | |
Fix curses_display python3 ord()
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
tour.py works with py2 now
Typo in tour.py
|
| | | |
|
| |\ \
| | |
| | | |
Ignore resetting to invalid locale (Closes: #377)
|
| | |/
| |
| |
| |
| |
| |
| | |
Resetting the locale was introduced in 5dcf236, before that an invalid
locale was ignored. Restore the old behavior insofar that only valid
locales are restored.
This fixes the unit tests of scottkosty/vit with unset LANG.
|