[issue44752] Tab completion executes @property getter function

2021-07-29 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Jack! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11 ___ Python tracker

[issue44752] Tab completion executes @property getter function

2021-07-29 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 93d90871d216625b8d9db0fa59693953353d19ae by Miss Islington (bot) in branch '3.9': bpo-44752: refactor part of rlcompleter.Completer.attr_matches (GH-27433) (GH-27446)

[issue44752] Tab completion executes @property getter function

2021-07-29 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset f8e13e35d12bee6e3447c791199522249ba7f05a by Miss Islington (bot) in branch '3.10': bpo-44752: refactor part of rlcompleter.Completer.attr_matches (GH-27433) (GH-27447)

[issue44752] Tab completion executes @property getter function

2021-07-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +25976 pull_request: https://github.com/python/cpython/pull/27447 ___ Python tracker ___

[issue44752] Tab completion executes @property getter function

2021-07-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +25975 pull_request: https://github.com/python/cpython/pull/27446 ___ Python tracker ___

[issue44752] Tab completion executes @property getter function

2021-07-29 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 6741794dd420c6b9775a188690dbf265037cd69f by Jack DeVries in branch 'main': bpo-44752: refactor part of rlcompleter.Completer.attr_matches (GH-27433) https://github.com/python/cpython/commit/6741794dd420c6b9775a188690dbf265037cd69f --

[issue44752] Tab completion executes @property getter function

2021-07-29 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset acaf3b959492e7a84dcc9d46101ed6dc313768c8 by Miss Islington (bot) in branch '3.9': bpo-44752: Make rlcompleter not call `@property` methods (GH-27401) (#27445) https://github.com/python/cpython/commit/acaf3b959492e7a84dcc9d46101ed6dc313768c8

[issue44752] Tab completion executes @property getter function

2021-07-29 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset d20f1095a6a51ee8f41ef445a009d26256e1fa61 by Miss Islington (bot) in branch '3.10': bpo-44752: Make rlcompleter not call `@property` methods (GH-27401) (GH-27444) https://github.com/python/cpython/commit/d20f1095a6a51ee8f41ef445a009d26256e1fa61

[issue44752] Tab completion executes @property getter function

2021-07-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +25974 pull_request: https://github.com/python/cpython/pull/27445 ___ Python tracker ___

[issue44752] Tab completion executes @property getter function

2021-07-29 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 50de8f74f8e92b20e76438c22b6a8f91afd6df75 by Jack DeVries in branch 'main': bpo-44752: Make rlcompleter not call `@property` methods (GH-27401) https://github.com/python/cpython/commit/50de8f74f8e92b20e76438c22b6a8f91afd6df75 -- nosy:

[issue44752] Tab completion executes @property getter function

2021-07-29 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +25973 pull_request: https://github.com/python/cpython/pull/27444 ___ Python tracker

[issue44752] Tab completion executes @property getter function

2021-07-28 Thread Jack DeVries
Change by Jack DeVries : -- pull_requests: +25962 pull_request: https://github.com/python/cpython/pull/27433 ___ Python tracker ___

[issue44752] Tab completion executes @property getter function

2021-07-27 Thread Ryan Pecor
Ryan Pecor added the comment: Wow, that was quick and the code looks clean too! Thanks for fixing that up! -- ___ Python tracker ___

[issue44752] Tab completion executes @property getter function

2021-07-27 Thread Jack DeVries
Jack DeVries added the comment: > Now that I see hasattr() uses getattr(), it looks like the tab completion > issue might not stem from line 155, but from line 180 > (https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/Lib/rlcompleter.py#L180) > where it calls

[issue44752] Tab completion executes @property getter function

2021-07-27 Thread Jack DeVries
Change by Jack DeVries : -- keywords: +patch pull_requests: +25934 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27401 ___ Python tracker ___

[issue44752] Tab completion executes @property getter function

2021-07-27 Thread Ryan Pecor
Ryan Pecor added the comment: Actually, hasattr() specifically states that it uses getattr() so that behavior is expected from getattr() so I will not be creating a separate issue for that. Now that I see hasattr() uses getattr(), it looks like the tab completion issue might not stem from

[issue44752] Tab completion executes @property getter function

2021-07-27 Thread Ryan Pecor
Ryan Pecor added the comment: It looks to me like the issue is caused by the eval() in line 155 of the rlcompleter.py file (https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/Lib/rlcompleter.py#L155) which runs the function in order to see if it runs or raises

[issue44752] Tab completion executes @property getter function

2021-07-27 Thread Jack DeVries
Jack DeVries added the comment: Woah, til the python shell has tab completion! This does seem like undesirable behavior. I'd like to work on a fix for this if that's all right, assuming that this behavior should not occur. I haven't exactly found where the tab autocomplete is implemented,

[issue44752] Tab completion executes @property getter function

2021-07-27 Thread Ryan Pecor
Ryan Pecor added the comment: I forgot to mention that I also added "~~~" to either side of the printed string every time it printed to help differentiate the printed string from commands that I typed into the interpreter. -- ___ Python tracker

[issue44752] Tab completion executes @property getter function

2021-07-27 Thread Ryan Pecor
New submission from Ryan Pecor : After making a class using the @property decorator to implement a getter, using tab completion that matches the getter function name executes the function. See below for example (line numbers added, indicates when the user presses the tab key): 1 >>>