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

bpo-33096 Modify ttk.Treeview.insert #6228

Merged
merged 6 commits into from
Mar 26, 2018

Conversation

plusminushalf
Copy link
Contributor

@plusminushalf plusminushalf commented Mar 25, 2018

Allow ttk.Treeview.insert to insert False iid.
Note iid=0 and iid=false would be same

https://bugs.python.org/issue33096

Allow ttk.Treeview.insert to insert False iid.
Note iid=0 and iid=false would be same
@plusminushalf plusminushalf force-pushed the fix-bpo-33096 branch 2 times, most recently from da8cef1 to d908060 Compare March 25, 2018 07:34
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A news entry shouldn't be added directly in the NEWS file. Instead it should be added in a separate file in the NEWS.d directory. You can use the blurb utility for creating it.

itemid = self.tv.insert('', 'end', 0.0)
self.assertEqual(itemid, '0.0')
# this is because False is resolveds to 0 and element with 0 id is already present
self.assertRaises(tkinter.TclError, self.tv.insert, '', '',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to wrap this line, it is not long enough.

Why the second argument of insert() is '' instead of 'end'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad this should be end only.

@serhiy-storchaka
Copy link
Member

Also please add your name in Misc/ACKS and "Patch by your name." at the end of a news entry.

@plusminushalf
Copy link
Contributor Author

My name is already in Misc/ACKS should I insert a duplicate entry?

@@ -0,0 +1,4 @@
Allow ttk.Treeview.insert to insert False iid.
Note iid=0 and iid=false would be same.
Patch by Garvit Khatri
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a period at the end.

@@ -0,0 +1,4 @@
Allow ttk.Treeview.insert to insert False iid.
Note iid=0 and iid=false would be same.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iid=False

@@ -0,0 +1,4 @@
Allow ttk.Treeview.insert to insert False iid.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to insert iid that has a false boolean value."

@serhiy-storchaka
Copy link
Member

No, one time is enough. 😄

@serhiy-storchaka serhiy-storchaka added type-bug An unexpected behavior, bug, or error needs backport to 3.6 labels Mar 25, 2018
@serhiy-storchaka serhiy-storchaka merged commit 3ab44c0 into python:master Mar 26, 2018
@miss-islington
Copy link
Contributor

Thanks @garvitdelhi for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-bot
Copy link

GH-6246 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 26, 2018
Allow ttk.Treeview.insert to insert iid that has a false boolean value.
Note iid=0 and iid=False would be same.
(cherry picked from commit 3ab44c0)

Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com>
@miss-islington
Copy link
Contributor

Sorry, @garvitdelhi and @serhiy-storchaka, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 3ab44c0783eebdff687014f7d14d5dec59b6bd39 2.7

@bedevere-bot
Copy link

GH-6247 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 26, 2018
Allow ttk.Treeview.insert to insert iid that has a false boolean value.
Note iid=0 and iid=False would be same.
(cherry picked from commit 3ab44c0)

Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com>
miss-islington added a commit that referenced this pull request Mar 26, 2018
Allow ttk.Treeview.insert to insert iid that has a false boolean value.
Note iid=0 and iid=False would be same.
(cherry picked from commit 3ab44c0)

Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com>
miss-islington added a commit that referenced this pull request Mar 26, 2018
Allow ttk.Treeview.insert to insert iid that has a false boolean value.
Note iid=0 and iid=False would be same.
(cherry picked from commit 3ab44c0)

Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com>
serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this pull request Mar 31, 2018
Allow ttk.Treeview.insert to insert iid that has a false boolean value.
Note iid=0 and iid=False would be same..
(cherry picked from commit 3ab44c0)

Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com>
@bedevere-bot
Copy link

GH-6326 is a backport of this pull request to the 2.7 branch.

serhiy-storchaka added a commit that referenced this pull request Mar 31, 2018
Allow ttk.Treeview.insert to insert iid that has a false boolean value.
Note iid=0 and iid=False would be same.
(cherry picked from commit 3ab44c0)

Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants