New submission from E. Paine <paineeli...@gmail.com>:

For years, the Python docs for the tkinter.dnd module (and prior Tkdnd module) 
have said that it will become deprecated once it has been replaced by TkDND 
bindings (I can find it back in the Python 2.2 docs – 
https://docs.python.org/2.2/lib/node508.html). Despite this, I cannot find 
anywhere that the changes are actually proposed (have I missed something?!).

Attached is a git diff of a draft of proposed changes for the tkinter library, 
tkinter docs and Windows installer. The changes to the tkinter library are 
designed so that TkDND is not required where tcl/tk is installed, and in 
particular I check before any call is made to the library that it has been 
successfully loaded so as to give the user a more helpful error message.

I don’t feel it is ready to be a PR yet, unless that would be helpful, as I 
have not been able to extensively test on MacOS (I think I have sufficiently 
tested on Windows and Linux, though someone is bound to find a problem!). I 
also don’t feel it is ready for a PR because I would really appreciate if 
someone could take a serious look at the changes to the installer. I have got 
it working but I don’t really understand how the installer works and it is 
quite likely that the TkDND externals should have their own group and bindpath.

On a similar note to the Windows installer, how do we declare to the Linux 
package maintainers that TkDND is now an optional dependency of Python? I 
cannot find a file where optional dependencies are mentioned, so is there some 
mechanism to notify them of the changes?

I want to give credit where it is due and so it should be noted that new docs 
are very nearly just a “translation” of the TkDND man page and that the changes 
in the tkinter library are (loosely) based on the TkinterDND bindings.

I also have the relevant files for the cpython-source-deps and cpython-bin-deps 
repos, but would need someone with write permissions to create a ‘tkdnd’ branch 
in each of those repos before I create the PRs for them.

I am very new to contributing and so have a few questions on what is expected 
of me:
1. What is required of a news entry, and where would it go (I am assuming 
Misc\NEWS.d\next\Library)?
2. Could such a change, though not particularly large for code, be considered a 
“major new feature” (which would require a PEP)?

If people don’t generally want to add TkDND bindings to the tkinter library, I 
would instead propose that we remove the note that the tkinter.dnd module will 
be deprecated (but leave the note about it being experimental).

----------
components: Tkinter
files: tkdnd.diff
keywords: patch
messages: 370852
nosy: epaine
priority: normal
severity: normal
status: open
title: tkinter integrate TkDND support
type: enhancement
versions: Python 3.10
Added file: https://bugs.python.org/file49217/tkdnd.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40893>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to