Hello community, here is the log from the commit of package xonsh for openSUSE:Factory checked in at 2019-07-08 15:11:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xonsh (Old) and /work/SRC/openSUSE:Factory/.xonsh.new.4615 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xonsh" Mon Jul 8 15:11:56 2019 rev:16 rq:713860 version:0.9.7 Changes: -------- --- /work/SRC/openSUSE:Factory/xonsh/xonsh.changes 2019-06-13 23:03:24.871389875 +0200 +++ /work/SRC/openSUSE:Factory/.xonsh.new.4615/xonsh.changes 2019-07-08 15:11:59.831401055 +0200 @@ -1,0 +2,27 @@ +Sun Jun 30 13:32:26 UTC 2019 - Sebastian Wagner <sebix+novell....@sebix.at> + +- update to version 0.9.7: + - Added: + - add xontrib (xontrib-readable-traceback) + - Registered kitty xontrib. + - The zipapp extra was added to install the importlib.resources backport on <3.7 + - Changed: + - turn off warning on completer + - xontrib metadata loading is now zipapp safe when possible + - Fixed: + - Updated py-bash-completion that is vended with xonsh to v0.2.6 which + includes a fix completion which uses a subshell environment and a + fix for string index error in stripped prefix. + - Removed obsolte "Alt+." keybinding in xontrib-bashisms that was causing built-in binding to malfunction. + - Fixed that occurs when type a command before rendering. +- update to version 0.9.6: + - Fixed: + - Fixed exception in help/version threadable predictor + - Fixed gitstatus prompt so that it also now reports deleted files + - Fixed issue where the prompt-toolkit2 shell could not display and + would end up in an infinite error loop if ``$MULTILINE_PROMPT`` + was a suitably "false" value, such as ``None`` or an empty string. + - Fixed issue where setting ``$XONSH_STDERR_PREFIX`` and ``$XONSH_STDERR_POSTFIX`` + and running a command in the ``xonshrc`` file would throw an error. + +------------------------------------------------------------------- Old: ---- xonsh-0.9.5.tar.gz New: ---- xonsh-0.9.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xonsh.spec ++++++ --- /var/tmp/diff_new_pack.ularrL/_old 2019-07-08 15:12:00.711401899 +0200 +++ /var/tmp/diff_new_pack.ularrL/_new 2019-07-08 15:12:00.715401903 +0200 @@ -17,7 +17,7 @@ Name: xonsh -Version: 0.9.5 +Version: 0.9.7 Release: 0 Summary: A general purpose, Python-ish shell License: BSD-3-Clause AND BSD-2-Clause ++++++ xonsh-0.9.5.tar.gz -> xonsh-0.9.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/.appveyor.yml new/xonsh-0.9.7/.appveyor.yml --- old/xonsh-0.9.5/.appveyor.yml 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/.appveyor.yml 2019-06-28 23:30:35.000000000 +0200 @@ -1,4 +1,4 @@ -version: 0.9.5.{build} +version: 0.9.7.{build} os: Windows Server 2012 R2 environment: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/.authors.yml new/xonsh-0.9.7/.authors.yml --- old/xonsh-0.9.5/.authors.yml 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/.authors.yml 2019-06-28 23:30:35.000000000 +0200 @@ -7,6 +7,8 @@ email: 6sy...@gmail.com aliases: - '@vaaaaanquish' + - vaaaaanquish + - 6syun9 num_commits: 7 first_commit: 2018-07-17 01:14:04 github: vaaaaanquish @@ -29,7 +31,8 @@ alternate_emails: - jamie.bl...@ilq.com - jbl...@nextgenerationenrollment.com - num_commits: 188 + - ja...@ivyleav.es + num_commits: 191 first_commit: 2016-07-20 14:05:08 github: astronouth7303 - name: Cody Scott @@ -378,7 +381,7 @@ email: laloc...@gmail.com aliases: - laloch - num_commits: 41 + num_commits: 42 first_commit: 2018-07-26 13:51:50 github: laloch - name: Nico Lehmann @@ -428,7 +431,7 @@ github: funkyfuture - name: Anthony Scopatz email: scop...@gmail.com - num_commits: 2465 + num_commits: 2481 first_commit: 2015-01-21 17:04:13 github: scopatz - name: anatoly techtonik @@ -959,7 +962,7 @@ github: ntdef - name: virus email: virusbb0...@gmail.com - num_commits: 24 + num_commits: 30 first_commit: 2019-03-06 10:36:26 github: virusbb001 - name: Steven Kryskalla @@ -990,7 +993,7 @@ first_commit: 2019-05-06 14:17:57 - name: con-f-use email: con-f-...@users.noreply.github.com - num_commits: 3 + num_commits: 8 first_commit: 2019-05-15 04:53:37 - name: cclauss email: ccla...@me.com @@ -1002,3 +1005,12 @@ num_commits: 2 first_commit: 2019-05-10 06:18:40 github: eppeters +- name: shadow-light + email: 42055707+shadow-li...@users.noreply.github.com + num_commits: 3 + first_commit: 2018-09-16 22:50:24 +- name: Gyuri Horak + email: dy...@horak.hu + num_commits: 1 + first_commit: 2019-06-18 12:00:16 + github: dyuri diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/.github/issue_template.md new/xonsh-0.9.7/.github/issue_template.md --- old/xonsh-0.9.5/.github/issue_template.md 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/.github/issue_template.md 2019-06-28 23:30:35.000000000 +0200 @@ -6,9 +6,11 @@ ## xonfig <details> + ``` $ xonfig ``` + </details> ## Expected Behavior @@ -17,15 +19,17 @@ ## Current Behavior <!--- Tell us what happens instead of the expected behavior --> <!--- If part of your bug report is a traceback, please first enter debug mode before triggering the error -To enter debug mode, set the environment variable `XONSH_DEBUG=1` _before_ starting `xonsh`. +To enter debug mode, set the environment variable `XONSH_DEBUG=1` _before_ starting `xonsh`. On Linux and OSX, an easy way to to do this is to run `env XONSH_DEBUG=1 xonsh` --> ### Traceback (if applicable) <details> + ``` traceback ``` + </details> ## Steps to Reproduce diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/.mailmap new/xonsh-0.9.7/.mailmap --- old/xonsh-0.9.5/.mailmap 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/.mailmap 2019-06-28 23:30:35.000000000 +0200 @@ -18,6 +18,7 @@ Konstantinos Tsakiltzidis <laer...@gmail.com> laerus <laer...@gmail.com> Jamie Bliss <astronouth7...@gmail.com> James Bliss <jamie.bl...@ilq.com> Jamie Bliss <astronouth7...@gmail.com> James Bliss <jbl...@nextgenerationenrollment.com> +Jamie Bliss <astronouth7...@gmail.com> James Bliss <ja...@ivyleav.es> Hugo Wang <w...@mitnk.com> BlahGeek <i...@blahgeek.com> Jean-Benoist Leger <j...@leger.tf> Jean-Benoist Leger <jbleger@gertrude> @@ -32,11 +33,11 @@ Burak Yiğit Kaya <b...@byk.im> Burak Yigit Kaya <b...@byk.im> Sagar Tewari <sagartewar...@gmail.com> Sagar Tewari <sagartewar...@yahoo.com> Matthias Bussonnier <bussonniermatth...@gmail.com> +virus <virusbb0...@gmail.com> Konstantin Molchanov <kmolcha...@machinezone.com> Konstantin Molchanov <moiga...@live.com> Guillaume Leclerc <guillaume.lecl...@epfl.ch> Guillaume Leclerc <guillaume.leclerc.w...@gmail.com> Gordon Ball <gor...@chronitis.net> Travis Shirk <tra...@pobox.com> -virus <virusbb0...@gmail.com> Joel Gerber <j...@grrbrr.ca> Bernardas Ališauskas <bernardas.alisaus...@gmail.com> Bernardas <bernardas.alisaus...@gmail.com> Derek Thomas <derekatho...@gmail.com> @@ -60,7 +61,10 @@ Oleh Prypin <o...@pryp.in> Brian Skinn <brian.sk...@gmail.com> Will S <wsha.c...@gmail.com> +con-f-use <con-f-...@users.noreply.github.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> Alessio Bogon <you...@gmail.com> Alessio Bogon <you...@users.noreply.github.com> Yohei Tamura <tamu...@gmail.com> Maximilian Köhl <m...@koehlma.de> @@ -127,7 +131,7 @@ Danmou <dmr...@gmail.com> Niklas Hambüchen <m...@nh2.me> Sébastien Pierre <sebastien.pie...@gmail.com> -con-f-use <con-f-...@users.noreply.github.com> +shadow-light <42055707+shadow-li...@users.noreply.github.com> Mark Wiebe <mwwi...@gmail.com> Nathan Hoad <nat...@getoffmalawn.com> Eric Dill <ed...@bnl.gov> @@ -207,5 +211,6 @@ Ronny Pfannschmidt <opensou...@ronnypfannschmidt.de> Troy de Freitas <9503857+nt...@users.noreply.github.com> Rodrigo Oliveira <rodrigo.olive...@byne.com.br> +Gyuri Horak <dy...@horak.hu> 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.5/AUTHORS.rst new/xonsh-0.9.7/AUTHORS.rst --- old/xonsh-0.9.5/AUTHORS.rst 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/AUTHORS.rst 2019-06-28 23:30:35.000000000 +0200 @@ -20,11 +20,11 @@ * Burak Yiğit Kaya * Sagar Tewari * Matthias Bussonnier +* virus * Konstantin Molchanov * Guillaume Leclerc * Gordon Ball * Travis Shirk -* virus * Joel Gerber * Bernardas Ališauskas * Derek Thomas @@ -48,6 +48,7 @@ * Oleh Prypin * Brian Skinn * Will S +* con-f-use * vaaaaanquish * Alessio Bogon * Yohei Tamura @@ -115,7 +116,7 @@ * Danmou * Niklas Hambüchen * Sébastien Pierre -* con-f-use +* shadow-light * Mark Wiebe * Nathan Hoad * Eric Dill @@ -195,6 +196,7 @@ * Ronny Pfannschmidt * Troy de Freitas * Rodrigo Oliveira +* Gyuri Horak * goodboy * Atsushi Morimoto diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/CHANGELOG.rst new/xonsh-0.9.7/CHANGELOG.rst --- old/xonsh-0.9.5/CHANGELOG.rst 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/CHANGELOG.rst 2019-06-28 23:30:35.000000000 +0200 @@ -4,6 +4,60 @@ .. current developments +v0.9.7 +==================== + +**Added:** + +* add xontrib (xontrib-readable-traceback) +* Registered kitty xontrib. +* The zipapp extra was added to install the importlib.resources backport on <3.7 + +**Changed:** + +* turn off warning on completer +* xontrib metadata loading is now zipapp safe when possible + +**Fixed:** + +* Updated py-bash-completion that is vended with xonsh to v0.2.6 which + includes a fix completion which uses a subshell environment and a + fix for string index error in stripped prefix. +* Removed obsolte "Alt+." keybinding in xontrib-bashisms that was causing built-in binding to malfunction. +* Fixed that occurs when type a command before rendering. + +**Authors:** + +* Anthony Scopatz +* Jamie Bliss +* con-f-use +* vaaaaanquish +* Gyuri Horak + + + +v0.9.6 +==================== + +**Fixed:** + +* Fixed exception in help/version threadable predictor +* Fixed gitstatus prompt so that it also now reports deleted files +* Fixed issue where the prompt-toolkit2 shell could not display and + would end up in an infinite error loop if ``$MULTILINE_PROMPT`` + was a suitably "false" value, such as ``None`` or an empty string. +* Fixed issue where setting ``$XONSH_STDERR_PREFIX`` and ``$XONSH_STDERR_POSTFIX`` + and running a command in the ``xonshrc`` file would throw an error. + +**Authors:** + +* Anthony Scopatz +* David Strobach +* virus +* shadow-light + + + v0.9.5 ==================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/ci/environment-3.5.yml new/xonsh-0.9.7/ci/environment-3.5.yml --- old/xonsh-0.9.5/ci/environment-3.5.yml 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/ci/environment-3.5.yml 2019-06-28 23:30:35.000000000 +0200 @@ -10,7 +10,6 @@ - pytest-timeout - numpy - psutil - - matplotlib - flake8 - coverage - pyflakes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/docs/_static/numpy_friendly.css_t new/xonsh-0.9.7/docs/_static/numpy_friendly.css_t --- old/xonsh-0.9.5/docs/_static/numpy_friendly.css_t 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/docs/_static/numpy_friendly.css_t 2019-06-28 23:30:35.000000000 +0200 @@ -3,3 +3,8 @@ table.docutils th.field-name { white-space: nowrap; } + +p code.literal { + white-space: normal; + word-wrap: break-word; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/setup.py new/xonsh-0.9.7/setup.py --- old/xonsh-0.9.5/setup.py 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/setup.py 2019-06-28 23:30:35.000000000 +0200 @@ -402,6 +402,7 @@ "mac": ["gnureadline"], "linux": ["distro"], "proctitle": ["setproctitle"], + "zipapp": ['importlib_resources; python_version < "3.7"'], } skw["python_requires"] = ">=3.5" setup(**skw) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/xonsh/__init__.py new/xonsh-0.9.7/xonsh/__init__.py --- old/xonsh-0.9.5/xonsh/__init__.py 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/xonsh/__init__.py 2019-06-28 23:30:35.000000000 +0200 @@ -1,4 +1,4 @@ -__version__ = "0.9.5" +__version__ = "0.9.7" # amalgamate exclude jupyter_kernel parser_table parser_test_table pyghooks diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/xonsh/commands_cache.py new/xonsh-0.9.7/xonsh/commands_cache.py --- old/xonsh-0.9.5/xonsh/commands_cache.py 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/xonsh/commands_cache.py 2019-06-28 23:30:35.000000000 +0200 @@ -380,9 +380,9 @@ @lazyobject def HELP_VER_PREDICTOR_PARSER(): p = argparse.ArgumentParser("cmd", add_help=False) - p.add_argument("-h", "--help", dest="help", action="store_true", default=None) + p.add_argument("-h", "--help", dest="help", nargs="?", action="store", default=None) p.add_argument( - "-v", "-V", "--version", dest="version", action="store_true", default=None + "-v", "-V", "--version", dest="version", nargs="?", action="store", default=None ) return p diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/xonsh/completers/bash_completion.py new/xonsh-0.9.7/xonsh/completers/bash_completion.py --- old/xonsh-0.9.5/xonsh/completers/bash_completion.py 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/xonsh/completers/bash_completion.py 2019-06-28 23:30:35.000000000 +0200 @@ -14,7 +14,7 @@ import functools import subprocess -__version__ = "0.2.5" +__version__ = "0.2.6" @functools.lru_cache(1) @@ -228,6 +228,18 @@ complete -p {cmd} 2> /dev/null || echo "-F _minimal" }} +function getarg {{ + find=$1 + shift 1 + prev="" + for i in $* ; do + if [ "$prev" = "$find" ] ; then + echo $i + fi + prev=$i + done +}} + _complete_stmt=$(_get_complete_statement) if echo "$_complete_stmt" | grep --quiet -e "_minimal" then @@ -235,15 +247,20 @@ _complete_stmt=$(_get_complete_statement) fi -_func=$(echo "$_complete_stmt" | grep -o -e '-F \w\+' | cut -d ' ' -f 2) -declare -f "$_func" > /dev/null || exit 1 +# Is -C (subshell) or -F (function) completion used? +if [[ $_complete_stmt =~ "-C" ]] ; then + _func=$(eval getarg "-C" $_complete_stmt) +else + _func=$(eval getarg "-F" $_complete_stmt) + declare -f "$_func" > /dev/null || exit 1 +fi echo "$_complete_stmt" -COMP_WORDS=({line}) -COMP_LINE={comp_line} -COMP_POINT=${{#COMP_LINE}} -COMP_COUNT={end} -COMP_CWORD={n} +export COMP_WORDS=({line}) +export COMP_LINE={comp_line} +export COMP_POINT=${{#COMP_LINE}} +export COMP_COUNT={end} +export COMP_CWORD={n} $_func {cmd} {prefix} {prev} # print out completions, right-stripped if they contain no internal spaces diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/xonsh/completers/python.py new/xonsh-0.9.7/xonsh/completers/python.py --- old/xonsh-0.9.5/xonsh/completers/python.py 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/xonsh/completers/python.py 2019-06-28 23:30:35.000000000 +0200 @@ -4,6 +4,7 @@ import inspect import builtins import importlib +import warnings import collections.abc as cabc import xonsh.tools as xt @@ -184,6 +185,18 @@ return set(prefix_start + i for i in python_matches) +def _turn_off_warning(func): + """Decorator to turn off warning temporarily.""" + + def wrapper(*args, **kwargs): + warnings.filterwarnings("ignore") + r = func(*args, **kwargs) + warnings.filterwarnings("once", category=DeprecationWarning) + return r + + return wrapper + + def _safe_eval(expr, ctx): """Safely tries to evaluate an expression. If this fails, it will return a (None, None) tuple. @@ -202,6 +215,7 @@ return val, _ctx +@_turn_off_warning def attr_complete(prefix, ctx, filter_func): """Complete attributes of an object.""" attrs = set() @@ -243,6 +257,7 @@ return attrs +@_turn_off_warning def python_signature_complete(prefix, line, end, ctx, filter_func): """Completes a python function (or other callable) call by completing argument and keyword argument names. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/xonsh/environ.py new/xonsh-0.9.7/xonsh/environ.py --- old/xonsh-0.9.5/xonsh/environ.py 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/xonsh/environ.py 2019-06-28 23:30:35.000000000 +0200 @@ -975,7 +975,35 @@ configurable=ON_WINDOWS, ), "LANG": VarDocs("Fallback locale setting for systems where it matters"), - "LS_COLORS": VarDocs("Color settings for ``ls`` command line utility"), + "LS_COLORS": VarDocs( + "Color settings for ``ls`` command line utility", + default="``*.7z=1;0;31:*.Z=1;0;31:*.aac=0;36:*.ace=1;0;31:" + "*.alz=1;0;31:*.arc=1;0;31:*.arj=1;0;31:*.asf=1;0;35:*.au=0;36:" + "*.avi=1;0;35:*.bmp=1;0;35:*.bz=1;0;31:*.bz2=1;0;31:*.cab=1;0;31:" + "*.cgm=1;0;35:*.cpio=1;0;31:*.deb=1;0;31:*.dl=1;0;35:*.dwm=1;0;31:" + "*.dz=1;0;31:*.ear=1;0;31:*.emf=1;0;35:*.esd=1;0;31:*.flac=0;36:" + "*.flc=1;0;35:*.fli=1;0;35:*.flv=1;0;35:*.gif=1;0;35:*.gl=1;0;35:" + "*.gz=1;0;31:*.jar=1;0;31:*.jpeg=1;0;35:*.jpg=1;0;35:*.lha=1;0;31:" + "*.lrz=1;0;31:*.lz=1;0;31:*.lz4=1;0;31:*.lzh=1;0;31:*.lzma=1;0;31" + ":*.lzo=1;0;31:*.m2v=1;0;35:*.m4a=0;36:*.m4v=1;0;35:*.mid=0;36:" + "*.midi=0;36:*.mjpeg=1;0;35:*.mjpg=1;0;35:*.mka=0;36:*.mkv=1;0;35:" + "*.mng=1;0;35:*.mov=1;0;35:*.mp3=0;36:*.mp4=1;0;35:*.mp4v=1;0;35:" + "*.mpc=0;36:*.mpeg=1;0;35:*.mpg=1;0;35:*.nuv=1;0;35:*.oga=0;36:" + "*.ogg=0;36:*.ogm=1;0;35:*.ogv=1;0;35:*.ogx=1;0;35:*.opus=0;36:" + "*.pbm=1;0;35:*.pcx=1;0;35:*.pgm=1;0;35:*.png=1;0;35:*.ppm=1;0;35:" + "*.qt=1;0;35:*.ra=0;36:*.rar=1;0;31:*.rm=1;0;35:*.rmvb=1;0;35:" + "*.rpm=1;0;31:*.rz=1;0;31:*.sar=1;0;31:*.spx=0;36:*.svg=1;0;35:" + "*.svgz=1;0;35:*.swm=1;0;31:*.t7z=1;0;31:*.tar=1;0;31:*.taz=1;0;31:" + "*.tbz=1;0;31:*.tbz2=1;0;31:*.tga=1;0;35:*.tgz=1;0;31:*.tif=1;0;35:" + "*.tiff=1;0;35:*.tlz=1;0;31:*.txz=1;0;31:*.tz=1;0;31:*.tzo=1;0;31:" + "*.tzst=1;0;31:*.vob=1;0;35:*.war=1;0;31:*.wav=0;36:*.webm=1;0;35:" + "*.wim=1;0;31:*.wmv=1;0;35:*.xbm=1;0;35:*.xcf=1;0;35:*.xpm=1;0;35:" + "*.xspf=0;36:*.xwd=1;0;35:*.xz=1;0;31:*.yuv=1;0;35:*.z=1;0;31:" + "*.zip=1;0;31:*.zoo=1;0;31:*.zst=1;0;31:bd=40;0;33:ca=0;30;41:" + "cd=40;0;33:di=1;0;34:do=1;0;35:ex=1;0;32:ln=1;0;36:mh=0:mi=0:" + "or=40;0;31:ow=0;34;42:pi=40;0;33:rs=0:sg=0;30;43:so=1;0;35:" + "st=0;37;44:su=0;37;41:tw=0;30;42``", + ), "LOADED_RC_FILES": VarDocs( "Whether or not any of the xonsh run control files were loaded at " "startup. This is a sequence of bools in Python that is converted " @@ -998,7 +1026,19 @@ "Used to represent a previous present working directory.", configurable=False, ), - "PATH": VarDocs("List of strings representing where to look for executables."), + "PATH": VarDocs( + "List of strings representing where to look for executables.", + default="On Windows: it is ``Path`` value of register's " + "``HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment``. " + "On Mac OSX: ``('/usr/local/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin')`` " + "On Linux & on Cygwin & on MSYS, when detected that the distro " + "is like arch, the default PATH is " + "``('/usr/local/sbin', '/usr/local/bin', '/usr/bin', " + "'/usr/bin/site_perl', '/usr/bin/vendor_perl', '/usr/bin/core_perl')``" + " and otherwise is " + "``('~/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin'," + "'/usr/bin', '/sbin', '/bin', '/usr/games', '/usr/local/games')``", + ), "PATHEXT": VarDocs( "Sequence of extension strings (eg, ``.EXE``) for " "filtering valid executables by. Each element must be " @@ -1158,7 +1198,8 @@ ), ), "XONSH_APPEND_NEWLINE": VarDocs( - "Append new line when a partial line is preserved in output." + "Append new line when a partial line is preserved in output.", + default="``$XONSH_INTERACTIVE``", ), "XONSH_AUTOPAIR": VarDocs( "Whether Xonsh will auto-insert matching parentheses, brackets, and " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/xonsh/prompt/gitstatus.py new/xonsh-0.9.7/xonsh/prompt/gitstatus.py --- old/xonsh-0.9.5/xonsh/prompt/gitstatus.py 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/xonsh/prompt/gitstatus.py 2019-06-28 23:30:35.000000000 +0200 @@ -17,6 +17,7 @@ "num_behind", "untracked", "changed", + "deleted", "conflicts", "staged", "stashed", @@ -70,6 +71,7 @@ "STAGED": "{RED}●", "CONFLICTS": "{RED}×", "CHANGED": "{BLUE}+", + "DELETED": "{RED}-", "UNTRACKED": "…", "STASHED": "⚑", "CLEAN": "{BOLD_GREEN}✓", @@ -114,12 +116,12 @@ def gitstatus(): """Return namedtuple with fields: branch name, number of ahead commit, number of behind commit, - untracked number, changed number, conflicts number, + untracked number, changed number, deleted number, conflicts number, staged number, stashed number, operation.""" status = _check_output(["git", "status", "--porcelain", "--branch"]) branch = "" num_ahead, num_behind = 0, 0 - untracked, changed, conflicts, staged = 0, 0, 0, 0 + untracked, changed, deleted, conflicts, staged = 0, 0, 0, 0, 0 for line in status.splitlines(): if line.startswith("##"): line = line[2:].strip() @@ -142,9 +144,11 @@ elif line.startswith("??"): untracked += 1 else: - if len(line) > 1 and line[1] == "M": - changed += 1 - + if len(line) > 1: + if line[1] == "M": + changed += 1 + elif line[1] == "D": + deleted += 1 if len(line) > 0 and line[0] == "U": conflicts += 1 elif len(line) > 0 and line[0] != " ": @@ -160,6 +164,7 @@ num_behind, untracked, changed, + deleted, conflicts, staged, stashed, @@ -188,11 +193,13 @@ ret += _get_def("CONFLICTS") + str(s.conflicts) + "{NO_COLOR}" if s.changed > 0: ret += _get_def("CHANGED") + str(s.changed) + "{NO_COLOR}" + if s.deleted > 0: + ret += _get_def("DELETED") + str(s.deleted) + "{NO_COLOR}" if s.untracked > 0: ret += _get_def("UNTRACKED") + str(s.untracked) + "{NO_COLOR}" if s.stashed > 0: ret += _get_def("STASHED") + str(s.stashed) + "{NO_COLOR}" - if s.staged + s.conflicts + s.changed + s.untracked + s.stashed == 0: + if s.staged + s.conflicts + s.changed + s.deleted + s.untracked + s.stashed == 0: ret += _get_def("CLEAN") + "{NO_COLOR}" ret += "{NO_COLOR}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/xonsh/ptk2/completer.py new/xonsh-0.9.7/xonsh/ptk2/completer.py --- old/xonsh-0.9.5/xonsh/ptk2/completer.py 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/xonsh/ptk2/completer.py 2019-06-28 23:30:35.000000000 +0200 @@ -101,4 +101,5 @@ last_h = render._last_screen.height if render._last_screen else 0 last_h = max(render._min_available_height, last_h) if last_h < size: - render._last_screen.height = size + if render._last_screen: + render._last_screen.height = size diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/xonsh/ptk2/shell.py new/xonsh-0.9.7/xonsh/ptk2/shell.py --- old/xonsh-0.9.5/xonsh/ptk2/shell.py 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/xonsh/ptk2/shell.py 2019-06-28 23:30:35.000000000 +0200 @@ -252,8 +252,8 @@ width = width - 1 dots = builtins.__xonsh__.env.get("MULTILINE_PROMPT") dots = dots() if callable(dots) else dots - if dots is None: - return [(Token, " " * (width + 1))] + if not dots: + return "" basetoks = self.format_color(dots) baselen = sum(len(t[1]) for t in basetoks) if baselen == 0: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/xonsh/tools.py new/xonsh-0.9.7/xonsh/tools.py --- old/xonsh-0.9.5/xonsh/tools.py 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/xonsh/tools.py 2019-06-28 23:30:35.000000000 +0200 @@ -1948,16 +1948,27 @@ if not template: return "" env = builtins.__xonsh__.env if env is None else env - shell = builtins.__xonsh__.shell.shell - try: - s = shell.prompt_formatter(template) - except Exception: - print_exception() - # \001\002 is there to fool pygments into not returning an empty string - # for potentially empty input. This happens when the template is just a - # color code with no visible text. invis = "\001\002" - s = shell.format_color(invis + s + invis, force_string=True) + if builtins.__xonsh__.shell is None: + # shell hasn't fully started up (probably still in xonshrc) + from xonsh.prompt.base import PromptFormatter + from xonsh.ansi_colors import ansi_partial_color_format + + pf = PromptFormatter() + s = pf(template) + style = env.get("XONSH_COLOR_STYLE") + s = ansi_partial_color_format(invis + s + invis, hide=False, style=style) + else: + # shell has fully started. do the normal thing + shell = builtins.__xonsh__.shell.shell + try: + s = shell.prompt_formatter(template) + except Exception: + print_exception() + # \001\002 is there to fool pygments into not returning an empty string + # for potentially empty input. This happens when the template is just a + # color code with no visible text. + s = shell.format_color(invis + s + invis, force_string=True) s = s.replace(invis, "") return s diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/xonsh/xontribs.json new/xonsh-0.9.7/xonsh/xontribs.json --- old/xonsh-0.9.5/xonsh/xontribs.json 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/xonsh/xontribs.json 2019-06-28 23:30:35.000000000 +0200 @@ -15,6 +15,11 @@ "description": ["Adds automatic execution of xonsh script files called", "``.autoxsh`` when enterting a directory with ``cd`` function"] }, + {"name": "avox", + "package": "xontrib-avox", + "url": "https://github.com/astronouth7303/xontrib-avox", + "description": ["Automatic (de)activation of virtual environments as you cd around"] + }, {"name": "bashisms", "package": "xonsh", "url": "http://xon.sh", @@ -33,6 +38,11 @@ "url": "https://github.com/ErickTucto/xontrib-base16-shell", "description": ["Change base16 shell themes"] }, + {"name": "click_tabcomplete", + "package": "xonsh-click-tabcomplete", + "url": "https://github.com/Granitosaurus/xonsh-click-tabcomplete", + "description": ["Adds tabcomplete functionality to click based python applications inside of xonsh."] + }, {"name": "coreutils", "package": "xonsh", "url": "http://xon.sh", @@ -79,6 +89,24 @@ "url": "https://github.com/xsteadfastx/xonsh-docker-tabcomplete", "description": ["Adds tabcomplete functionality to docker inside of xonsh."] }, + {"name": "free_cwd", + "package": "xonsh", + "url": "http://xon.sh", + "description": [ + "Windows only xontrib, to release the lock on the current directory ", + "whenever the prompt is shown. Enabling this will allow the other ", + "programs or Windows Explorer to delete or rename the current or parent ", + "directories. Internally, it is accomplished by temporarily resetting ", + "CWD to the root drive folder while waiting at the prompt. This only ", + "works with the prompt_toolkit backend and can cause cause issues ", + "if any extensions are enabled that hook the prompt and relies on ", + "``os.getcwd()``"] + }, + {"name": "fzf-widgets", + "package": "xontrib-fzf-widgets", + "url": "https://github.com/shahinism/xontrib-fzf-widgets", + "description": ["Adds some fzf widgets to your xonsh shell."] + }, {"name": "histcpy", "package": "xontrib-histcpy", "url": "https://github.com/con-f-use/xontrib-histcpy", @@ -92,42 +120,52 @@ "url": "http://xon.sh", "description": ["Jedi tab completion hooks for xonsh."] }, + {"name": "kitty", + "package": "xontrib-kitty", + "url": "https://github.com/scopatz/xontrib-kitty", + "description": ["Xonsh hooks for the Kitty terminal emulator."] + }, {"name": "mpl", "package": "xonsh", "url": "http://xon.sh", "description": ["Matplotlib hooks for xonsh, including the new 'mpl' alias ", "that displays the current figure on the screen."] }, + {"name": "powerline", + "package": "xontrib-powerline", + "url": "https://github.com/santagada/xontrib-powerline", + "description": ["Powerline for Xonsh shell"] + }, {"name": "prompt_ret_code", "package": "xonsh", "url": "http://xon.sh", "description": ["Adds return code info to the prompt"] }, - {"name": "free_cwd", - "package": "xonsh", - "url": "http://xon.sh", - "description": [ - "Windows only xontrib, to release the lock on the current directory ", - "whenever the prompt is shown. Enabling this will allow the other ", - "programs or Windows Explorer to delete or rename the current or parent ", - "directories. Internally, it is accomplished by temporarily resetting ", - "CWD to the root drive folder while waiting at the prompt. This only ", - "works with the prompt_toolkit backend and can cause cause issues ", - "if any extensions are enabled that hook the prompt and relies on ", - "``os.getcwd()``"] + {"name": "prompt_vi_mode", + "package": "xontrib-prompt-vi-mode", + "url": "https://github.com/t184256/xontrib-prompt-vi-mode", + "description": ["vi-mode status formatter for xonsh prompt"] + }, + {"name": "readable-traceback", + "package": "xontrib-readable-traceback", + "url": "https://github.com/6syun9/xontrib-readable-traceback", + "description": ["Make traceback easier to see for xonsh."] }, - {"name": "whole_word_jumping", - "package": "xonsh", - "url": "http://xon.sh", - "description": [ - "Jumping across whole words (non-whitespace) with Ctrl+Left/Right.", - "Alt+Left/Right remains unmodified to jump over smaller word segments."] + {"name": "schedule", + "package": "xontrib-schedule", + "url": "https://github.com/astronouth7303/xontrib-schedule", + "description": ["Xonsh Task Scheduling"] }, {"name": "scrapy_tabcomplete", "package": "xonsh-scrapy-tabcomplete", "url": "https://github.com/Granitas/xonsh-scrapy-tabcomplete", "description": ["Adds tabcomplete functionality to scrapy inside of xonsh."] }, + {"name": "ssh_agent", + "package": "xontrib-ssh-agent", + "url": "https://bitbucket.org/dyuri/xontrib-ssh-agent", + "description": ["ssh-agent integration"] + }, {"name": "vox", "package": "xonsh", "url": "http://xon.sh", @@ -138,6 +176,13 @@ "url": "https://github.com/Granitosaurus/xonsh-vox-tabcomplete", "description": ["Adds tabcomplete functionality to vox inside of xonsh."] }, + {"name": "whole_word_jumping", + "package": "xonsh", + "url": "http://xon.sh", + "description": [ + "Jumping across whole words (non-whitespace) with Ctrl+Left/Right.", + "Alt+Left/Right remains unmodified to jump over smaller word segments."] + }, {"name": "xo", "package": "exofrills", "url": "https://github.com/scopatz/xo", @@ -151,40 +196,10 @@ "url": "https://github.com/gforsyth/xonda", "description": ["A thin wrapper around conda with tab completion"] }, - {"name": "avox", - "package": "xontrib-avox", - "url": "https://github.com/astronouth7303/xontrib-avox", - "description": ["Automatic (de)activation of virtual environments as you cd around"] - }, {"name": "z", "package": "xontrib-z", "url": "https://github.com/astronouth7303/xontrib-z", "description": ["Tracks your most used directories, based on 'frecency'."] - }, - {"name": "powerline", - "package": "xontrib-powerline", - "url": "https://github.com/santagada/xontrib-powerline", - "description": ["Powerline for Xonsh shell"] - }, - {"name": "prompt_vi_mode", - "package": "xontrib-prompt-vi-mode", - "url": "https://github.com/t184256/xontrib-prompt-vi-mode", - "description": ["vi-mode status formatter for xonsh prompt"] - }, - {"name": "click_tabcomplete", - "package": "xonsh-click-tabcomplete", - "url": "https://github.com/Granitosaurus/xonsh-click-tabcomplete", - "description": ["Adds tabcomplete functionality to click based python applications inside of xonsh."] - }, - {"name": "fzf-widgets", - "package": "xontrib-fzf-widgets", - "url": "https://github.com/shahinism/xontrib-fzf-widgets", - "description": ["Adds some fzf widgets to your xonsh shell."] - }, - {"name": "schedule", - "package": "xontrib-schedule", - "url": "https://github.com/astronouth7303/xontrib-schedule", - "description": ["Xonsh Task Scheduling"] } ], "packages": { @@ -204,11 +219,11 @@ "aura": "sudo aura -A xonsh", "yaourt": "yaourt -Sa xonsh"} }, - "xontrib-prompt-ret-code": { - "license": "MIT", - "url": "https://github.com/Siecje/xontrib-prompt-ret-code", + "xonsh-autoxsh": { + "license": "GPLv3", + "url": "https://github.com/Granitas/xonsh-autoxsh", "install": { - "pip": "xpip install xontrib-prompt-ret-code" + "pip": "xpip install xonsh-autoxsh" } }, "xonsh-apt-tabcomplete": { @@ -218,6 +233,13 @@ "pip": "xpip install xonsh-apt-tabcomplete" } }, + "xonsh-click-tabcomplete": { + "license": "GPLv3", + "url": "https://github.com/Granitosaurus/xonsh-click-tabcomplete", + "install": { + "pip": "xpip install xonsh-click-tabcomplete" + } + }, "xonsh-direnv": { "license": "MIT", "url": "https://github.com/74th/xonsh-direnv", @@ -246,20 +268,6 @@ "pip": "xpip install xonsh-vox-tabcomplete" } }, - "xonsh-click-tabcomplete": { - "license": "GPLv3", - "url": "https://github.com/Granitosaurus/xonsh-click-tabcomplete", - "install": { - "pip": "xpip install xonsh-click-tabcomplete" - } - }, - "xonsh-autoxsh": { - "license": "GPLv3", - "url": "https://github.com/Granitas/xonsh-autoxsh", - "install": { - "pip": "xpip install xonsh-autoxsh" - } - }, "xonda": { "license": "MIT", "url": "https://github.com/gforsyth/xonda", @@ -274,32 +282,33 @@ "pip": "xpip install xontrib-avox" } }, - "xontrib-histcpy": { + "xontrib-fzf-widgets": { "license": "GPLv3", - "url": "https://github.com/con-f-use/xontrib-histcpy", + "url": "https://github.com/shahinism/xontrib-fzf-widgets", "install": { - "pip": "xpip install xontrib-histcpy" + "pip": "xpip install xontrib-fzf-widgets" } }, - "xontrib-z": { + "xontrib-histcpy": { "license": "GPLv3", - "url": "https://github.com/astronouth7303/xontrib-z", + "url": "https://github.com/con-f-use/xontrib-histcpy", "install": { - "pip": "xpip install xontrib-z" + "pip": "xpip install xontrib-histcpy" } }, - "xontrib-powerline": { - "license": "MIT", - "url": "https://github.com/santagada/xontrib-powerline", + "xontrib-kitty": { + "license": "BSD-3-Clause", + "url": "https://github.com/scopatz/xontrib-kitty", "install": { - "pip": "xpip install xontrib-powerline" + "conda": "conda install -c conda-forge xontrib-kitty", + "pip": "xpip install xontrib-kitty" } }, - "xontrib-thefuck": { + "xontrib-prompt-ret-code": { "license": "MIT", - "url": "https://github.com/meatballs/xontrib-thefuck", + "url": "https://github.com/Siecje/xontrib-prompt-ret-code", "install": { - "pip": "xpip install xontrib-thefuck" + "pip": "xpip install xontrib-prompt-ret-code" } }, "xontrib-prompt-vi-mode": { @@ -309,11 +318,18 @@ "pip": "xpip install xontrib-prompt-vi-mode" } }, - "xontrib-fzf-widgets": { - "license": "GPLv3", - "url": "https://github.com/shahinism/xontrib-fzf-widgets", + "xontrib-powerline": { + "license": "MIT", + "url": "https://github.com/santagada/xontrib-powerline", "install": { - "pip": "xpip install xontrib-fzf-widgets" + "pip": "xpip install xontrib-powerline" + } + }, + "xontrib-readable-traceback": { + "license": "MIT", + "url": "https://github.com/6syun9/xontrib-readable-traceback", + "install": { + "pip": "xpip install xontrib-readable-traceback" } }, "xontrib-schedule": { @@ -322,6 +338,27 @@ "install": { "pip": "xpip install xontrib-schedule" } + }, + "xontrib-ssh-agent": { + "license": "MIT", + "url": "https://bitbucket.org/dyuri/xontrib-ssh-agent", + "install": { + "pip": "xpip install xontrib-ssh-agent" + } + }, + "xontrib-thefuck": { + "license": "MIT", + "url": "https://github.com/meatballs/xontrib-thefuck", + "install": { + "pip": "xpip install xontrib-thefuck" + } + }, + "xontrib-z": { + "license": "GPLv3", + "url": "https://github.com/astronouth7303/xontrib-z", + "install": { + "pip": "xpip install xontrib-z" + } } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/xonsh/xontribs.py new/xonsh-0.9.7/xonsh/xontribs.py --- old/xonsh-0.9.5/xonsh/xontribs.py 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/xonsh/xontribs.py 2019-06-28 23:30:35.000000000 +0200 @@ -11,11 +11,6 @@ from xonsh.tools import print_color, unthreadable -@functools.lru_cache(1) -def xontribs_json(): - return os.path.join(os.path.dirname(__file__), "xontribs.json") - - def find_xontrib(name): """Finds a xontribution from its name.""" if name.startswith("."): @@ -76,8 +71,38 @@ @functools.lru_cache() def xontrib_metadata(): """Loads and returns the xontribs.json file.""" - with open(xontribs_json(), "r") as f: - md = json.load(f) + impres = None + pkg_resources = None + + # NOTE: Reduce all of these alternate implementations when the minimum Python + # is >=3.7 + try: + # Python 3.7 + import importlib.resources as impres + except ImportError: + try: + # Optional backport for <3.7 + import importlib_resources as impres + except ImportError: + try: + # Try the slower and clunkier pkg_resources + # This is only available if setuptools is part of the environment + import pkg_resources + except ImportError: + pass + + if impres: + with impres.open_text("xonsh", "xontribs.json") as f: + md = json.load(f) + elif pkg_resources: + # Despite the name, this is a bytes + bytesdata = pkg_resources.resource_string("xonsh", "xontribs.json") + md = json.loads(bytesdata.decode("utf-8")) + else: + path = os.path.join(os.path.dirname(__file__), "xontribs.json") + with open(path, "r") as f: + md = json.load(f) + return md diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.9.5/xontrib/bashisms.py new/xonsh-0.9.7/xontrib/bashisms.py --- old/xonsh-0.9.5/xontrib/bashisms.py 2019-05-31 21:51:18.000000000 +0200 +++ new/xonsh-0.9.7/xontrib/bashisms.py 2019-06-28 23:30:35.000000000 +0200 @@ -3,10 +3,6 @@ import sys import re -from prompt_toolkit.keys import Keys -from prompt_toolkit.filters import Condition, EmacsInsertMode, ViInsertMode - -from xonsh.platform import ptk_shell_type __all__ = () @@ -43,30 +39,6 @@ return re.sub(r"!([!$^*]|[\w]+)", replace_bang, cmd) -@events.on_ptk_create -def custom_keybindings(bindings, **kw): - if ptk_shell_type() == "prompt_toolkit2": - handler = bindings.add - - @Condition - def last_command_exists(): - return len(__xonsh__.history) > 0 - - else: - handler = bindings.registry.add_binding - - @Condition - def last_command_exists(cli): - return len(__xonsh__.history) > 0 - - insert_mode = ViInsertMode() | EmacsInsertMode() - - @handler(Keys.Escape, ".", filter=last_command_exists & insert_mode) - def recall_last_arg(event): - arg = __xonsh__.history[-1].cmd.split()[-1] - event.current_buffer.insert_text(arg) - - def alias(args, stdin=None): ret = 0