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

Py3 Python console: tab completion no longer shows private attributes #9918

Closed
LeonarddeR opened this issue Jul 12, 2019 · 8 comments
Closed

Comments

@LeonarddeR
Copy link
Collaborator

LeonarddeR commented Jul 12, 2019

Is your feature request related to a problem? Please describe.

In python 2, pressing tab in the python console gives us auto completion for an object. For example, typing nav. followed with tab gives us all the properties on the cached navigator object, including the ones starting with one or two underscores. In python 3 however, these attributes are hidden.

Describe the solution you'd like

I think I like this new approach, but it should be documented as a change in the section of changes for developers.

Describe alternatives you've considered

Restore the python 2 behavior.

@LeonarddeR LeonarddeR added this to To do in Update NVDA to Python 3 via automation Jul 12, 2019
@JulienCochuyt
Copy link
Collaborator

JulienCochuyt commented Jul 14, 2019

I do not reproduce on latest threshold snapshot (18031 - ae3747a).
In this version, tab completion still shows all attributes, including single and double leading underscores.
Did you witness this behavior with latest threshold_py3_staging source instead?

IMHO, if we have something to fix here, an ideal behavior would be as follows:

  • nav. + TAB : list all "public" members
  • nav._ + TAB : list all single leading underscore attributes
  • nav.__ + TAB : list all double leading underscore attributes

@LeonarddeR
Copy link
Collaborator Author

LeonarddeR commented Jul 14, 2019 via email

@JulienCochuyt
Copy link
Collaborator

My bad. I indeed reproduce - and quite like it - on latest threshold_py3_staging snapshot (18054 - 92458e9).
The behavior is exactly the one I naively stated as being my ideal one in my previous comment.

+1 for keeping this behavior and documenting it as an improvement.

@LeonarddeR
Copy link
Collaborator Author

cc @feerrenrut

@XLTechie
Copy link
Contributor

XLTechie commented Jul 15, 2019 via email

@feerrenrut
Copy link
Contributor

Yes, I'm happy with this also. Happy to take a suggestion for the changelog. Does the userguide/devguide need an update?

@JulienCochuyt
Copy link
Collaborator

Yes, I'm happy with this also. Happy to take a suggestion for the changelog. Does the userguide/devguide need an update?

The userGuide only points to the devGuide: No impact needed IMHO.
Proposed update to the devGuide: PR #9935

Proposed changelog entry:

Section: Changes for developpers
The tab-completion in the Python console is now smarter. Refer to the Developer Guide for more details.

@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Jul 19, 2019
feerrenrut pushed a commit that referenced this issue Jul 19, 2019
In the Python console, the tab-completion is smarter with Python 3.
Auto complete does not suggest attribute names starting with underscore until an underscore is typed, or a double underscore for attributes with two.

Fixes #9918
@LeonarddeR
Copy link
Collaborator Author

LeonarddeR commented Jul 19, 2019

Fixed in commit 6c46739 via PR #9935

Update NVDA to Python 3 automation moved this from To do to Done Jul 19, 2019
josephsl added a commit to josephsl/nvda that referenced this issue Jul 19, 2019
josephsl added a commit to josephsl/nvda that referenced this issue Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants