Skip to content

curses-free jinxed 2.0 integration - #374

Merged
jquast merged 1 commit into
masterfrom
jq/jinxed-2.0
May 18, 2026
Merged

jquast merged 1 commit into
masterfrom
jq/jinxed-2.0

Conversation

@jquast

@jquast jquast commented May 14, 2026

Copy link
Copy Markdown
Owner

Replace all 'curses' imports with jinxed throughout blessed.

  • Remove _CUR_TERM singleton, add kind_fallback='xterm-256color'.
  • Removes many 'as_subprocess' test guards, incree test time
  • Refactor keyboard/formatters/win_terminal.
  • Stub XTGETTCAP probe (completed in coming branch)

@codspeed

codspeed Bot commented May 14, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 27.19%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

#### 🎉 Hooray! `pytest-codspeed` just leveled up to 5.0.2!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

⚡ 8 improved benchmarks
✅ 20 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ test_length_ansi 438.8 µs 365.8 µs +19.94%
⚡ test_strip_seqs_ansi 662.7 µs 384.6 µs +72.3%
⚡ test_length_ascii 45.3 µs 35.8 µs +26.53%
⚡ test_center_ansi 469.1 µs 368.7 µs +27.25%
⚡ test_truncate_ansi 24.3 ms 22 ms +10.41%
⚡ test_ljust_ansi 458.5 µs 363.6 µs +26.11%
⚡ test_wrap_ansi 11.2 ms 9.7 ms +15.92%
⚡ test_rjust_ansi 466.4 µs 365.8 µs +27.5%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing jq/jinxed-2.0 (bda31c5) with master (5c80f35)

Open in CodSpeed

@codecov

codecov Bot commented May 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.53052% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.51%. Comparing base (5c80f35) to head (bda31c5).
⚠️ Report is 24 commits behind head on master.

Files with missing lines Patch % Lines
blessed/terminal.py 99.39% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #374      +/-   ##
==========================================
+ Coverage   97.48%   97.51%   +0.03%     
==========================================
  Files          13       13              
  Lines        3691     3706      +15     
  Branches      647      646       -1     
==========================================
+ Hits         3598     3614      +16     
+ Misses         71       70       -1     
  Partials       22       22              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jquast
jquast force-pushed the jq/jinxed-2.0 branch 3 times, most recently from 035e6d6 to c579009 Compare May 15, 2026 01:55
@jquast

jquast commented May 15, 2026

Copy link
Copy Markdown
Owner Author

@codspeedbot most improvements come from jinxed 2.0's removal of time delay codes, like $<30> and the oft-repeated charset \x1b(B from jinxed, reduces our complexity and time of dynamically generated regular expressions.

@jquast
jquast force-pushed the jq/jinxed-2.0 branch 2 times, most recently from 9742d0e to c1bebc3 Compare May 15, 2026 02:06
@jquast jquast changed the title curses-free with jinxed 2.0 integration curses-free jinxed 2.0 integration May 15, 2026
Replace all curses imports with jinxed throughout blessed.
Remove _CUR_TERM singleton, add kind_fallback='xterm-256color'.
Remove many as_subprocess test guards. Refactor keyboard,
formatters, and win_terminal modules for jinxed compatibility.
Stub XTGETTCAP probe (completed in xtgettcap-improved branch).

Fix susimpleript -> ssubm internal capability typo.
Emit UserWarning for unknown terminal capability name lookups.
@jquast
jquast marked this pull request as ready for review May 15, 2026 03:07
@jquast
jquast merged commit 2c0576e into master May 18, 2026
15 checks passed
@jquast
jquast deleted the jq/jinxed-2.0 branch May 18, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant