GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Tkinter: test_configure_screen should only run on X11 · Issue #104461 · python/cpython

Tkinter: test_configure_screen should only run on X11 #104461

New issue
Copy link
New issue
Copy link
Closed
Closed
Tkinter: test_configure_screen should only run on X11#104461
Copy link
Labels
topic-tkinter

Description

@chrstphrchvz
chrstphrchvz
opened on May 14, 2023
Issue body actions

test_configure_screen uses the DISPLAY environment variable, which is only relevant to X11; and the purpose of the test is to set the -screen option for a toplevel, which is only useful on Tk for X11, since Tk for the Win32 or Aqua windowing systems only support a single “screen” (called :0 by default).

I use XQuartz installed from MacPorts, and so the DISPLAY environment variable is usually set. test_configure_screen tries to use DISPLAY even if I am running the test on Tk Aqua:

======================================================================
ERROR: test_configure_screen (test.test_tkinter.test_widgets.ToplevelTest.test_configure_screen)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/user/git/cpython/Lib/test/test_tkinter/test_widgets.py", line 86, in test_configure_screen
    widget2 = self.create(screen=display)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/git/cpython/Lib/test/test_tkinter/test_widgets.py", line 69, in create
    return tkinter.Toplevel(self.root, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/git/cpython/Lib/tkinter/__init__.py", line 2678, in __init__
    BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra)
  File "/Users/user/git/cpython/Lib/tkinter/__init__.py", line 2629, in __init__
    self.tk.call(
_tkinter.TclError: couldn't connect to display "/private/tmp/com.apple.launchd.yqEvGPTxFm/org.macports:0"

Linked PRs

  • gh-104461: Run test_configure_screen on X11 only #104462
  • [3.11] gh-104461: Run tkinter test_configure_screen on X11 only (GH-104462) #104526

Activity

  1. chrstphrchvz
    added a commit that references this issue on May 14, 2023

    pythongh-104461: Run test_configure_screen on X11 only

    c9f9554
  2. terryjreedy
    added
    topic-tkinter
    on May 14, 2023
  3. terryjreedy commented on May 15, 2023

    @terryjreedy
    terryjreedy
    on May 15, 2023
    Member
    More actions

    @ned-deily Does proposed fix on PR of adding following at the top of the test seem right to you?

            if widget._windowingsystem != 'x11':
                self.skipTest('Not using Tk for X11')
    
  4. ned-deily
    added a commit that references this issue on May 16, 2023

    gh-104461: Run tkinter test_configure_screen on X11 only (GH-104462)

    fdafdc2
  5. miss-islington
    added a commit that references this issue on May 16, 2023

    pythongh-104461: Run tkinter test_configure_screen on X11 only (pytho…

    b77bce5
  6. ned-deily
    added a commit that references this issue on May 16, 2023

    [3.11] gh-104461: Run tkinter test_configure_screen on X11 only (GH-1…

    7779027
  7. ned-deily commented on May 16, 2023

    @ned-deily
    ned-deily
    on May 16, 2023
    Member
    More actions

    Does proposed fix on PR of adding following at the top of the test seem right to you?

    Yes, it does. I fixed a couple of problems with the NEWS file and then merged the fix to main (for 3.12) and to 3.11. Thanks for the PR, @chrstphrchvz!

  8. ned-deily
    closed this as completedon May 16, 2023
  9. carljm
    added a commit that references this issue on May 16, 2023

    Merge branch 'main' into supermon

    a6dd626
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-tkinter

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.