many fixes

This commit is contained in:
Anthony Scopatz 2018-10-01 15:48:47 -04:00
parent 7423238f94
commit 61c27ec365
4 changed files with 10 additions and 8 deletions

View file

@ -14,7 +14,7 @@
.. code-block:: sh
$ true && false || echo a
$ true && false || echo a
xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True
NameError: name 'false' is not defined
@ -27,7 +27,7 @@
.. code-block:: sh
$ true && false || echo a
$ true && false || echo a
a
$ echo; echo && echo a

View file

@ -2,14 +2,14 @@
**Changed:** None
* All `__xonsh_*__` builtins have been migrated to a `XonshSession` instance at
`__xonsh__`. E.g. `__xonsh_env__` is now `__xonsh__.env`.
* All ``__xonsh_*__`` builtins have been migrated to a ``XonshSession`` instance at
``__xonsh__``. E.g. ``__xonsh_env__`` is now ``__xonsh__.env``.
**Deprecated:** None
* All `__xonsh_*__` builtins are deprected. Instead, the corresponding
`__xonsh__.*` accessor should be used. The existing `__xonsh_*__` accessors still work,
but issue annoying warnings.
* All ``__xonsh_*__`` builtins are deprected. Instead, the corresponding
``__xonsh__.*`` accessor should be used. The existing ``__xonsh_*__`` accessors
still work, but issue annoying warnings.
**Removed:** None

View file

@ -108,7 +108,8 @@ def xonsh_builtins(xonsh_events):
builtins.events = xonsh_events
yield builtins
for attr in set(dir(builtins)) - old_builtins:
delattr(builtins, attr)
if hasattr(builtins, attr):
delattr(builtins, attr)
tasks.clear() # must to this to enable resetting all_jobs

View file

@ -1500,6 +1500,7 @@ def load_proxies():
'events', '__xonsh__.builtins.events'),
]
#print([s for s in dir(builtins) if s.startswith('_')])
for obj, badname, goodname in mapping:
proxy = ProxyWarning(obj, badname, goodname)
setattr(builtins, badname, proxy)