Skip to content

Commit 1efc0f0

Browse files
authored
Merge pull request #1993 from Textualize/ansi-to-win32
Conversion of Segments to Windows Console API calls on legacy Windows platform
2 parents 27c2ba6 + 91e0146 commit 1efc0f0

13 files changed

+1390
-53
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.pytype
33
.DS_Store
44
.vscode
5+
.idea/
56
mypy_report
67
docs/build
78
docs/source/_build

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
- Added ProgressColumn `MofNCompleteColumn` to display raw `completed/total` column (similar to DownloadColumn,
1616
but displays values as ints, does not convert to floats or add bit/bytes units).
1717
https://github.com/Textualize/rich/pull/1941
18+
- Remove Colorama dependency, call Windows Console API from Rich https://github.com/Textualize/rich/pull/1993
1819
- Add support for namedtuples to `Pretty` https://github.com/Textualize/rich/pull/2031
1920

2021
### Fixed

mypy.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,5 @@ ignore_missing_imports = True
99
[mypy-commonmark.*]
1010
ignore_missing_imports = True
1111

12-
[mypy-colorama.*]
13-
ignore_missing_imports = True
14-
1512
[mypy-ipywidgets.*]
1613
ignore_missing_imports = True

poetry.lock

Lines changed: 55 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ typing-extensions = { version = ">=3.7.4, <5.0", python = "<3.8" }
3131
dataclasses = { version = ">=0.7,<0.9", python = "<3.7" }
3232
pygments = "^2.6.0"
3333
commonmark = "^0.9.0"
34-
colorama = "^0.4.0"
3534
ipywidgets = { version = "^7.5.1", optional = true }
3635

3736

rich/__main__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,7 @@ def iter_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
226226
console.print(test_card)
227227
taken = round((process_time() - start) * 1000.0, 1)
228228

229-
text = console.file.getvalue()
230-
# https://bugs.python.org/issue37871
231-
for line in text.splitlines(True):
232-
print(line, end="")
229+
Console().print(test_card)
233230

234231
print(f"rendered in {pre_cache_taken}ms (cold cache)")
235232
print(f"rendered in {taken}ms (warm cache)")

0 commit comments

Comments
 (0)