Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-prompt_toolkit for 
openSUSE:Factory checked in at 2024-01-05 22:58:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-prompt_toolkit (Old)
 and      /work/SRC/openSUSE:Factory/.python-prompt_toolkit.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-prompt_toolkit"

Fri Jan  5 22:58:32 2024 rev:25 rq:1135791 version:3.0.43

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-prompt_toolkit/python-prompt_toolkit.changes  
    2023-12-07 19:09:07.164412064 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-prompt_toolkit.new.28375/python-prompt_toolkit.changes
   2024-01-05 22:58:33.884023809 +0100
@@ -1,0 +2,12 @@
+Sat Dec 30 17:31:47 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 3.0.43:
+  * Fix regression on Pypy: Don't use `ctypes.pythonapi` to
+    restore SIGINT if not available.
+  * Make `formatted_text.split_lines()` accept an iterable
+    instead of lists only.
+  * Disable the IPython workaround (from 3.0.41) for IPython >=
+    8.18.
+  * Restore signal.SIGINT handler between prompts.
+
+-------------------------------------------------------------------

Old:
----
  prompt_toolkit-3.0.41.tar.gz

New:
----
  prompt_toolkit-3.0.43.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-prompt_toolkit.spec ++++++
--- /var/tmp/diff_new_pack.9kqJrF/_old  2024-01-05 22:58:34.456044768 +0100
+++ /var/tmp/diff_new_pack.9kqJrF/_new  2024-01-05 22:58:34.456044768 +0100
@@ -16,10 +16,9 @@
 #
 
 
-%define skip_python2 1
 %{?sle15_python_module_pythons}
 Name:           python-prompt_toolkit
-Version:        3.0.41
+Version:        3.0.43
 Release:        0
 Summary:        Library for building interactive command lines in Python
 License:        BSD-3-Clause

++++++ prompt_toolkit-3.0.41.tar.gz -> prompt_toolkit-3.0.43.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prompt_toolkit-3.0.41/CHANGELOG 
new/prompt_toolkit-3.0.43/CHANGELOG
--- old/prompt_toolkit-3.0.41/CHANGELOG 2023-11-13 22:42:15.000000000 +0100
+++ new/prompt_toolkit-3.0.43/CHANGELOG 2023-12-13 09:40:54.000000000 +0100
@@ -1,6 +1,24 @@
 CHANGELOG
 =========
 
+3.0.43: 2023-12-13
+------------------
+
+Fixes:
+- Fix regression on Pypy: Don't use `ctypes.pythonapi` to restore SIGINT if not
+  available.
+
+
+3.0.42: 2023-12-12
+------------------
+
+Fixes:
+- Fix line wrapping in `patch_stdout` on Windows.
+- Make `formatted_text.split_lines()` accept an iterable instead of lists only.
+- Disable the IPython workaround (from 3.0.41) for IPython >= 8.18.
+- Restore signal.SIGINT handler between prompts.
+
+
 3.0.41: 2023-11-14
 ------------------
 
@@ -369,7 +387,7 @@
 
 Fixes:
 - Fixed a race condition in `ThreadedHistory` that happens when continuously
-  pasting input text (which would continously repopulate the history).
+  pasting input text (which would continuously repopulate the history).
 - Move cursor key mode resetting (for vt100 terminals) to the renderer. (Mostly
   cleanup).
 
@@ -451,7 +469,7 @@
 
 Fixes:
 - Bugfix in shift-selection key bindings.
-- Fix hight calculation of `FormattedTextControl` when line wrapping is turned
+- Fix height calculation of `FormattedTextControl` when line wrapping is turned
   on.
 - Fixes for SSH server:
   * Missing encoding property.
@@ -471,7 +489,7 @@
   * The color depth logic has been refactored and moved to the `Output`
     implementations. Added `get_default_color_depth` method to `Output`
     objects.
-  * All line feets are now preceded by a carriage return in the telnet
+  * All line feet are now preceded by a carriage return in the telnet
     connection stdout.
 - Introduce `REPLACE_SINGLE` input mode for Vi key bindings.
 - Improvements to the checkbox implementation:
@@ -615,7 +633,7 @@
 Bug fixes:
 - Fixes the issue where changes made to the buffer in the accept handler were
   not reflected in the history.
-- Fix in the application invalidate handler. This prevents a significat slow
+- Fix in the application invalidate handler. This prevents a significant slow
   down in some applications after some time (especially if there is a refresh
   interval).
 - Make `print_container` utility work if the input is not a pty.
@@ -882,7 +900,7 @@
     of the content. `TokenListControl` (renamed to `FormattedTextControl`) does
     not have an alignment argument anymore.
   * All container objects, like `Window`, got a `style` argument. The style for
-    parent containers propagate to child containers, but can be overriden.
+    parent containers propagate to child containers, but can be overridden.
     This is in particular useful for setting a background color.
   * `FillControl` does not exist anymore. Use the `style` and `char` arguments
     of the `Window` class instead.
@@ -1141,7 +1159,7 @@
 
 New features:
 - Allow users to enter Vi digraphs in reverse order.
-- Improved autocompletion behaviour. See IPython issue #9658.
+- Improved autocompletion behavior. See IPython issue #9658.
 - Added a 'clear' function in the shortcuts module.
 
 For future compatibility:
@@ -1162,7 +1180,7 @@
 
 Fixes:
 - Bugfix for Python2 in readline-like completion.
-- Bugfix in readline-like completion visualisation.
+- Bugfix in readline-like completion visualization.
 
 New features:
 - Added `erase_when_done` parameter to the `Application` class.  (This was
@@ -1175,7 +1193,7 @@
 
 Fixes:
 - Don't select the first completion when `complete_while_typing` is False.
-  (Restore the old behaviour.)
+  (Restore the old behavior.)
 
 
 1.0.1: 2016-06-15
@@ -1327,7 +1345,7 @@
   the `vi_mode` parameter in `KeyBindingManager`.
 - The default accept_action for the default Buffer in Application now becomes
   IGNORE. This is a much more sensible default. Pass RETURN_DOCUMENT to get
-  the previous behaviour,
+  the previous behavior,
 - Always expect an EventLoop instance in CommandLineInterface. Creating it in
   __init__ caused a memory leak.
 
@@ -1344,8 +1362,8 @@
 - Correctly align right prompt to the top when the left prompt consists of
   multiple lines.
 - Correctly use Token.Transparent as default token for a TokenListControl.
-- Fix in syntax synchronisation. (Better handle the case when no
-  synchronisation point was found.)
+- Fix in syntax synchronization. (Better handle the case when no
+  synchronization point was found.)
 - Send SIGTSTP to the whole process group.
 - Correctly raise on_buffer_changed on all text changes.
 - Fix in regular_languages.GrammarLexer. (Fixes bug in ptipython syntax
@@ -1403,7 +1421,7 @@
   `create_prompt_layout`.
 - Some improvements to the default style.
 - Also handle Ctrl-R and Ctrl-S in Vi mode when searching.
-- Added TabsProcessor: a tool to visualise tabs instead of displaying ^I.
+- Added TabsProcessor: a tool to visualize tabs instead of displaying ^I.
 - Give a better error message when trying to run in git-bash.
 - Support for ANSI color names in style dictionaries.
 
@@ -1421,7 +1439,7 @@
     they process one line at a time.)
   - Lexers work differently. `Lexer.lex_document` should now return a function
     that returns the tokens for one line. PygmentsLexer has been optimized that
-    it becomes 'lazy', and it has optional syntax synchronisation. That means,
+    it becomes 'lazy', and it has optional syntax synchronization. That means,
     that the lexer doesn't have to start the lexing at the beginning of the
     document. (Which would be slow for big documents.)
 
@@ -1672,7 +1690,7 @@
 - Added `prompt_toolkit.layout.utils.iter_token_lines`.
 - Allow `None` values on the focus stack.
 - Buffers can be readonly. Added `IsReadOnly` filter.
-- `eager` behaviour for key bindings. When a key binding is eager it will be
+- `eager` behavior for key bindings. When a key binding is eager it will be
   executed as soon as it's matched, even when there is another binding that
   starts with this key sequence.
 - Custom margins for BufferControl.
@@ -1738,7 +1756,7 @@
 New features:
 - CompletionsMenu got a scroll_offset.
 - Use 256 colors and ANSI sequences when ConEmu ANSI support has been detected.
-- Added PyperclipClipboard for synchronisation with the system clipboard.
+- Added PyperclipClipboard for synchronization with the system clipboard.
   and clipboard parameter in shortcut functions.
 - Filter for enabling/disabling handling of Vi 'v' binding.
 
@@ -2033,7 +2051,7 @@
 - prompt_toolkit.contrib.shortcuts.get_input has been extended.
 
 Fixed:
-- Behaviour of Control+left/right/up/down.
+- Behavior of Control+left/right/up/down.
 - Backspace in incremental search.
 - Hide completion menu correctly when the cursor position changes.
 
@@ -2108,7 +2126,7 @@
 - Experimental Win32 support added.
 
 Fixed:
-- Behaviour of 'r' and 'R' key bindings in Vi mode.
+- Behavior of 'r' and 'R' key bindings in Vi mode.
 - Detect multiline correctly for ptpython when there are triple quoted strings.
 - Some other small improvements.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prompt_toolkit-3.0.41/PKG-INFO 
new/prompt_toolkit-3.0.43/PKG-INFO
--- old/prompt_toolkit-3.0.41/PKG-INFO  2023-11-13 22:47:29.143385400 +0100
+++ new/prompt_toolkit-3.0.43/PKG-INFO  2023-12-13 09:44:04.876232400 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: prompt_toolkit
-Version: 3.0.41
+Version: 3.0.43
 Summary: Library for building powerful interactive command lines in Python
 Home-page: https://github.com/prompt-toolkit/python-prompt-toolkit
 Author: Jonathan Slenders
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prompt_toolkit-3.0.41/PROJECTS.rst 
new/prompt_toolkit-3.0.43/PROJECTS.rst
--- old/prompt_toolkit-3.0.41/PROJECTS.rst      2022-09-02 10:53:41.000000000 
+0200
+++ new/prompt_toolkit-3.0.43/PROJECTS.rst      2023-11-16 22:47:58.000000000 
+0100
@@ -37,7 +37,7 @@
 - `athenacli <https://github.com/dbcli/athenacli>`_: A CLI for AWS Athena.
 - `vulcano <https://github.com/dgarana/vulcano>`_: A framework for creating 
command-line applications that also runs in REPL mode.
 - `kafka-shell <https://github.com/devshawn/kafka-shell>`_: A supercharged 
shell for Apache Kafka.
-- `starterTree <https://github.com/thomas10-10/starterTree>`_: A command 
launcher organised in a tree structure with fuzzy autocompletion 
+- `starterTree <https://github.com/thomas10-10/starterTree>`_: A command 
launcher organized in a tree structure with fuzzy autocompletion 
 - `git-delete-merged-branches 
<https://github.com/hartwork/git-delete-merged-branches>`_: Command-line tool 
to delete merged Git branches
 
 Full screen applications:
@@ -49,7 +49,7 @@
 - `kubeterminal <https://github.com/samisalkosuo/kubeterminal>`_: Kubectl 
helper tool.
 - `pydoro <https://github.com/JaDogg/pydoro>`_: Pomodoro timer.
 - `sanctuary-zero <https://github.com/t0xic0der/sanctuary-zero>`_: A secure 
chatroom with zero logging and total transience.
-- `Hummingbot <https://github.com/CoinAlpha/hummingbot>`_: A Cryptocurrency 
Algorithimic Trading Platform
+- `Hummingbot <https://github.com/CoinAlpha/hummingbot>`_: A Cryptocurrency 
Algorithmic Trading Platform
 - `git-bbb <https://github.com/MrMino/git-bbb>`_: A `git blame` browser.
 
 Libraries:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/examples/full-screen/split-screen.py 
new/prompt_toolkit-3.0.43/examples/full-screen/split-screen.py
--- old/prompt_toolkit-3.0.41/examples/full-screen/split-screen.py      
2023-11-03 16:37:20.000000000 +0100
+++ new/prompt_toolkit-3.0.43/examples/full-screen/split-screen.py      
2023-11-16 22:47:58.000000000 +0100
@@ -94,7 +94,7 @@
 # sure that we won't wait for that key binding to match, but instead execute
 # Ctrl-Q immediately, we can pass eager=True. (Don't make a habit of adding
 # `eager=True` to all key bindings, but do it when it conflicts with another
-# existing key binding, and you definitely want to override that behaviour.
+# existing key binding, and you definitely want to override that behavior.
 
 
 @kb.add("c-c", eager=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/examples/progress-bar/styled-rainbow.py 
new/prompt_toolkit-3.0.43/examples/progress-bar/styled-rainbow.py
--- old/prompt_toolkit-3.0.41/examples/progress-bar/styled-rainbow.py   
2022-09-01 17:02:15.000000000 +0200
+++ new/prompt_toolkit-3.0.43/examples/progress-bar/styled-rainbow.py   
2023-11-16 22:47:58.000000000 +0100
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 """
-A simple progress bar, visualised with rainbow colors (for fun).
+A simple progress bar, visualized with rainbow colors (for fun).
 """
 import time
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/examples/prompts/placeholder-text.py 
new/prompt_toolkit-3.0.43/examples/prompts/placeholder-text.py
--- old/prompt_toolkit-3.0.41/examples/prompts/placeholder-text.py      
2022-09-01 17:02:15.000000000 +0200
+++ new/prompt_toolkit-3.0.43/examples/prompts/placeholder-text.py      
2023-11-16 22:47:58.000000000 +0100
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 """
-Example of a placeholer that's displayed as long as no input is given.
+Example of a placeholder that's displayed as long as no input is given.
 """
 from prompt_toolkit import prompt
 from prompt_toolkit.formatted_text import HTML
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prompt_toolkit-3.0.41/pyproject.toml 
new/prompt_toolkit-3.0.43/pyproject.toml
--- old/prompt_toolkit-3.0.41/pyproject.toml    2023-11-13 15:21:59.000000000 
+0100
+++ new/prompt_toolkit-3.0.43/pyproject.toml    2023-11-16 22:47:58.000000000 
+0100
@@ -36,3 +36,31 @@
 [tool.ruff.isort]
 known-first-party = ["prompt_toolkit"]
 known-third-party = ["pygments", "asyncssh"]
+
+[tool.typos.default]
+extend-ignore-re = [
+    "Formicidae",
+    "Iterm",
+    "goes",
+    "iterm",
+    "prepend",
+    "prepended",
+    "prev",
+    "ret",
+    "rouble",
+    "x1b\\[4m",
+    # Deliberate spelling mistakes in autocorrection.py
+    "wolrd",
+    "impotr",
+    # Lorem ipsum.
+    "Nam",
+    "varius",
+]
+
+locale = 'en-us'  # US English.
+
+[tool.typos.files]
+extend-exclude = [
+    "tests/test_cli.py",
+    "tests/test_regular_languages.py",
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prompt_toolkit-3.0.41/src/prompt_toolkit/__init__.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/__init__.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/__init__.py    2023-11-13 
22:42:15.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/__init__.py    2023-12-13 
09:41:08.000000000 +0100
@@ -27,7 +27,7 @@
 from .shortcuts import PromptSession, print_formatted_text, prompt
 
 # Don't forget to update in `docs/conf.py`!
-__version__ = "3.0.41"
+__version__ = "3.0.43"
 
 assert pep440.match(__version__)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/application/application.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/application/application.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/application/application.py     
2023-11-13 22:42:15.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/application/application.py     
2023-12-13 09:39:39.000000000 +0100
@@ -807,16 +807,19 @@
         @contextmanager
         def set_handle_sigint(loop: AbstractEventLoop) -> Iterator[None]:
             if handle_sigint:
-                loop.add_signal_handler(
-                    signal.SIGINT,
-                    lambda *_: loop.call_soon_threadsafe(
-                        self.key_processor.send_sigint
-                    ),
-                )
-                try:
-                    yield
-                finally:
-                    loop.remove_signal_handler(signal.SIGINT)
+                with _restore_sigint_from_ctypes():
+                    # save sigint handlers (python and os level)
+                    # See: 
https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1576
+                    loop.add_signal_handler(
+                        signal.SIGINT,
+                        lambda *_: loop.call_soon_threadsafe(
+                            self.key_processor.send_sigint
+                        ),
+                    )
+                    try:
+                        yield
+                    finally:
+                        loop.remove_signal_handler(signal.SIGINT)
             else:
                 yield
 
@@ -960,7 +963,8 @@
         def _called_from_ipython() -> bool:
             try:
                 return (
-                    "IPython/terminal/interactiveshell.py"
+                    sys.modules["IPython"].version_info < (8, 18, 0, "")
+                    and "IPython/terminal/interactiveshell.py"
                     in sys._getframe(3).f_code.co_filename
                 )
             except BaseException:
@@ -1545,7 +1549,7 @@
 
 @contextmanager
 def attach_winch_signal_handler(
-    handler: Callable[[], None]
+    handler: Callable[[], None],
 ) -> Generator[None, None, None]:
     """
     Attach the given callback as a WINCH signal handler within the context
@@ -1586,3 +1590,36 @@
                 previous_winch_handler._callback,
                 *previous_winch_handler._args,
             )
+
+
+@contextmanager
+def _restore_sigint_from_ctypes() -> Generator[None, None, None]:
+    # The following functions are part of the stable ABI since python 3.2
+    # See: https://docs.python.org/3/c-api/sys.html#c.PyOS_getsig
+    # Inline import: these are not available on Pypy.
+    try:
+        from ctypes import c_int, c_void_p, pythonapi
+    except ImportError:
+        # Any of the above imports don't exist? Don't do anything here.
+        yield
+        return
+
+    # PyOS_sighandler_t PyOS_getsig(int i)
+    pythonapi.PyOS_getsig.restype = c_void_p
+    pythonapi.PyOS_getsig.argtypes = (c_int,)
+
+    # PyOS_sighandler_t PyOS_setsig(int i, PyOS_sighandler_t h)
+    pythonapi.PyOS_setsig.restype = c_void_p
+    pythonapi.PyOS_setsig.argtypes = (
+        c_int,
+        c_void_p,
+    )
+
+    sigint = signal.getsignal(signal.SIGINT)
+    sigint_os = pythonapi.PyOS_getsig(signal.SIGINT)
+
+    try:
+        yield
+    finally:
+        signal.signal(signal.SIGINT, sigint)
+        pythonapi.PyOS_setsig(signal.SIGINT, sigint_os)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prompt_toolkit-3.0.41/src/prompt_toolkit/buffer.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/buffer.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/buffer.py      2023-11-13 
15:21:59.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/buffer.py      2023-12-12 
23:57:17.000000000 +0100
@@ -15,7 +15,7 @@
 from collections import deque
 from enum import Enum
 from functools import wraps
-from typing import Any, Awaitable, Callable, Coroutine, Iterable, TypeVar, cast
+from typing import Any, Callable, Coroutine, Iterable, TypeVar, cast
 
 from .application.current import get_app
 from .application.run_in_terminal import run_in_terminal
@@ -1891,7 +1891,7 @@
                 self.reset()
 
 
-_T = TypeVar("_T", bound=Callable[..., Awaitable[None]])
+_T = TypeVar("_T", bound=Callable[..., Coroutine[Any, Any, None]])
 
 
 def _only_one_at_a_time(coroutine: _T) -> _T:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/contrib/regular_languages/__init__.py
 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/contrib/regular_languages/__init__.py
--- 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/contrib/regular_languages/__init__.py
  2023-02-17 14:19:45.000000000 +0100
+++ 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/contrib/regular_languages/__init__.py
  2023-11-16 22:47:58.000000000 +0100
@@ -30,7 +30,7 @@
 ---------------------------------
 
 - Syntax highlighting: We could use this for instance to give file names
-                       different colour.
+                       different color.
 - Parse the result: .. We can extract the file names and commands by using a
                        regular expression with named groups.
 - Input validation: .. Don't accept anything that does not match this grammar.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/contrib/ssh/server.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/contrib/ssh/server.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/contrib/ssh/server.py  
2023-03-06 10:01:30.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/contrib/ssh/server.py  
2023-12-12 23:57:17.000000000 +0100
@@ -6,7 +6,7 @@
 import asyncio
 import traceback
 from asyncio import get_running_loop
-from typing import Any, Awaitable, Callable, TextIO, cast
+from typing import Any, Callable, Coroutine, TextIO, cast
 
 import asyncssh
 
@@ -21,7 +21,7 @@
 class PromptToolkitSSHSession(asyncssh.SSHServerSession):  # type: ignore
     def __init__(
         self,
-        interact: Callable[[PromptToolkitSSHSession], Awaitable[None]],
+        interact: Callable[[PromptToolkitSSHSession], Coroutine[Any, Any, 
None]],
         *,
         enable_cpr: bool,
     ) -> None:
@@ -162,7 +162,7 @@
 
     def __init__(
         self,
-        interact: Callable[[PromptToolkitSSHSession], Awaitable[None]],
+        interact: Callable[[PromptToolkitSSHSession], Coroutine[Any, Any, 
None]],
         *,
         enable_cpr: bool = True,
     ) -> None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/contrib/telnet/server.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/contrib/telnet/server.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/contrib/telnet/server.py       
2023-11-13 15:21:59.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/contrib/telnet/server.py       
2023-12-12 23:57:17.000000000 +0100
@@ -7,7 +7,7 @@
 import contextvars
 import socket
 from asyncio import get_running_loop
-from typing import Awaitable, Callable, TextIO, cast
+from typing import Any, Callable, Coroutine, TextIO, cast
 
 from prompt_toolkit.application.current import create_app_session, get_app
 from prompt_toolkit.application.run_in_terminal import run_in_terminal
@@ -124,7 +124,7 @@
         self,
         conn: socket.socket,
         addr: tuple[str, int],
-        interact: Callable[[TelnetConnection], Awaitable[None]],
+        interact: Callable[[TelnetConnection], Coroutine[Any, Any, None]],
         server: TelnetServer,
         encoding: str,
         style: BaseStyle | None,
@@ -283,7 +283,9 @@
         self,
         host: str = "127.0.0.1",
         port: int = 23,
-        interact: Callable[[TelnetConnection], Awaitable[None]] = 
_dummy_interact,
+        interact: Callable[
+            [TelnetConnection], Coroutine[Any, Any, None]
+        ] = _dummy_interact,
         encoding: str = "utf-8",
         style: BaseStyle | None = None,
         enable_cpr: bool = True,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/eventloop/inputhook.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/eventloop/inputhook.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/eventloop/inputhook.py 
2023-11-13 15:21:59.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/eventloop/inputhook.py 
2023-12-11 23:07:28.000000000 +0100
@@ -66,7 +66,7 @@
 
 
 def new_eventloop_with_inputhook(
-    inputhook: Callable[[InputHookContext], None]
+    inputhook: Callable[[InputHookContext], None],
 ) -> AbstractEventLoop:
     """
     Create a new event loop with the given inputhook.
@@ -77,7 +77,7 @@
 
 
 def set_eventloop_with_inputhook(
-    inputhook: Callable[[InputHookContext], None]
+    inputhook: Callable[[InputHookContext], None],
 ) -> AbstractEventLoop:
     """
     Create a new event loop with the given inputhook, and activate it.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/filters/app.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/filters/app.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/filters/app.py 2023-11-03 
16:37:20.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/filters/app.py 2023-11-16 
22:47:58.000000000 +0100
@@ -50,7 +50,7 @@
 
 
 # NOTE: `has_focus` below should *not* be `memoized`. It can reference any user
-#       control. For instance, if we would contiously create new
+#       control. For instance, if we would continuously create new
 #       `PromptSession` instances, then previous instances won't be released,
 #       because this memoize (which caches results in the global scope) will
 #       still refer to each instance.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/formatted_text/__init__.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/formatted_text/__init__.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/formatted_text/__init__.py     
2023-11-03 16:37:20.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/formatted_text/__init__.py     
2023-12-12 14:42:07.000000000 +0100
@@ -16,6 +16,7 @@
 from .base import (
     AnyFormattedText,
     FormattedText,
+    OneStyleAndTextTuple,
     StyleAndTextTuples,
     Template,
     is_formatted_text,
@@ -35,6 +36,7 @@
 __all__ = [
     # Base.
     "AnyFormattedText",
+    "OneStyleAndTextTuple",
     "to_formatted_text",
     "is_formatted_text",
     "Template",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/formatted_text/utils.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/formatted_text/utils.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/formatted_text/utils.py        
2023-11-03 16:37:20.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/formatted_text/utils.py        
2023-12-12 14:42:07.000000000 +0100
@@ -72,13 +72,15 @@
     return "".join(item[1] for item in fragments if ZeroWidthEscape not in 
item[0])
 
 
-def split_lines(fragments: StyleAndTextTuples) -> Iterable[StyleAndTextTuples]:
+def split_lines(
+    fragments: Iterable[OneStyleAndTextTuple],
+) -> Iterable[StyleAndTextTuples]:
     """
     Take a single list of (style_str, text) tuples and yield one such list for 
each
     line. Just like str.split, this will yield at least one item.
 
-    :param fragments: List of (style_str, text) or (style_str, text, 
mouse_handler)
-                      tuples.
+    :param fragments: Iterable of ``(style_str, text)`` or
+        ``(style_str, text, mouse_handler)`` tuples.
     """
     line: StyleAndTextTuples = []
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/input/posix_utils.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/input/posix_utils.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/input/posix_utils.py   
2023-02-17 14:19:45.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/input/posix_utils.py   
2023-11-16 22:47:58.000000000 +0100
@@ -26,7 +26,7 @@
         On Python3, this can be 'surrogateescape', which is the default.
 
         'surrogateescape' is preferred, because this allows us to transfer
-        unrecognised bytes to the key bindings. Some terminals, like lxterminal
+        unrecognized bytes to the key bindings. Some terminals, like lxterminal
         and Guake, use the 'Mxx' notation to send mouse events, where each 'x'
         can be any possible byte.
     """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/key_binding/key_bindings.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/key_binding/key_bindings.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/key_binding/key_bindings.py    
2023-11-03 16:37:20.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/key_binding/key_bindings.py    
2023-12-12 23:57:17.000000000 +0100
@@ -40,8 +40,9 @@
 from inspect import isawaitable
 from typing import (
     TYPE_CHECKING,
-    Awaitable,
+    Any,
     Callable,
+    Coroutine,
     Hashable,
     Sequence,
     Tuple,
@@ -89,7 +90,8 @@
 # This is mainly used in case of mouse move events, to prevent excessive
 # repainting during mouse move events.
 KeyHandlerCallable = Callable[
-    ["KeyPressEvent"], Union["NotImplementedOrNone", 
Awaitable["NotImplementedOrNone"]]
+    ["KeyPressEvent"],
+    Union["NotImplementedOrNone", Coroutine[Any, Any, "NotImplementedOrNone"]],
 ]
 
 
@@ -125,7 +127,7 @@
 
         # If the handler is a coroutine, create an asyncio task.
         if isawaitable(result):
-            awaitable = cast(Awaitable["NotImplementedOrNone"], result)
+            awaitable = cast(Coroutine[Any, Any, "NotImplementedOrNone"], 
result)
 
             async def bg_task() -> None:
                 result = await awaitable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/layout/containers.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/layout/containers.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/layout/containers.py   
2023-11-13 15:21:59.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/layout/containers.py   
2023-11-16 22:47:58.000000000 +0100
@@ -2050,7 +2050,7 @@
                         new_buffer_row[x + xpos] = char
 
                         # When we print a multi width character, make sure
-                        # to erase the neighbours positions in the screen.
+                        # to erase the neighbors positions in the screen.
                         # (The empty string if different from everything,
                         # so next redraw this cell will repaint anyway.)
                         if char_width > 1:
@@ -2537,7 +2537,7 @@
             scroll_offset_end=offsets.right,
             cursor_pos=get_cwidth(current_line_text[: 
ui_content.cursor_position.x]),
             window_size=width - current_line_prefix_width,
-            # We can only analyse the current line. Calculating the width off
+            # We can only analyze the current line. Calculating the width off
             # all the lines is too expensive.
             content_size=max(
                 get_cwidth(current_line_text), self.horizontal_scroll + width
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/layout/controls.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/layout/controls.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/layout/controls.py     
2023-11-13 15:21:59.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/layout/controls.py     
2023-11-16 22:47:58.000000000 +0100
@@ -491,7 +491,7 @@
 
 class BufferControl(UIControl):
     """
-    Control for visualising the content of a :class:`.Buffer`.
+    Control for visualizing the content of a :class:`.Buffer`.
 
     :param buffer: The :class:`.Buffer` object to be displayed.
     :param input_processors: A list of
@@ -603,7 +603,7 @@
               width can be done by calculating the longest line, but this would
               require applying all the processors to each line. This is
               unfeasible for a larger document, and doing it for small
-              documents only would result in inconsistent behaviour.
+              documents only would result in inconsistent behavior.
         """
         return None
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/layout/menus.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/layout/menus.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/layout/menus.py        
2023-11-13 15:21:59.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/layout/menus.py        
2023-11-16 22:47:58.000000000 +0100
@@ -679,7 +679,7 @@
             filter=full_filter & show_meta & any_completion_has_meta,
         )
 
-        # Initialise split.
+        # Initialize split.
         super().__init__([completions_window, meta_window], z_index=z_index)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/layout/processors.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/layout/processors.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/layout/processors.py   
2023-11-03 16:37:20.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/layout/processors.py   
2023-11-16 22:47:58.000000000 +0100
@@ -288,7 +288,7 @@
 
             if from_ == 0 and to == 0 and len(fragments) == 0:
                 # When this is an empty line, insert a space in order to
-                # visualise the selection.
+                # visualize the selection.
                 return Transformation([(selected_fragment, " ")])
             else:
                 for i in range(from_, to):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/lexers/pygments.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/lexers/pygments.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/lexers/pygments.py     
2023-11-13 15:21:59.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/lexers/pygments.py     
2023-11-16 22:47:58.000000000 +0100
@@ -31,7 +31,7 @@
 
 class SyntaxSync(metaclass=ABCMeta):
     """
-    Syntax synchroniser. This is a tool that finds a start position for the
+    Syntax synchronizer. This is a tool that finds a start position for the
     lexer. This is especially important when editing big documents; we don't
     want to start the highlighting by running the lexer from the beginning of
     the file. That is very slow when editing.
@@ -67,12 +67,12 @@
     Synchronize by starting at a line that matches the given regex pattern.
     """
 
-    # Never go more than this amount of lines backwards for synchronisation.
+    # Never go more than this amount of lines backwards for synchronization.
     # That would be too CPU intensive.
     MAX_BACKWARDS = 500
 
     # Start lexing at the start, if we are in the first 'n' lines and no
-    # synchronisation position was found.
+    # synchronization position was found.
     FROM_START_IF_NO_SYNC_POS_FOUND = 100
 
     def __init__(self, pattern: str) -> None:
@@ -88,13 +88,13 @@
         lines = document.lines
 
         # Scan upwards, until we find a point where we can start the syntax
-        # synchronisation.
+        # synchronization.
         for i in range(lineno, max(-1, lineno - self.MAX_BACKWARDS), -1):
             match = pattern.match(lines[i])
             if match:
                 return i, match.start()
 
-        # No synchronisation point found. If we aren't that far from the
+        # No synchronization point found. If we aren't that far from the
         # beginning, start at the very beginning, otherwise, just try to start
         # at the current line.
         if lineno < self.FROM_START_IF_NO_SYNC_POS_FOUND:
@@ -228,7 +228,7 @@
         line_generators: dict[LineGenerator, int] = {}
 
         def get_syntax_sync() -> SyntaxSync:
-            "The Syntax synchronisation object that we currently use."
+            "The Syntax synchronization object that we currently use."
             if self.sync_from_start():
                 return SyncFromStart()
             else:
@@ -271,7 +271,7 @@
                 return generator
 
             # No generator found. Determine starting point for the syntax
-            # synchronisation first.
+            # synchronization first.
 
             # Go at least x lines back. (Make scrolling upwards more
             # efficient.)
@@ -291,7 +291,7 @@
                 generator = create_line_generator(row, column)
 
             # If the column is not 0, ignore the first line. (Which is
-            # incomplete. This happens when the synchronisation algorithm tells
+            # incomplete. This happens when the synchronization algorithm tells
             # us to start parsing in the middle of a line.)
             if column:
                 next(generator)
@@ -316,7 +316,7 @@
                         # Remove the next item from the cache.
                         # (It could happen that it's already there, because of
                         # another generator that started filling these lines,
-                        # but we want to synchronise these lines with the
+                        # but we want to synchronize these lines with the
                         # current lexer's state.)
                         if num + 1 in cache:
                             del cache[num + 1]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/output/base.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/output/base.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/output/base.py 2023-05-28 
11:12:41.000000000 +0200
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/output/base.py 2023-11-16 
22:47:58.000000000 +0100
@@ -66,7 +66,7 @@
     @abstractmethod
     def erase_screen(self) -> None:
         """
-        Erases the screen with the background colour and moves the cursor to
+        Erases the screen with the background color and moves the cursor to
         home.
         """
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/output/vt100.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/output/vt100.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/output/vt100.py        
2023-03-06 10:01:30.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/output/vt100.py        
2023-11-16 22:47:58.000000000 +0100
@@ -529,7 +529,7 @@
 
     def erase_screen(self) -> None:
         """
-        Erases the screen with the background colour and moves the cursor to
+        Erases the screen with the background color and moves the cursor to
         home.
         """
         self.write_raw("\x1b[2J")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit/patch_stdout.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/patch_stdout.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/patch_stdout.py        
2023-03-06 10:01:30.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/patch_stdout.py        
2023-12-11 23:07:28.000000000 +0100
@@ -43,7 +43,7 @@
 
     Writing to this proxy will make sure that the text appears above the
     prompt, and that it doesn't destroy the output from the renderer.  If no
-    application is curring, the behaviour should be identical to writing to
+    application is curring, the behavior should be identical to writing to
     `sys.stdout` directly.
 
     Warning: If a new event loop is installed using `asyncio.set_event_loop()`,
@@ -203,6 +203,13 @@
         """
 
         def write_and_flush() -> None:
+            # Ensure that autowrap is enabled before calling `write`.
+            # XXX: On Windows, the `Windows10_Output` enables/disables VT
+            #      terminal processing for every flush. It turns out that this
+            #      causes autowrap to be reset (disabled) after each flush. So,
+            #      we have to enable it again before writing text.
+            self._output.enable_autowrap()
+
             if self.raw:
                 self._output.write_raw(text)
             else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prompt_toolkit-3.0.41/src/prompt_toolkit/renderer.py 
new/prompt_toolkit-3.0.43/src/prompt_toolkit/renderer.py
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit/renderer.py    2023-11-13 
15:21:59.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit/renderer.py    2023-12-11 
23:08:18.000000000 +0100
@@ -233,7 +233,7 @@
     # output. That way, we're sure that the terminal scrolls up, even when the
     # lower lines of the canvas just contain whitespace.
 
-    # The most obvious reason that we actually want this behaviour is the avoid
+    # The most obvious reason that we actually want this behavior is the avoid
     # the artifact of the input scrolling when the completion menu is shown.
     # (If the scrolling is actually wanted, the layout can still be build in a
     # way to behave that way by setting a dynamic height.)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prompt_toolkit-3.0.41/src/prompt_toolkit.egg-info/PKG-INFO 
new/prompt_toolkit-3.0.43/src/prompt_toolkit.egg-info/PKG-INFO
--- old/prompt_toolkit-3.0.41/src/prompt_toolkit.egg-info/PKG-INFO      
2023-11-13 22:47:28.000000000 +0100
+++ new/prompt_toolkit-3.0.43/src/prompt_toolkit.egg-info/PKG-INFO      
2023-12-13 09:44:04.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: prompt-toolkit
-Version: 3.0.41
+Version: 3.0.43
 Summary: Library for building powerful interactive command lines in Python
 Home-page: https://github.com/prompt-toolkit/python-prompt-toolkit
 Author: Jonathan Slenders
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prompt_toolkit-3.0.41/tests/test_async_generator.py 
new/prompt_toolkit-3.0.43/tests/test_async_generator.py
--- old/prompt_toolkit-3.0.41/tests/test_async_generator.py     2023-02-17 
14:19:45.000000000 +0100
+++ new/prompt_toolkit-3.0.43/tests/test_async_generator.py     2023-11-16 
22:47:58.000000000 +0100
@@ -12,7 +12,7 @@
 
 def test_generator_to_async_generator():
     """
-    Test conversion of sync to asycn generator.
+    Test conversion of sync to async generator.
     This should run the synchronous parts in a background thread.
     """
     async_gen = generator_to_async_generator(_sync_generator)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prompt_toolkit-3.0.41/tests/test_formatted_text.py 
new/prompt_toolkit-3.0.43/tests/test_formatted_text.py
--- old/prompt_toolkit-3.0.41/tests/test_formatted_text.py      2023-11-03 
16:37:20.000000000 +0100
+++ new/prompt_toolkit-3.0.43/tests/test_formatted_text.py      2023-11-16 
22:47:58.000000000 +0100
@@ -28,7 +28,7 @@
     ]
 
     # It's important that `to_formatted_text` returns a `FormattedText`
-    # instance. Otherwise, `print_formatted_text` won't recognise it and will
+    # instance. Otherwise, `print_formatted_text` won't recognize it and will
     # print a list literal instead.
     assert isinstance(to_formatted_text(html), FormattedText)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prompt_toolkit-3.0.41/tests/test_widgets.py 
new/prompt_toolkit-3.0.43/tests/test_widgets.py
--- old/prompt_toolkit-3.0.41/tests/test_widgets.py     2023-02-17 
14:19:45.000000000 +0100
+++ new/prompt_toolkit-3.0.43/tests/test_widgets.py     2023-11-16 
22:47:58.000000000 +0100
@@ -10,7 +10,7 @@
     return fragment_list_to_text(control.text())
 
 
-def test_defaulf_button():
+def test_default_button():
     button = Button("Exit")
     assert _to_text(button) == "<   Exit   >"
 

Reply via email to