Merge pull request #3211 from xonsh/fix_DAP_completion

Add `__dir__` to `DynamicAccessProxy`
This commit is contained in:
David Dotson 2019-07-13 13:36:33 -07:00 committed by GitHub
commit 8576e9c22e
Failed to generate hash of commit
3 changed files with 29 additions and 1 deletions

View file

@ -0,0 +1,24 @@
**Added:**
* <news item>
**Changed:**
* <news item>
**Deprecated:**
* <news item>
**Removed:**
* <news item>
**Fixed:**
* Added proxied ``__dir__`` method to ``DynamicAccessProxy`` to restore
tab-completion for objects that use the proxy (especially ``events``)
**Security:**
* <news item>

View file

@ -13,7 +13,7 @@ import xonsh.main
from xonsh.main import XonshMode
from xonsh.environ import Env
import pytest
from tools import TEST_DIR
from tools import TEST_DIR, skip_if_on_windows
def Shell(*args, **kwargs):
@ -132,6 +132,7 @@ def test_premain_timings_arg(shell):
xonsh.main.premain(["--timings"])
@skip_if_on_windows
def test_xonsh_failback(shell, monkeypatch, monkeypatch_stderr):
failback_checker = []

View file

@ -1489,6 +1489,9 @@ class DynamicAccessProxy:
def __call__(self, *args, **kwargs):
return self.obj.__call__(*args, **kwargs)
def __dir__(self):
return self.obj.__dir__()
class DeprecationWarningProxy:
"""Proxies access, but warns in the process."""