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

Drop support of Tk 8.3 #66283

Closed
serhiy-storchaka opened this issue Jul 26, 2014 · 12 comments
Closed

Drop support of Tk 8.3 #66283

serhiy-storchaka opened this issue Jul 26, 2014 · 12 comments
Assignees
Labels
topic-tkinter type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

BPO 22085
Nosy @loewis, @ned-deily, @serhiy-storchaka
Files
  • tkinter_trace_variable.patch
  • tkinter_drop_83.patch
  • 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/serhiy-storchaka'
    closed_at = <Date 2014-07-31.14:50:18.307>
    created_at = <Date 2014-07-26.17:33:27.882>
    labels = ['type-feature', 'expert-tkinter']
    title = 'Drop support of Tk 8.3'
    updated_at = <Date 2014-08-05.16:55:10.157>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2014-08-05.16:55:10.157>
    actor = 'python-dev'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2014-07-31.14:50:18.307>
    closer = 'serhiy.storchaka'
    components = ['Tkinter']
    creation = <Date 2014-07-26.17:33:27.882>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = ['36115', '36161']
    hgrepos = []
    issue_num = 22085
    keywords = ['patch']
    message_count = 12.0
    messages = ['224080', '224087', '224163', '224289', '224294', '224322', '224362', '224379', '224381', '224382', '224408', '224858']
    nosy_count = 4.0
    nosy_names = ['loewis', 'ned.deily', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue22085'
    versions = ['Python 3.5']

    @serhiy-storchaka
    Copy link
    Member Author

    Command used to monitor Tcl variable access ("trace variable", "trace vdelete", "trace vinfo") are deprecated and will likely be removed in a future version of Tcl. Proposed patch replaces them to modern equivalents.

    The problem is that new commands was introduced in Tcl 8.4, but minimal supported by Tkinter version is 8.3. This patch should wait until dropping support of Tcl 8.3.

    @serhiy-storchaka serhiy-storchaka added topic-tkinter type-feature A feature request or enhancement labels Jul 26, 2014
    @ned-deily
    Copy link
    Member

    Is there any reason to not drop support for Tk 8.3? It appears that the last release of it, 8.3.5, was in 2002. Is anyone aware of any use of it on currently supported platforms? The final planned release of 8.4 (8.4.20) was just a year ago and 8.4 is still being shipped on some platforms, i.e. OS X, so we should keep supporting it for the time being.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jul 28, 2014

    Dropping support for 8.3 sounds fine with me (for Python 3.5 only, of course). Otherwise, the patch looks also fine, so please apply.

    @serhiy-storchaka
    Copy link
    Member Author

    I'm even not sure that current code works with Tk 8.3. We have no buildbots with Tk 8.3 and compatibility with it was not tested for years.

    Here is a patch which drops support of Tk 8.3.

    @serhiy-storchaka serhiy-storchaka changed the title Update deprecated Tcl commands in Tkinter Drop support of Tk 8.3 Jul 30, 2014
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jul 30, 2014

    The patch looks fine, please apply.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 30, 2014

    New changeset 1aa6ac23340d by Serhiy Storchaka in branch 'default':
    Issue bpo-22085: Dropped support of Tk 8.3 in Tkinter.
    http://hg.python.org/cpython/rev/1aa6ac23340d

    @ned-deily
    Copy link
    Member

    The checkin seems to have broken test_idle and test_ttk_guionly. Typical failure:

    ======================================================================
    ERROR: test_horizontal_range (tkinter.test.test_ttk.test_extensions.LabeledScaleTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/py/dev/3x/root/fwn/Library/Frameworks/pytest_10.9.framework/Versions/3.5/lib/python3.5/tkinter/test/test_ttk/test_extensions.py", line 112, in test_horizontal_range
        lscale = ttk.LabeledScale(from_=0, to=10)
      File "/py/dev/3x/root/fwn/Library/Frameworks/pytest_10.9.framework/Versions/3.5/lib/python3.5/tkinter/ttk.py", line 1508, in __init__
        self.__tracecb = self._variable.trace_variable('w', self._adjust)
      File "/py/dev/3x/root/fwn/Library/Frameworks/pytest_10.9.framework/Versions/3.5/lib/python3.5/tkinter/__init__.py", line 248, in trace_variable
        self._tk.call("trace", "add", "variable", self._name, mode, cbname)
    _tkinter.TclError: bad operation "w": must be array, read, unset, or write

    @ned-deily ned-deily reopened this Jul 30, 2014
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 31, 2014

    New changeset 9f333c06915f by Serhiy Storchaka in branch 'default':
    Back out of changes to Tkinter variables trace commands (issue bpo-22085).
    http://hg.python.org/cpython/rev/9f333c06915f

    @serhiy-storchaka
    Copy link
    Member Author

    Oh, I forgot about this difference. Of course we can convert input arguments to match new syntax, but "trace vinfo" and "trace info variable" return different results:

    % trace add variable foo {read write} {tracer foo}
    % trace info variable foo
    {{read write} {tracer foo}}
    % trace vinfo foo
    {rw {tracer foo}}

    We should add new methods for new trace commands.

    @serhiy-storchaka
    Copy link
    Member Author

    Yet one incompatibility is that callbacks set but old command are called with last argument one of 'r', 'w' or 'u', but callbacks set but old command are called with last argument one of 'read', 'write' or 'unset' (or 'array').

    @serhiy-storchaka
    Copy link
    Member Author

    I close this issue because don't want to change topic yet once (and one feature per issue). Separate bpo-22115 was opened for adding new trace methods.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 5, 2014

    New changeset 7ed237478fcc by Zachary Ware in branch 'default':
    Closes bpo-22136: Fix MSVC compiler warnings introduced by bpo-22085
    http://hg.python.org/cpython/rev/7ed237478fcc

    @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-tkinter type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants