prompt-toolkit / prompt-toolkit/python-prompt-toolkit

Undocumented backwards incompatibility in version 3.0.29

Open
#1,627 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

Hello, I found that the most recent version 3.0.29 of prompt_toolkit probably introduces some breaking changes, which are not recorded in release notes.

  1. Add required parameter vt100_input in function prompt_toolkit.contrib.telnet.server.TelnetConnection.__init__.
  2. Add required parameter _pipe in function prompt_toolkit.input.posix_pipe.PosixPipeInput.__init__.
  3. Rename optional parameter text to _text in function prompt_toolkit.input.posix_pipe.PosixPipeInput.__init__.
  4. is_windows is not accessible from following modules:
    1. prompt_toolkit.application.application.is_windows
    2. prompt_toolkit.eventloop.inputhook.is_windows
    3. prompt_toolkit.input.defaults.is_windows
    4. prompt_toolkit.key_binding.bindings.mouse.is_windows
    5. prompt_toolkit.output.defaults.is_windows

To make it easier to understand the impact of the breaking changes, I write a short code snippet that reproduces the breaking changes.
The following code runs well in 3.0.28 but gets crashed in 3.0.29.

# Change 1
TelnetConnection(conn, addr, interact, server, encoding, style)
# missing 1 required positional argument: 'vt100_input'

# Change 2 and 3
PosixPipeInput(text="text")
# missing 1 required positional argument: '_pipe' and got an unexpected keyword argument 'text'

# Change 4
from prompt_toolkit.application.application import is_windows
# AttributeError: module 'prompt_toolkit.application.application' has no attribute 'is_windows'

Maybe recording these changes in release notes helps to avoid user confusion during updating this version?

Kind regrads,

@eXceediDeaL

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the release notes for version 3.0.29 and compare them with the four incompatibilities listed in the issue, including the affected constructors and is_windows imports. Document each breaking change with the supplied reproduction examples, so users upgrading from 3.0.28 can identify the required adjustments.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.