-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
tkinter with wantobjects=False has been broken for some time #47265
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
Comments
This affects only py3k, but apparently tkinter has been in this const char *s = Tcl_GetStringResult(self->interp);
const char *p = s; res = PyUnicode_FromStringAndSize(s, (int)(p-s)); and I was wondering how could res not end up being an empty string const char *p = strchr(s, '\0'); I've attached this correction. Not sure if it is the best way to solve |
I think in Python 3, the whole wantobjects=False case should go. It was |
I will agree that wantobjects=False should go, it is also discouraged to But something should be done at FromObj since it accesses Tcl_Obj fields |
I've removed wantobjects and substituted some internalRep usage too. |
Looks as bpo-18877 is related to this. I have proposed for it a little different patch than first Guilherme's patch. As for removing wantobjects, we perhaps can do this only in 3.4. |
New changeset 08c45e18e7b2 by Serhiy Storchaka in branch '3.3': New changeset 65dd0de6b4a5 by Serhiy Storchaka in branch 'default': |
Here is a patch which change the default value for the wantobjects parameter of _tkinter.create() and adds deprecation warnings. |
You again forgot to attach a patch :) . |
Oh, thanks Arfrever. |
I am in the process of reviewing this patch, but I don't know what "wantobjects" does. I can make a guess, I think it is a hack to make tcl objects work in Python. I am guessing this is less needed in Python 3.4, but still has some dependencies. If we can add in the documentation of what "wantobjects" is and why it is being depreciated somewhere, that would be great. I would do it myself, but I do need some direction. I ran the tests, and it seems to run fine. The patch didn't have any new tests. We should add one that checks if the depreciation is working. |
@Lita.Cho: (I'd like to this on the web but the links are still broken after the website port) if you search for |
Now I think we shouldn't deprecate and remove wantobjects=False. Tkinter was partially broken with wantobjects=False, on other hand, it was partially broken with wantobjects=True. Many bugs was fixed last months, all tests now work with wantobjects=False, and I hope Tkinter now correctly supports both mode. Besides using in old third-party code, this parameter is very helpful for testing. Tcl/Tk changes internal details from release to release, so when in one release Tk function returns list or integer, in other release it can return special object ('dict' or 'pixel'). Tkinter should be more stable against changing of return type, and wantobjects=False helps in detecting some such cases. I propose to close this issue as fixed. |
Serhiy, does that mean this is fixed the way it is? Do I need to do anything else to close out this issue? It looks like wantobjects is set to False, currently. |
New changeset c69e8ea3bf10 by Serhiy Storchaka in branch 'default': |
Lita Cho, originally reported issue is fixed. I asked Martin (and Guilherme if he is here). Are you agree to close this issue? See bpo-21585 about extending testing. |
That's perfect. I agree that this issue is closed! :) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: