Hello community, here is the log from the commit of package xonsh for openSUSE:Factory checked in at 2019-08-05 10:38:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xonsh (Old) and /work/SRC/openSUSE:Factory/.xonsh.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xonsh" Mon Aug 5 10:38:33 2019 rev:18 rq:720288 version:0.9.9 Changes: -------- --- /work/SRC/openSUSE:Factory/xonsh/xonsh.changes 2019-07-18 15:20:05.396147599 +0200 +++ /work/SRC/openSUSE:Factory/.xonsh.new.4126/xonsh.changes 2019-08-05 10:38:35.783318516 +0200 @@ -1,0 +2,25 @@ +Thu Jul 25 19:00:56 UTC 2019 - Sebastian Wagner <sebix+novell....@sebix.at> + +- update to version 0.9.9: + - Added: + - $COMPLETION_IN_THREAD: When this is True, background theads is used for completion. + - Open man page when requesting help for subprocess commands, e.g. using ``sh?`` + - Add several cmds/tools for predict list + - Changed: + - Changed ``XonshSession.link_builtins`` to set a ``DynamicAccessProxy`` for each ``builtin`` link + - ``events`` is now unlinked from ``builtins`` + - Removed: + - Removed ``DeprecationWarningProxy``; no longer needed + - Removed ``load_proxies`` and ``unload_proxies``; moved functionality to ``XonshSession.link_builtins``, ``XonshSession.unlink_builtins``, respectively. + - Removed deprecated ``builtin.__xonsh_*__`` alises, please use ``builtins.__xonsh__.*`` instead. + - Fixed: + - Added proxied ``__dir__`` method to ``DynamicAccessProxy`` to restore + tab-completion for objects that use the proxy (especially ``events``) + - Avoid displaying finished tasks in title. + - ``inspect.getsource`` now works correctly and the ``__xonsh__.execer`` resets + ``<filename>`` correctly. This was causing several very strange buggy + behaviors. + - Hitting ``Enter`` while ``$VI_MODE=True`` now executes the current code block + irrespective of cursor position + +------------------------------------------------------------------- Old: ---- xonsh-0.9.8.tar.gz New: ---- xonsh-0.9.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xonsh.spec ++++++ --- /var/tmp/diff_new_pack.tvU4sq/_old 2019-08-05 10:38:36.407318440 +0200 +++ /var/tmp/diff_new_pack.tvU4sq/_new 2019-08-05 10:38:36.407318440 +0200 @@ -17,7 +17,7 @@ Name: xonsh -Version: 0.9.8 +Version: 0.9.9 Release: 0 Summary: A general purpose, Python-ish shell License: BSD-3-Clause AND BSD-2-Clause ++++++ xonsh-0.9.8.tar.gz -> xonsh-0.9.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/.appveyor.yml new/xonsh-0.9.9/.appveyor.yml --- old/xonsh-0.9.8/.appveyor.yml 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/.appveyor.yml 2019-07-20 00:13:20.000000000 +0200 @@ -1,4 +1,4 @@ -version: 0.9.8.{build} +version: 0.9.9.{build} os: Windows Server 2012 R2 environment: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/.authors.yml new/xonsh-0.9.9/.authors.yml --- old/xonsh-0.9.8/.authors.yml 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/.authors.yml 2019-07-20 00:13:20.000000000 +0200 @@ -9,7 +9,7 @@ - '@vaaaaanquish' - vaaaaanquish - 6syun9 - num_commits: 14 + num_commits: 15 first_commit: 2018-07-17 01:14:04 github: vaaaaanquish - name: Dan Allan @@ -60,7 +60,8 @@ - gfors...@users.noreply.github.com - gilbert.fors...@capitalone.com - gfors...@gwu.edu - num_commits: 505 + - g...@forsyth.dev + num_commits: 509 first_commit: 2015-10-19 16:04:32 github: gforsyth - name: Morten Enemark Lund @@ -431,7 +432,7 @@ github: funkyfuture - name: Anthony Scopatz email: scop...@gmail.com - num_commits: 2485 + num_commits: 2491 first_commit: 2015-01-21 17:04:13 github: scopatz - name: anatoly techtonik @@ -883,7 +884,7 @@ first_commit: 2015-03-17 03:34:36 - name: David Dotson email: dot...@gmail.com - num_commits: 15 + num_commits: 19 first_commit: 2018-07-14 12:53:07 github: dotsdl - name: anula @@ -1014,3 +1015,18 @@ num_commits: 1 first_commit: 2019-06-18 12:00:16 github: dyuri +- name: Ke Zhang + email: kezh...@bnl.gov + aliases: + - ke-zhang-rd + num_commits: 1 + first_commit: 2019-07-13 15:02:41 +- name: Daniel Smith + email: malor...@me.com + num_commits: 1 + first_commit: 2019-07-13 12:11:59 +- name: Alexander Steffen + email: devel.20.webmeis...@spamgourmet.com + num_commits: 4 + first_commit: 2019-07-13 04:44:55 + github: webmeister diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/.landscape.yaml new/xonsh-0.9.9/.landscape.yaml --- old/xonsh-0.9.8/.landscape.yaml 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/.landscape.yaml 1970-01-01 01:00:00.000000000 +0100 @@ -1,35 +0,0 @@ -doc-warnings: yes -test-warnings: yes -strictness: veryhigh -max-line-length: 90 -autodetect: yes -ignore-paths: - - docs/conf.py - - xonsh/ply - -python-targets: - - 3 - -pylint: - disable: - - super-on-old-class - - old-style-class - - global-variable-not-assigned - - pointless-except - - unused-argument - - protected-access - - global-statement - - eval-used - - exec-used - - too-many-lines - - import-self - - redefined-outer-name - - invalid-name - - too-few-public-methods - - no-init - - star-args - -mccabe: - disable: - - MC0000 # not Py3k compatible - - MC0001 # silly cyclomatic complexity diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/.mailmap new/xonsh-0.9.9/.mailmap --- old/xonsh-0.9.8/.mailmap 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/.mailmap 2019-07-20 00:13:20.000000000 +0200 @@ -14,6 +14,7 @@ Gil Forsyth <gilfors...@gmail.com> Gil Forsyth <gfors...@users.noreply.github.com> Gil Forsyth <gilfors...@gmail.com> Gil Forsyth <gilbert.fors...@capitalone.com> Gil Forsyth <gilfors...@gmail.com> Gil Forsyth <gfors...@gwu.edu> +Gil Forsyth <gilfors...@gmail.com> Gil Forsyth <g...@forsyth.dev> Morten Enemark Lund <mel...@gmail.com> Konstantinos Tsakiltzidis <laer...@gmail.com> laerus <laer...@gmail.com> Jamie Bliss <astronouth7...@gmail.com> James Bliss <jamie.bl...@ilq.com> @@ -41,10 +42,10 @@ Joel Gerber <j...@grrbrr.ca> Bernardas Ališauskas <bernardas.alisaus...@gmail.com> Bernardas <bernardas.alisaus...@gmail.com> Derek Thomas <derekatho...@gmail.com> +David Dotson <dot...@gmail.com> VHarisop <the.machine.hea...@gmail.com> JohnLunzer <lun...@gmail.com> jlunz <lunz8...@usroc1miniwaas.corp.exelisinc.com> Paul Goelz <s8pag...@stud.uni-saarland.de> -David Dotson <dot...@gmail.com> vaaaaanquish <6sy...@gmail.com> @vaaaaanquish <6sy...@gmail.com> vaaaaanquish <6sy...@gmail.com> vaaaaanquish <6sy...@gmail.com> vaaaaanquish <6sy...@gmail.com> 6syun9 <6sy...@gmail.com> @@ -115,6 +116,7 @@ Fabien Dubosson <fabien.dubos...@gmail.com> Kale Kundert <k...@thekunderts.net> Andrés García García <a.garcia230...@gmail.com> Ad115 <a.garcia230...@gmail.com> +Alexander Steffen <devel.20.webmeis...@spamgourmet.com> Jan Schulz <j...@gmx.net> Nickolay Bukreyev <bukni...@yandex.ru> Samuel Dion-Girardeau <samuel.diongirard...@gmail.com> @@ -212,5 +214,7 @@ Troy de Freitas <9503857+nt...@users.noreply.github.com> Rodrigo Oliveira <rodrigo.olive...@byne.com.br> Gyuri Horak <dy...@horak.hu> +Ke Zhang <kezh...@bnl.gov> ke-zhang-rd <kezh...@bnl.gov> +Daniel Smith <malor...@me.com> goodboy <tgood...@users.noreply.github.com> Atsushi Morimoto <atsushi.morim...@dena.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/AUTHORS.rst new/xonsh-0.9.9/AUTHORS.rst --- old/xonsh-0.9.8/AUTHORS.rst 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/AUTHORS.rst 2019-07-20 00:13:20.000000000 +0200 @@ -28,10 +28,10 @@ * Joel Gerber * Bernardas Ališauskas * Derek Thomas +* David Dotson * VHarisop * JohnLunzer * Paul Goelz -* David Dotson * vaaaaanquish * Frank Sachsenheim * Kurtis Rader @@ -100,6 +100,7 @@ * Fabien Dubosson * Kale Kundert * Andrés García García +* Alexander Steffen * Jan Schulz * Nickolay Bukreyev * Samuel Dion-Girardeau @@ -197,6 +198,8 @@ * Troy de Freitas * Rodrigo Oliveira * Gyuri Horak +* Ke Zhang +* Daniel Smith * goodboy * Atsushi Morimoto diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/CHANGELOG.rst new/xonsh-0.9.9/CHANGELOG.rst --- old/xonsh-0.9.8/CHANGELOG.rst 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/CHANGELOG.rst 2019-07-20 00:13:20.000000000 +0200 @@ -4,6 +4,49 @@ .. current developments +v0.9.9 +==================== + +**Added:** + +* $COMPLETION_IN_THREAD: When this is True, background theads is used for completion. +* Open man page when requesting help for subprocess commands, e.g. using ``sh?`` +* Add several cmds/tools for predict list + +**Changed:** + +* Changed ``XonshSession.link_builtins`` to set a ``DynamicAccessProxy`` for each ``builtin`` link +* ``events`` is now unlinked from ``builtins`` + +**Removed:** + +* Removed ``DeprecationWarningProxy``; no longer needed +* Removed ``load_proxies`` and ``unload_proxies``; moved functionality to ``XonshSession.link_builtins``, ``XonshSession.unlink_builtins``, respectively. +* Removed deprecated ``builtin.__xonsh_*__`` alises, please use ``builtins.__xonsh__.*`` instead. + +**Fixed:** + +* Added proxied ``__dir__`` method to ``DynamicAccessProxy`` to restore + tab-completion for objects that use the proxy (especially ``events``) +* Avoid displaying finished tasks in title. +* ``inspect.getsource`` now works correctly and the ``__xonsh__.execer`` resets + ``<filename>`` correctly. This was causing several very strange buggy + behaviors. +* Hitting ``Enter`` while ``$VI_MODE=True`` now executes the current code block + irrespective of cursor position + +**Authors:** + +* Anthony Scopatz +* Gil Forsyth +* David Dotson +* vaaaaanquish +* Alexander Steffen +* Ke Zhang +* Daniel Smith + + + v0.9.8 ==================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/CONTRIBUTING.rst new/xonsh-0.9.9/CONTRIBUTING.rst --- old/xonsh-0.9.8/CONTRIBUTING.rst 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/CONTRIBUTING.rst 2019-07-20 00:13:20.000000000 +0200 @@ -101,15 +101,14 @@ * Use absolute imports (``import xonsh.tools``) rather than explicit relative imports (``import .tools``). Implicit relative imports (``import tools``) are never allowed. -* Use ``'single quotes'`` for string literals, and - ``"""triple double quotes"""`` for docstrings. Double quotes are allowed to - prevent single quote escaping, e.g. ``"Y'all c'mon o'er here!"`` +* Use ``"double quotes"`` for string literals, and + ``"""triple double quotes"""`` for docstrings. * We use sphinx with the numpydoc extension to autogenerate API documentation. Follow the `numpydoc`_ standard for docstrings. * Simple functions should have simple docstrings. * Lines should be at most 80 characters long. The 72 and 79 character recommendations from PEP8 are not required here. -* All Python code should be compliant with Python 3.4+. At some +* All Python code should be compliant with Python 3.5+. At some unforeseen date in the future, Python 2.7 support *may* be supported. * Tests should be written with pytest using a procedural style. Do not use unittest directly or write tests in an object-oriented style. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/tests/test_main.py new/xonsh-0.9.9/tests/test_main.py --- old/xonsh-0.9.8/tests/test_main.py 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/tests/test_main.py 2019-07-20 00:13:20.000000000 +0200 @@ -13,7 +13,7 @@ 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 @@ xonsh.main.premain(["--timings"]) +@skip_if_on_windows def test_xonsh_failback(shell, monkeypatch, monkeypatch_stderr): failback_checker = [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/xonsh/__init__.py new/xonsh-0.9.9/xonsh/__init__.py --- old/xonsh-0.9.8/xonsh/__init__.py 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/xonsh/__init__.py 2019-07-20 00:13:20.000000000 +0200 @@ -1,4 +1,4 @@ -__version__ = "0.9.8" +__version__ = "0.9.9" # amalgamate exclude jupyter_kernel parser_table parser_test_table pyghooks diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/xonsh/built_ins.py new/xonsh-0.9.9/xonsh/built_ins.py --- old/xonsh-0.9.8/xonsh/built_ins.py 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/xonsh/built_ins.py 2019-07-20 00:13:20.000000000 +0200 @@ -563,6 +563,11 @@ raise XonshError(e.format(self.cmd[0])) except FileNotFoundError: cmd0 = self.cmd[0] + if len(self.cmd) == 1 and cmd0.endswith("?"): + with contextlib.suppress(OSError): + return self.cls( + ["man", cmd0.rstrip("?")], bufsize=bufsize, **kwargs + ) e = "xonsh: subprocess mode: command not found: {0}".format(cmd0) env = builtins.__xonsh__.env sug = suggest_commands(cmd0, env, builtins.aliases) @@ -1319,11 +1324,7 @@ scope. Likely useful in testing. """ load_builtins(execer=execer) - # temporary shims for old __xonsh_*__ builtins - load_proxies() yield - # temporary shims for old __xonsh_*__ builtins - unload_proxies() unload_builtins() @@ -1401,12 +1402,17 @@ def link_builtins(self, execer=None): # public built-ins - builtins.XonshError = self.builtins.XonshError - builtins.XonshCalledProcessError = self.builtins.XonshCalledProcessError - builtins.evalx = None if execer is None else execer.eval - builtins.execx = None if execer is None else execer.exec - builtins.compilex = None if execer is None else execer.compile - builtins.events = self.builtins.events + proxy_mapping = { + "XonshError": "__xonsh__.builtins.XonshError", + "XonshCalledProcessError": "__xonsh__.builtins.XonshCalledProcessError", + "evalx": "__xonsh__.builtins.evalx", + "execx": "__xonsh__.builtins.execx", + "compilex": "__xonsh__.builtins.compilex", + "events": "__xonsh__.builtins.events", + } + for refname, objname in proxy_mapping.items(): + proxy = DynamicAccessProxy(refname, objname) + setattr(builtins, refname, proxy) # sneak the path search functions into the aliases # Need this inline/lazy import here since we use locate_binary that @@ -1424,6 +1430,7 @@ "execx", "compilex", "default_aliases", + "events", ] for name in names: @@ -1489,168 +1496,5 @@ def __call__(self, *args, **kwargs): return self.obj.__call__(*args, **kwargs) - -class DeprecationWarningProxy: - """Proxies access, but warns in the process.""" - - def __init__(self, oldname, newname): - super().__setattr__("oldname", oldname) - super().__setattr__("newname", newname) - - @property - def obj(self): - """Dynamically grabs object""" - names = self.newname.split(".") - obj = builtins - for name in names: - obj = getattr(obj, name) - return obj - - def warn(self): - """Issues deprecation warning.""" - warnings.warn( - "{} has been deprecated, please use {} instead.".format( - self.oldname, self.newname - ), - DeprecationWarning, - stacklevel=3, - ) - - def __getattr__(self, name): - self.warn() - return getattr(self.obj, name) - - def __setattr__(self, name, value): - self.warn() - return super().__setattr__(self.obj, name, value) - - def __delattr__(self, name): - self.warn() - return delattr(self.obj, name) - - def __getitem__(self, item): - self.warn() - return self.obj.__getitem__(item) - - def __setitem__(self, item, value): - self.warn() - return self.obj.__setitem__(item, value) - - def __delitem__(self, item): - self.warn() - del self.obj[item] - - def __call__(self, *args, **kwargs): - self.warn() - return self.obj.__call__(*args, **kwargs) - - -def load_proxies(): - """Loads builtin dynamic access proxies. - Also puts temporary shims in place for `__xonsh_*__` builtins. - """ - proxy_mapping = { - "XonshError": "__xonsh__.builtins.XonshError", - "XonshCalledProcessError": "__xonsh__.builtins.XonshCalledProcessError", - "evalx": "__xonsh__.builtins.evalx", - "execx": "__xonsh__.builtins.execx", - "compilex": "__xonsh__.builtins.compilex", - "events": "__xonsh__.builtins.events", - } - for refname, objname in proxy_mapping.items(): - proxy = DynamicAccessProxy(refname, objname) - setattr(builtins, refname, proxy) - - deprecated_mapping = { - "__xonsh_env__": "__xonsh__.env", - "__xonsh_history__": "__xonsh__.history", - "__xonsh_ctx__": "__xonsh__.ctx", - "__xonsh_help__": "__xonsh__.help", - "__xonsh_superhelp__": "__xonsh__.superhelp", - "__xonsh_pathsearch__": "__xonsh__.pathsearch", - "__xonsh_globsearch__": "__xonsh__.globsearch", - "__xonsh_regexsearch__": "__xonsh__.regexsearch", - "__xonsh_glob__": "__xonsh__.glob", - "__xonsh_expand_path__": "__xonsh__.expand_path", - "__xonsh_exit__": "__xonsh__.exit", - "__xonsh_stdout_uncaptured__": "__xonsh__.stdout_uncaptured", - "__xonsh_stderr_uncaptured__": "__xonsh__.stderr_uncaptured", - "__xonsh_subproc_captured_stdout__": "__xonsh__.subproc_captured_stdout", - "__xonsh_subproc_captured_inject__": "__xonsh__.subproc_captured_inject", - "__xonsh_subproc_captured_object__": "__xonsh__.subproc_captured_object", - "__xonsh_subproc_captured_hiddenobject__": "__xonsh__.subproc_captured_hiddenobject", - "__xonsh_subproc_uncaptured__": "__xonsh__.subproc_uncaptured", - "__xonsh_execer__": "__xonsh__.execer", - "__xonsh_commands_cache__": "__xonsh__.commands_cache", - "__xonsh_all_jobs__": "__xonsh__.all_jobs", - "__xonsh_ensure_list_of_strs__": "__xonsh__.ensure_list_of_strs", - "__xonsh_list_of_strs_or_callables__": "__xonsh__.list_of_strs_or_callables", - "__xonsh_list_of_list_of_strs_outer_product__": "__xonsh__.list_of_list_of_strs_outer_product", - "__xonsh_completers__": "__xonsh__.completers", - "__xonsh_call_macro__": "__xonsh__.call_macro", - "__xonsh_enter_macro__": "__xonsh__.enter_macro", - "__xonsh_path_literal__": "__xonsh__.path_literal", - } - for badname, goodname in deprecated_mapping.items(): - proxy = DeprecationWarningProxy(badname, goodname) - setattr(builtins, badname, proxy) - - if hasattr(builtins.__xonsh__, "pyexit"): - builtins.__xonsh_pyexit__ = DeprecationWarningProxy( - "builtins.__xonsh_pyexit__", "builtins.__xonsh__.pyexit" - ) - if hasattr(builtins.__xonsh__, "quit"): - builtins.__xonsh_pyquit__ = DeprecationWarningProxy( - "builtins.__xonsh_pyquit__", "builtins.__xonsh__.pyquit" - ) - - -def unload_proxies(): - """Removes the xonsh builtins (proxies) from the Python builtins. - """ - if hasattr(builtins, "__xonsh_pyexit__"): - builtins.exit = builtins.__xonsh_pyexit__ - if hasattr(builtins, "__xonsh_pyquit__"): - builtins.quit = builtins.__xonsh_pyquit__ - - names = [ - "__xonsh_env__", - "__xonsh_ctx__", - "__xonsh_help__", - "__xonsh_superhelp__", - "__xonsh_pathsearch__", - "__xonsh_globsearch__", - "__xonsh_regexsearch__", - "__xonsh_glob__", - "__xonsh_expand_path__", - "__xonsh_exit__", - "__xonsh_stdout_uncaptured__", - "__xonsh_stderr_uncaptured__", - "__xonsh_pyexit__", - "__xonsh_pyquit__", - "__xonsh_subproc_captured_stdout__", - "__xonsh_subproc_captured_inject__", - "__xonsh_subproc_captured_object__", - "__xonsh_subproc_captured_hiddenobject__", - "__xonsh_subproc_uncaptured__", - "__xonsh_execer__", - "__xonsh_commands_cache__", - "__xonsh_completers__", - "__xonsh_call_macro__", - "__xonsh_enter_macro__", - "__xonsh_path_literal__", - "XonshError", - "XonshCalledProcessError", - "evalx", - "execx", - "compilex", - "default_aliases", - "__xonsh_all_jobs__", - "__xonsh_ensure_list_of_strs__", - "__xonsh_list_of_strs_or_callables__", - "__xonsh_list_of_list_of_strs_outer_product__", - "__xonsh_history__", - ] - for name in names: - if hasattr(builtins, name): - delattr(builtins, name) + def __dir__(self): + return self.obj.__dir__() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/xonsh/commands_cache.py new/xonsh-0.9.9/xonsh/commands_cache.py --- old/xonsh-0.9.8/xonsh/commands_cache.py 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/xonsh/commands_cache.py 2019-07-20 00:13:20.000000000 +0200 @@ -441,19 +441,24 @@ """ # alphabetical, for what it is worth. predictors = { - "aurman": predict_false, "asciinema": predict_help_ver, + "aurman": predict_false, + "awk": predict_true, "bash": predict_shell, - "csh": predict_shell, + "cat": predict_false, "clear": predict_false, "cls": predict_false, "cmd": predict_shell, "cryptop": predict_false, + "cryptsetup": predict_true, + "csh": predict_shell, "curl": predict_true, + "emacsclient": predict_false, "env": predict_env, "ex": predict_false, - "emacsclient": predict_false, "fish": predict_shell, + "gawk": predict_true, + "git": predict_true, "gvim": predict_help_ver, "hg": predict_hg, "htop": predict_help_ver, @@ -462,39 +467,51 @@ "less": predict_help_ver, "ls": predict_true, "man": predict_help_ver, + "mc": predict_false, "more": predict_help_ver, - "mvim": predict_help_ver, "mutt": predict_help_ver, + "mvim": predict_help_ver, "nano": predict_help_ver, + "nmcli": predict_true, "nvim": predict_false, "ponysay": predict_help_ver, "psql": predict_false, + "push": predict_shell, + "pv": predict_false, "python": predict_shell, "python2": predict_shell, "python3": predict_shell, - "repo": predict_help_ver, "ranger": predict_help_ver, + "repo": predict_help_ver, "rview": predict_false, "rvim": predict_false, + "rwt": predict_shell, "scp": predict_false, "sh": predict_shell, "ssh": predict_false, "startx": predict_false, "sudo": predict_help_ver, "sudoedit": predict_help_ver, + "systemctl": predict_true, "tcsh": predict_shell, "telnet": predict_false, - "tput": predict_false, "top": predict_help_ver, + "tput": predict_false, + "udisksctl": predict_true, + "unzip": predict_true, "vi": predict_false, "view": predict_false, "vim": predict_false, "vimpager": predict_help_ver, "weechat": predict_help_ver, + "wget": predict_true, "xclip": predict_help_ver, "xo": predict_help_ver, - "xonsh": predict_shell, "xon.sh": predict_shell, + "xonsh": predict_shell, + "yes": predict_false, + "zip": predict_true, + "zipinfo": predict_true, "zsh": predict_shell, } return predictors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/xonsh/environ.py new/xonsh-0.9.9/xonsh/environ.py --- old/xonsh-0.9.8/xonsh/environ.py 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/xonsh/environ.py 2019-07-20 00:13:20.000000000 +0200 @@ -503,6 +503,7 @@ ), "COMPLETIONS_MENU_ROWS": (is_int, int, str), "COMPLETION_QUERY_LIMIT": (is_int, int, str), + "COMPLETION_IN_THREAD": (is_bool, to_bool, bool_to_str), "DIRSTACK_SIZE": (is_int, int, str), "DOTGLOB": (is_bool, to_bool, bool_to_str), "DYNAMIC_CWD_WIDTH": ( @@ -700,6 +701,7 @@ "COMPLETIONS_DISPLAY": "multi", "COMPLETIONS_MENU_ROWS": 5, "COMPLETION_QUERY_LIMIT": 100, + "COMPLETION_IN_THREAD": False, "DIRSTACK_SIZE": 20, "DOTGLOB": False, "DYNAMIC_CWD_WIDTH": (float("inf"), "c"), @@ -899,6 +901,11 @@ "The number of completions to display before the user is asked " "for confirmation." ), + "COMPLETION_IN_THREAD": VarDocs( + "When generating the completions takes a lot of time, " + "it’s better to do this in a background thed." + "When this is True, background theads is used for completion." + ), "DIRSTACK_SIZE": VarDocs("Maximum size of the directory stack."), "DOTGLOB": VarDocs( 'Globbing files with "*" or "**" will also match ' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/xonsh/execer.py new/xonsh-0.9.9/xonsh/execer.py --- old/xonsh-0.9.8/xonsh/execer.py 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/xonsh/execer.py 2019-07-20 00:13:20.000000000 +0200 @@ -16,7 +16,7 @@ balanced_parens, starting_whitespace, ) -from xonsh.built_ins import load_builtins, unload_builtins, load_proxies, unload_proxies +from xonsh.built_ins import load_builtins, unload_builtins class Execer(object): @@ -54,17 +54,16 @@ parser_args = parser_args or {} self.parser = Parser(**parser_args) self.filename = filename + self._default_filename = filename self.debug_level = debug_level self.unload = unload self.scriptcache = scriptcache self.cacheall = cacheall self.ctxtransformer = CtxAwareTransformer(self.parser) load_builtins(execer=self, ctx=xonsh_ctx) - load_proxies() def __del__(self): if self.unload: - unload_proxies() unload_builtins() def parse(self, input, ctx, mode="exec", filename=None, transform=True): @@ -127,6 +126,7 @@ """ if filename is None: filename = self.filename + self.filename = self._default_filename if glbs is None or locs is None: frame = inspect.stack()[stacklevel][0] glbs = frame.f_globals if glbs is None else glbs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/xonsh/imphooks.py new/xonsh-0.9.9/xonsh/imphooks.py --- old/xonsh-0.9.8/xonsh/imphooks.py 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/xonsh/imphooks.py 2019-07-20 00:13:20.000000000 +0200 @@ -108,7 +108,7 @@ def get_data(self, path): """Gets the bytes for a path.""" - raise NotImplementedError + raise OSError def get_code(self, fullname): """Gets the code object for a xonsh file.""" @@ -116,17 +116,23 @@ if filename is None: msg = "xonsh file {0!r} could not be found".format(fullname) raise ImportError(msg) - with open(filename, "rb") as f: - src = f.read() - enc = find_source_encoding(src) - src = src.decode(encoding=enc) - src = src if src.endswith("\n") else src + "\n" + src = self.get_source(filename) execer = self.execer execer.filename = filename ctx = {} # dummy for modules code = execer.compile(src, glbs=ctx, locs=ctx) return code + def get_source(self, fullpath): + if fullpath is None: + raise ImportError("could not find fullpath to module") + with open(fullpath, "rb") as f: + src = f.read() + enc = find_source_encoding(src) + src = src.decode(encoding=enc) + src = src if src.endswith("\n") else src + "\n" + return src + # # Import events diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/xonsh/jobs.py new/xonsh-0.9.9/xonsh/jobs.py --- old/xonsh-0.9.8/xonsh/jobs.py 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/xonsh/jobs.py 2019-07-20 00:13:20.000000000 +0200 @@ -84,7 +84,6 @@ Wait for the active job to finish, to be killed by SIGINT, or to be suspended by ctrl-z. """ - _clear_dead_jobs() active_task = get_next_task() # Return when there are no foreground active task if active_task is None: @@ -187,7 +186,6 @@ Wait for the active job to finish, to be killed by SIGINT, or to be suspended by ctrl-z. """ - _clear_dead_jobs() active_task = get_next_task() # Return when there are no foreground active task if active_task is None: @@ -233,6 +231,7 @@ def get_next_task(): """ Get the next active task and put it on top of the queue""" + _clear_dead_jobs() selected_task = None for tid in tasks: task = get_task(tid) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/xonsh/main.py new/xonsh-0.9.9/xonsh/main.py --- old/xonsh-0.9.8/xonsh/main.py 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/xonsh/main.py 2019-07-20 00:13:20.000000000 +0200 @@ -26,7 +26,7 @@ from xonsh.imphooks import install_import_hooks from xonsh.events import events from xonsh.environ import xonshrc_context, make_args_env -from xonsh.built_ins import XonshSession, load_builtins, load_proxies +from xonsh.built_ins import XonshSession, load_builtins events.transmogrify("on_post_init", "LoadEvent") @@ -513,7 +513,6 @@ execer = Execer(xonsh_ctx=ctx) builtins.__xonsh__ = XonshSession(ctx=ctx, execer=execer) load_builtins(ctx=ctx, execer=execer) - load_proxies() builtins.__xonsh__.shell = Shell(execer, ctx=ctx, shell_type=shell_type) builtins.__xonsh__.env.update(env) install_import_hooks() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/xonsh/ptk2/key_bindings.py new/xonsh-0.9.9/xonsh/ptk2/key_bindings.py --- old/xonsh-0.9.8/xonsh/ptk2/key_bindings.py 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/xonsh/ptk2/key_bindings.py 2019-07-20 00:13:20.000000000 +0200 @@ -304,8 +304,8 @@ b.validate_and_handle() xonsh_exit([]) - @handle(Keys.ControlJ, filter=IsMultiline()) - @handle(Keys.ControlM, filter=IsMultiline()) + @handle(Keys.ControlJ, filter=IsMultiline() & insert_mode) + @handle(Keys.ControlM, filter=IsMultiline() & insert_mode) def multiline_carriage_return(event): """ Wrapper around carriage_return multiline parser """ b = event.cli.current_buffer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.8/xonsh/ptk2/shell.py new/xonsh-0.9.9/xonsh/ptk2/shell.py --- old/xonsh-0.9.8/xonsh/ptk2/shell.py 2019-07-08 03:19:21.000000000 +0200 +++ new/xonsh-0.9.9/xonsh/ptk2/shell.py 2019-07-20 00:13:20.000000000 +0200 @@ -86,6 +86,7 @@ env = builtins.__xonsh__.env mouse_support = env.get("MOUSE_SUPPORT") auto_suggest = auto_suggest if env.get("AUTO_SUGGEST") else None + complete_in_thread = env.get("COMPLETION_IN_THREAD") completions_display = env.get("COMPLETIONS_DISPLAY") complete_style = self.completion_displays_to_styles[completions_display] @@ -137,6 +138,7 @@ "complete_style": complete_style, "complete_while_typing": complete_while_typing, "include_default_pygments_style": False, + "complete_in_thread": complete_in_thread, } if builtins.__xonsh__.env.get("COLOR_INPUT"): if HAS_PYGMENTS: