Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting font from preference dialog in IDLE on OS X broken #49482

Closed
MLModel mannequin opened this issue Feb 12, 2009 · 7 comments
Closed

Setting font from preference dialog in IDLE on OS X broken #49482

MLModel mannequin opened this issue Feb 12, 2009 · 7 comments
Assignees
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@MLModel
Copy link
Mannequin

MLModel mannequin commented Feb 12, 2009

BPO 5232
Nosy @kbkaiser, @ned-deily, @MLModel
Superseder
  • bpo-6075: Patch for IDLE/OS X to work with Tk-Cocoa
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/kbkaiser'
    closed_at = <Date 2009-05-21.01:40:36.234>
    created_at = <Date 2009-02-12.22:08:25.019>
    labels = ['expert-IDLE', 'type-bug']
    title = 'Setting font from preference dialog in IDLE on OS X broken'
    updated_at = <Date 2009-05-21.01:40:36.183>
    user = 'https://github.com/MLModel'

    bugs.python.org fields:

    activity = <Date 2009-05-21.01:40:36.183>
    actor = 'kbk'
    assignee = 'kbk'
    closed = True
    closed_date = <Date 2009-05-21.01:40:36.234>
    closer = 'kbk'
    components = ['IDLE']
    creation = <Date 2009-02-12.22:08:25.019>
    creator = 'MLModel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 5232
    keywords = ['patch']
    message_count = 7.0
    messages = ['81827', '81835', '81857', '81871', '83732', '88147', '88148']
    nosy_count = 6.0
    nosy_names = ['kbk', 'wordtech', 'gpolo', 'ned.deily', 'bmiller', 'MLModel']
    pr_nums = []
    priority = 'normal'
    resolution = 'later'
    stage = 'test needed'
    status = 'closed'
    superseder = '6075'
    type = 'behavior'
    url = 'https://bugs.python.org/issue5232'
    versions = ['Python 3.0', 'Python 3.1']

    @MLModel
    Copy link
    Mannequin Author

    MLModel mannequin commented Feb 12, 2009

    When setting the font in IDLE's Preferences dialog on OSX, having
    started IDLE from the command line, the font is changed and the
    following is printed:

    Exception in Tkinter callback
    Traceback (most recent call last):
      File 
    "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/tkinter
    /__init__.py", line 1399, in __call__
        return self.func(*args)
      File 
    "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/idlelib
    /configDialog.py", line 1125, in Ok
        self.Apply()
      File 
    "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/idlelib
    /configDialog.py", line 1129, in Apply
        self.DeactivateCurrentConfig()
      File 
    "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/idlelib
    /configDialog.py", line 1107, in DeactivateCurrentConfig
        winInstances = self.parent.instance_dict.keys()
      File 
    "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/tkinter
    /__init__.py", line 1708, in __getattr__
        return getattr(self.tk, attr)
    AttributeError: 'tkapp' object has no attribute 'instance_dict'

    @MLModel MLModel mannequin added the topic-IDLE label Feb 12, 2009
    @ned-deily
    Copy link
    Member

    FWIW, I am not able to reproduce this using a release3.0 IDLE (so with
    today's patches) built with the default Apple-supplied Tcl/Tk in 10.5.
    Are you using a newer Tcl/Tk? Does it happen if you move your current
    preferences out of ~/.idlerc?

    @MLModel
    Copy link
    Mannequin Author

    MLModel mannequin commented Feb 13, 2009

    At 10:56 PM +0000 02/12/09, Ned Deily wrote:

    Ned Deily <nad@acm.org> added the comment:

    FWIW, I am not able to reproduce this using a release3.0 IDLE (so with
    today's patches) built with the default Apple-supplied Tcl/Tk in 10.5.
    Are you using a newer Tcl/Tk? Does it happen if you move your current
    preferences out of ~/.idlerc?

    It does still happen if I move my preferences. And move my .Idle.py.
    I did build it with a newer Tk -- 8.5 installed as a Framework.
    (And I switched the order of /System/Library/Frameworks and /Library/Frameworks,
    which makes more sense. I thought I had seen that as an Issue, but it must have been
    just a web page where I saw it. Similarly, I added /opt/local/lib and /opt/local/include
    in detect_modules before the directories that are added, so that it finds the readline I
    installed with "port".)

    So, I started again with a fresh checkout. I didn't switch the order of the Frameworks
    directories, and I tried it with and without the directories for readline. I started Python
    manually, imported Tk, checked it's version, etc. to confirm I was getting the Apple
    installation. If I try to run bin/idle from the 3.1 Frameworks version directory
    I get a segmentation fault. I've seen a lot of weird behavior over the years in my
    many configuration and installation escapades across a wide variety of software,
    but I've never seen a seg fault with anything to do with Python. I have the "do you
    want to report this" backtrace if you're interested. A little later I'll try this from scratch
    on a clean, though PowerPC (G4), machine and see what happens.

    @MLModel
    Copy link
    Mannequin Author

    MLModel mannequin commented Feb 13, 2009

    OK, so I built 3.1 on a clean (G4) system instead of my highly
    tangled Intel and didn't get the seg fault. I guess the issue isn't
    real.

    @bmiller
    Copy link
    Mannequin

    bmiller mannequin commented Mar 18, 2009

    I get the same problem when I try to change the key set. This is on on
    intel build using Tk 8.5, and the latest 3.1 source checked out with
    bzr.

    I too changed the order of /Library/Frameworks and
    /System/Library/Frameworks in setup.py

    A simple fix for me was to add the line

    root.instance_dict = {}

    in macosxsupport.py That does not seem to have any other ill effects.

    @devdanzin devdanzin mannequin added the type-bug An unexpected behavior, bug, or error label Apr 26, 2009
    @wordtech
    Copy link
    Mannequin

    wordtech mannequin commented May 21, 2009

    Added Brad's snippet to macosxSupport.py: see http://bugs.python.org/issue6075

    @kbkaiser
    Copy link
    Contributor

    Superceeded by 6075.

    @kbkaiser kbkaiser self-assigned this May 21, 2009
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants