diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 511c14bac..82ed05d43 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -5,19 +5,24 @@ on: pull_request: branches: [master] +env: + FORCE_COLOR: 1 + jobs: test-ubuntu: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Install Dependencies run: | sudo apt remove python3-pip diff --git a/setup.py b/setup.py index 61975989f..ca2170ce4 100755 --- a/setup.py +++ b/setup.py @@ -44,6 +44,8 @@ def get_version(package): "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python", "Topic :: Software Development", diff --git a/src/prompt_toolkit/application/application.py b/src/prompt_toolkit/application/application.py index 8683705bf..c6e67ab9f 100644 --- a/src/prompt_toolkit/application/application.py +++ b/src/prompt_toolkit/application/application.py @@ -1005,7 +1005,7 @@ def _enable_breakpointhook(self) -> Generator[None, None, None]: manager. (We will only install the hook if no other custom hook was set.) """ - if sys.version_info >= (3, 7) and sys.breakpointhook == sys.__breakpointhook__: + if sys.breakpointhook == sys.__breakpointhook__: sys.breakpointhook = self._breakpointhook try: diff --git a/src/prompt_toolkit/application/current.py b/src/prompt_toolkit/application/current.py index 736cb064f..908141a47 100644 --- a/src/prompt_toolkit/application/current.py +++ b/src/prompt_toolkit/application/current.py @@ -144,10 +144,8 @@ def create_app_session( Create a separate AppSession. This is useful if there can be multiple individual `AppSession`s going on. - Like in the case of an Telnet/SSH server. This functionality uses - contextvars and requires at least Python 3.7. + Like in the case of an Telnet/SSH server. """ - # If no input/output is specified, fall back to the current input/output, # whatever that is. if input is None: diff --git a/tests/test_cli.py b/tests/test_cli.py index 39aeedd45..3a16e9fbd 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -190,7 +190,7 @@ def test_emacs_cursor_movements(): def test_emacs_kill_multiple_words_and_paste(): # Using control-w twice should place both words on the clipboard. result, cli = _feed_cli_with_input( - "hello world test" "\x17\x17" "--\x19\x19\r" # Twice c-w. # Twice c-y. + "hello world test\x17\x17--\x19\x19\r" # Twice c-w. Twice c-y. ) assert result.text == "hello --world testworld test" assert cli.clipboard.get_data().text == "world test" diff --git a/tox.ini b/tox.ini index 016beedb9..310f0761e 100644 --- a/tox.ini +++ b/tox.ini @@ -4,10 +4,10 @@ # and then run "tox" from this directory. [tox] -envlist = py26, py27, py33, py34, py35, pypy, pypy3 +envlist = py{37, 38, 39, 310, 311, 312, py3} [testenv] -commands = py.test [] +commands = pytest [] deps= pytest