Skip to content

Feature: support windows-curses for curses under windows #692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 9, 2023

Conversation

penguinolog
Copy link
Collaborator

@penguinolog penguinolog commented Dec 8, 2023

  • Add curses optional dependencies group
  • Default windows-curses require UTF-8 encoding to work

Due to issue #690 not adding windows instructions to the manual

Fix #447

Successfully tested under windows 11 with enforced UTF-8 encoding:

import urwid

urwid.set_encoding("utf-8")
Checklist
  • I've ensured that similar functionality has not already been implemented
  • I've ensured that similar functionality has not earlier been proposed and declined
  • I've branched off the master or python-dual-support branch
  • I've merged fresh upstream into my branch recently
  • I've ran tox successfully in local environment
  • I've included docstrings and/or documentation and/or examples for my code (if this is a new feature)

* Add `curses` optional dependencies group
* Default windows-curses require UTF-8 encoding to work

Due to issue urwid#690 not adding windows instructions to the manual
---------------------------------------------------------------
@penguinolog penguinolog added Feature Feature request/implementation Unicode Issues related to Unicode <-> bytes conversion Major Not breaking major changes Windows Windows support labels Dec 8, 2023
@penguinolog penguinolog requested review from wardi and ulidtko December 8, 2023 16:49
@@ -429,6 +432,10 @@ def read_cursor_position(self, keys, more_available: bool):
360: "end",
}

if IS_WINDOWS:
_keyconv[351] = "shift tab"
_keyconv[358] = "end"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me

@unittest.skipIf(IS_WINDOWS, "Windows is temporary not supported by TornadoEventLoop.")
@unittest.skipIf(
IS_WINDOWS,
"Windows is temporary not supported by TornadoEventLoop due to race conditions.",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stable enough, maybe reason to enable some atomic tests before issue will be fully fixed

@coveralls
Copy link

coveralls commented Dec 8, 2023

Pull Request Test Coverage Report for Build 7144233062

  • 6 of 20 (30.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.2%) to 70.375%

Changes Missing Coverage Covered Lines Changed/Added Lines %
urwid/curses_display.py 4 18 22.22%
Totals Coverage Status
Change from base Build 7142707428: -2.2%
Covered Lines: 7571
Relevant Lines: 10829

💛 - Coveralls

@penguinolog penguinolog merged commit db62c81 into urwid:master Dec 9, 2023
@penguinolog penguinolog deleted the windows_curses branch December 9, 2023 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature request/implementation Major Not breaking major changes Unicode Issues related to Unicode <-> bytes conversion Windows Windows support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

partial native Windows support via windows-curses
2 participants