Skip to content

[pull] main from python:main#1173

Merged
pull[bot] merged 10 commits into
tj-python:mainfrom
python:main
Jun 19, 2026
Merged

[pull] main from python:main#1173
pull[bot] merged 10 commits into
tj-python:mainfrom
python:main

Conversation

@pull

@pull pull Bot commented Jun 19, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

cmaloney and others added 10 commits June 19, 2026 09:50
Cover previously-untested Text methods (indices, content, marks, tags,
undo/redo, dump, embedded images and windows, peers, and geometry) and
the tag, embedded-image and embedded-window configuration options.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The module-global curses_screen_encoding stored a borrowed pointer to the
encoding owned by the window returned by the first initscr() call.  That
window can be deallocated while unctrl() and ungetch(), which have no window
of their own, still use the pointer to encode non-ASCII characters.

Keep a private copy of the encoding instead.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add frozendict to the fast paths of PyMapping_GetOptionalItem(),
PyMapping_Keys(), PyMapping_Values(), and PyMapping_Items().

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Cover previously-untested Menu methods in MenuTest: adding, inserting and
deleting items of every type, index resolution, invoking items, entry x/y
positions, and post/unpost/tk_popup mapping.

Also test per-entry configuration options and the errors raised for
invalid indices, entry types, option names and option values.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cover previously-untested Listbox methods in ListboxTest: size, delete,
index resolution, nearest, see, activate, and the selection methods
(selection_set/clear/includes/anchor and their select_* aliases),
including the errors raised for invalid indices.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cover previously-untested Canvas methods in CanvasTest:

* item creation and types, bbox, coordinate conversion, move/scale,
  find and addtag queries, tags, item configuration, stacking order,
  text-item editing, selection, focus, scan and postscript;
* the create_arc, create_oval, create_bitmap, create_image,
  create_text and create_window item creation methods, checking
  coordinates, default and explicit options, valid enumerations and
  rejection of invalid values;
* tag_bind() and tag_unbind(), checking the returned function id and
  binding script, querying bound sequences, the add parameter, event
  delivery to items via a tag, and removal of a single binding by id
  or all bindings for a sequence.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…H-151694)

Add curses tests for panels, textpad, and window behavior

Extend test_curses with behavior-verifying tests that go beyond the
existing smoke tests:

* curses.panel stacking: new_panel/top/bottom/above/below ordering,
  hide/show/hidden, move, replace and userptr round-trip.
* Real-window curses.textpad.Textbox: gather(), edit(), stripspaces,
  insert mode and the Emacs-like editing commands (previously only
  exercised through a MagicMock).
* Window output: addstr cursor advance and addnstr truncation,
  insstr/insnstr shifting without cursor movement, and pad behavior
  (instr, subpad cell sharing, the required 6-argument refresh()).
* Error handling: out-of-range coordinates raising curses.error and
  bad character/string argument types.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cover previously-untested methods of several widgets:

* Button, Checkbutton and Radiobutton: invoke, flash and toggle;
* Entry: delete, icursor and the select_* aliases;
* Spinbox: invoke, identify and scan;
* Scale and Scrollbar: identify, and Scrollbar fraction and delta;
* PanedWindow: panes, remove/forget, sash and proxy positioning,
  identify, and adding panes with configuration options.

Also test that invoke does nothing for a disabled button and the
errors raised for invalid indices, coordinates, option names and values.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Jun 19, 2026
@pull pull Bot added the ⤵️ pull label Jun 19, 2026
@pull pull Bot merged commit 93b9e76 into tj-python:main Jun 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants