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

Add tkFileDialog to future.moves.tkinter.filedialog #532

Merged
merged 1 commit into from
Feb 5, 2020
Merged

Add tkFileDialog to future.moves.tkinter.filedialog #532

merged 1 commit into from
Feb 5, 2020

Conversation

KyleKing
Copy link
Contributor

@KyleKing KyleKing commented Dec 6, 2019

TLDR: future.moves.tkinter.filedialog needs to import tkFileDialog


With the current version of future (0.18.2) installed, this works

from tkinter import filedialog
filedialog.askopenfilename()

However, this will fail

from future.moves.tkinter import filedialog
filedialog.askopenfilename()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'askopenfilename'

The problem was patched in addressing #233 (commit a6ed514), but the future.moves.tkinter.filedialog wasn't updated. In Python2, askopenfilename is part of tkFileDialog. Both FileDialog and tkFileDialog were combined to create tkinter.filedialog in Python3.

@KyleKing
Copy link
Contributor Author

@PythonCharmers, let me know if there is anything I should change on this commit

@jmadler jmadler merged commit 741722d into PythonCharmers:master Feb 5, 2020
@jmadler
Copy link
Contributor

jmadler commented Feb 5, 2020

Thanks for contributing!

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

Successfully merging this pull request may close these issues.

2 participants