[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-05-05 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-05-05 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 3a04598f63960e72025a91c682aec51b6b460413 by Serhiy Storchaka 
(Cheryl Sabella) in branch '2.7':
bpo-32857: Raise error when tkinter after_cancel() is called with None. 
(GH-5701) (GH-6620)
https://github.com/python/cpython/commit/3a04598f63960e72025a91c682aec51b6b460413


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-04-27 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
pull_requests: +6316

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-03-04 Thread miss-islington

miss-islington  added the comment:


New changeset a5303dd9c263b337f02dda0038f2f5a10208140c by Miss Islington (bot) 
in branch '3.7':
bpo-32857: Raise error when tkinter after_cancel() is called with None. 
(GH-5701)
https://github.com/python/cpython/commit/a5303dd9c263b337f02dda0038f2f5a10208140c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-03-04 Thread miss-islington

miss-islington  added the comment:


New changeset 73a43960c7be50e136c5482404980175cb99f611 by Miss Islington (bot) 
in branch '3.6':
bpo-32857: Raise error when tkinter after_cancel() is called with None. 
(GH-5701)
https://github.com/python/cpython/commit/73a43960c7be50e136c5482404980175cb99f611


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-03-04 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5739

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-03-04 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5738

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-03-04 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 74382a3f175ac285cc924a73fd758e8dc3cc41bb by Serhiy Storchaka 
(Cheryl Sabella) in branch 'master':
bpo-32857: Raise error when tkinter after_cancel() is called with None. 
(GH-5701)
https://github.com/python/cpython/commit/74382a3f175ac285cc924a73fd758e8dc3cc41bb


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-02-22 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

I've added the tests for `after` and `after_idle`.  I used `update` and 
`update_idletasks` to make sure they processed.  Even scheduling an after event 
for 0 ms didn't guarantee it would process, but I wasn't sure if there was a 
better way besides `update` to get it to process?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-02-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

It's up to you.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-02-19 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

I had also noticed that the `after` commands didn't have tests.  Did you want 
me to add tests in a separate issue before this one is merged or did you want 
me to add tests under this PR?

Thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-02-19 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I have noticed that there are no tests for after() and after_cancel(). Maybe 
first write tests for them and later add a test for this specific issue to them?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-02-16 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
keywords: +patch
pull_requests: +5490
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-02-16 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
stage:  -> needs patch
versions: +Python 2.7, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-02-16 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I prefer the option 1. Even if calling after_cancel(None) would make sense, 
currently it silently does wrong things, and it is more errorproof to make it 
raising an exception.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-02-16 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

I can open a PR for this, but thought it might be best to discuss it first as 
far as what should happen with None.

1. Raise an error that it's an incorrect call.
2. Ignore it and just return.
3. Loop through all the events and after_cancel each one. 

Tcl allows the after_cancel call to be an id or script(s), but they don't have 
functionality that would cancel everything (unless all the `script` values were 
sent).

FWIW, if no parameters are sent, this is the Tcl code:
if (objc < 3) {
Tcl_WrongNumArgs(interp, 2, objv, "id|command");
return TCL_ERROR;
}

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-02-16 Thread Cheryl Sabella

New submission from Cheryl Sabella :

This was discovered while working on issue32839.  An old comment added for 
issue763637 resulted in further research and it was determined that the comment:

! data = self.tk.call('after', 'info', id)
! # In Tk 8.3, splitlist returns: (script, type)
! # In Tk 8.4, splitlist returns: (script,)

wasn't correct.  The underlying difference is that the call to 'after info' 
returns different results depending on the way it's called.  If it's called 
with an 'id', it will return a tuple of (script, type) if the id is valid or a 
TclError if the id isn't valid.  However, if id is None, then 'after info' 
returns a tuple of all the event ids for the widget.  In the case of the 
original bug in issue763637, the reported message shows the return value of 
`('after#53',)`, which is definitely an after event id and not a (script,) 
tuple.

Serhiy mentions on issue32839 that the current code also deletes the script for 
the first event if after_cancel is called with None.
https://bugs.python.org/issue32839#msg312199

--
components: Tkinter
messages: 312231
nosy: csabella
priority: normal
severity: normal
status: open
title: tkinter after_cancel does not behave correctly when called with id=None
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com