Skip to content

turtle.write() causes flickering when the tracer is turned off. #91212

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

Closed
relent95 mannequin opened this issue Mar 18, 2022 · 5 comments
Closed

turtle.write() causes flickering when the tracer is turned off. #91212

relent95 mannequin opened this issue Mar 18, 2022 · 5 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@relent95
Copy link
Mannequin

relent95 mannequin commented Mar 18, 2022

BPO 47056
Nosy @terryjreedy, @relent95
Files
  • test_anim_write.py: A sample script that reproduces the bug.
  • 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 = None
    closed_at = None
    created_at = <Date 2022-03-18.09:27:33.522>
    labels = ['type-bug', 'library', '3.9', '3.10', '3.11']
    title = 'turtle.write() causes flickering when the tracer is turned off.'
    updated_at = <Date 2022-03-21.07:02:30.149>
    user = 'https://github.com/relent95'

    bugs.python.org fields:

    activity = <Date 2022-03-21.07:02:30.149>
    actor = 'relent95'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2022-03-18.09:27:33.522>
    creator = 'relent95'
    dependencies = []
    files = ['50690']
    hgrepos = []
    issue_num = 47056
    keywords = []
    message_count = 3.0
    messages = ['415475', '415531', '415669']
    nosy_count = 2.0
    nosy_names = ['terry.reedy', 'relent95']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue47056'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @relent95
    Copy link
    Mannequin Author

    relent95 mannequin commented Mar 18, 2022

    When implementing an animation with turtle, usually the tracer is turned off via turtle.tracer(0, 0) and turtle.update() is called manually.

    When the tracer is off, most of drawing functions skips update() calls on the underlying Canvas. But turtle.write() does not do that.
    (See the implementation of TurtleScreenBase._write().)

    This causes flickering, as can be seen when you run the attached script. (Press space key to hide/show texts.)

    @relent95 relent95 mannequin added 3.8 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Mar 18, 2022
    @terryjreedy
    Copy link
    Member

    On Win10, running 3.11.0a5+ from command line, upper ABC and boxes flicker when strings are displayed. (When run with from IDLE editor, there is no flicker except sometimes when moving mouse over or off title bar buttons.) (3.8 only gets security fixes.)

    @terryjreedy terryjreedy added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes and removed 3.8 (EOL) end of life labels Mar 19, 2022
    @relent95
    Copy link
    Mannequin Author

    relent95 mannequin commented Mar 21, 2022

    I tested on Ubuntu 20.04 with the following Python versions.

        3.8.2(repository version)
        3.11.0a5(compiled from the official tarball)

    Both cases cause flickering.

    @relent95
    Copy link
    Contributor

    Anyone can review the above PR?

    miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 29, 2022
    …nGH-95129)
    
    Fixed flickering when the tracer is turned off.
    (cherry picked from commit 4652093)
    
    Co-authored-by: Shin-myoung-serp <[email protected]>
    gpshead pushed a commit that referenced this issue Sep 29, 2022
    Fixed flickering when the tracer is turned off.
    miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 29, 2022
    …nGH-95129)
    
    Fixed flickering when the tracer is turned off.
    (cherry picked from commit 4652093)
    
    Co-authored-by: Shin-myoung-serp <[email protected]>
    miss-islington added a commit that referenced this issue Sep 29, 2022
    Fixed flickering when the tracer is turned off.
    (cherry picked from commit 4652093)
    
    Co-authored-by: Shin-myoung-serp <[email protected]>
    miss-islington added a commit that referenced this issue Sep 29, 2022
    Fixed flickering when the tracer is turned off.
    (cherry picked from commit 4652093)
    
    Co-authored-by: Shin-myoung-serp <[email protected]>
    @gpshead
    Copy link
    Member

    gpshead commented Sep 29, 2022

    thanks!

    @gpshead gpshead closed this as completed Sep 29, 2022
    @gpshead gpshead moved this to Done in Turtle issues 🐢 Sep 29, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    Development

    No branches or pull requests

    3 participants