Skip to content

bpo-34829: Add missing selection_ methods to the Tkinter Spinbox #9617

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

Merged
merged 6 commits into from
Oct 8, 2018

Conversation

j4321
Copy link
Contributor

@j4321 j4321 commented Sep 28, 2018

Add methods selection_from, selection_range, selection_present and selection_to to the Tkinter Spinbox
for consistency with the Entry widget.

https://bugs.python.org/issue34829

Implement the methods selection_from, selection_range, selection_present and selection_to for Tkinter Spinbox.
@j4321 j4321 changed the title bpo-34829: Add missing selction_ methods to the Tkinter Sponbox bpo-34829: Add missing selction_ methods to the Tkinter Spinbox Sep 28, 2018
@j4321 j4321 changed the title bpo-34829: Add missing selction_ methods to the Tkinter Spinbox bpo-34829: Add missing selection_ methods to the Tkinter Spinbox Oct 8, 2018
@serhiy-storchaka serhiy-storchaka added the type-feature A feature request or enhancement label Oct 8, 2018
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.

Please add tests, a news entry, a What's New entry, and add your name in Misc/ACKS.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

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.

Thank you @j4321. Would be nice to add also tests for existing selection methods and add the same or similar tests for the Entry widget.

Added methods :meth:`~tkinter.Spinbox.selection_from`,
:meth:`~tkinter.Spinbox.selection_present`,
:meth:`~tkinter.Spinbox.selection_range` and
:meth:`~tkinter.Spinbox.selection_to`,
Copy link
Member

Choose a reason for hiding this comment

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

The last comma is redundant.

Please add also (Contributed by ...)

@@ -0,0 +1,3 @@
Add methods ``selection_from``, ``selection_range``, ``selection_present``
and ``selection_to`` to the ``tkinter.Spinbox`` for consistency with the
``tkinter.Entry`` widget.
Copy link
Member

Choose a reason for hiding this comment

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

Please add Patch by ....

@serhiy-storchaka
Copy link
Member

Seems there are whitespace issues in rst files.

@j4321
Copy link
Contributor Author

j4321 commented Oct 8, 2018

@serhiy-storchaka Spinbox.selection_element() raises TclError: expected integer but got "none" while it should return the currently selected element according to the docstring. I think I have identified the origin of this issue in Spinbox.selection. Should I fix it in this pull request or should I open separate issue?

@serhiy-storchaka
Copy link
Member

This looks like a bug. Please open a separate issue.

in the :class:`tkinter.Spinbox` class.
:meth:`~tkinter.Spinbox.selection_range` and
:meth:`~tkinter.Spinbox.selection_to`
in the :class:`tkinter.Spinbox` class (Contributed by Juliette Monsel).
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 reference to the issue. Take other entries as a pattern.

@@ -0,0 +1,401 @@
****************************
Copy link
Member

Choose a reason for hiding this comment

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

Remove this file.

Misc/ACKS Outdated
@@ -1837,3 +1837,4 @@ Jelle Zijlstra
Gennadiy Zlobin
Doug Zongker
Peter Åstrand
Juliette Monsel
Copy link
Member

Choose a reason for hiding this comment

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

And the last. Names in this list are in rough alphabetical order by last names. Move your name to the correct place.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for all the mistakes and thanks for taking the time to point them out, I'll try to do everything right from the start next time.

@serhiy-storchaka serhiy-storchaka merged commit af5658a into python:master Oct 8, 2018
@serhiy-storchaka
Copy link
Member

Thank you for your contribution Juliette! Congratulate with your first commit to CPython!

@j4321 j4321 deleted the fix-issue-34829 branch October 8, 2018 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants