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-3405: Add support for user data of Tk virtual events to tkinter #7142

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mkiever
Copy link

@mkiever mkiever commented May 27, 2018

This adds Tk %d event field as 'detail' and 'user_data' attributes to tkinter events.

I have not yet changed the documentation, because I am not sure about the intent
of the table in "25.1.6.7. Bindings and Events" in tkinter documentation.
If supposed to be complete, I suggest also adding the other three missing fields (%#, %b, %D).

I have added a simple test of virtual events and the userdata attribute including bind/unbind.
To make the test possible I use a pump_events function found on
stackoverflow (https://stackoverflow.com/questions/4083796/how-do-i-run-unittest-on-a-tkinter-app/49028688#49028688).
Note, I tested this only on Debian Linux.
Also, I had spurious "Bad Drawable" errors from the X server running the tkinter unittest,
but I have those in the same way on the changed and unchanged Python.
Seems to be my non-mainstream setup (ctwm with interactive window placement).

This is my first pull request. Sorry, if I have forgotten obvious things.

https://bugs.python.org/issue3405

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

When your account is ready, please add a comment in this pull request
and a Python core developer will remove the CLA not signed label
to make the bot check again.

Thanks again to your contribution and we look forward to looking at it!

@mkiever
Copy link
Author

mkiever commented Jun 8, 2018

I see a "Contributor Form Received: Yes" now on my account on bpo. So CLA has arrived.

@koutoftimer
Copy link

koutoftimer commented Jun 17, 2020

@the-knights-who-say-ni , what is missing? Why it is not accepted yet?

ERROR: test_ignore (test.test_multiprocessing_forkserver.TestIgnoreEINTR)
FAIL: test_stdin_broken_pipe (test.test_asyncio.test_subprocess.SubprocessSafeWatcherTests)

Those erros are not related to tkinter

Copy link

@koutoftimer koutoftimer left a comment

Choose a reason for hiding this comment

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

Verified for Python 3.7.3 win64.

@aleroddepaz
Copy link

I have not seen any news about this issue after the migration, but it looks like this is the most complete patch. @serhiy-storchaka could anything else be done to help with this review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants