Hello community, here is the log from the commit of package xonsh for openSUSE:Factory checked in at 2018-05-11 09:19:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xonsh (Old) and /work/SRC/openSUSE:Factory/.xonsh.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xonsh" Fri May 11 09:19:08 2018 rev:4 rq:606300 version:0.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/xonsh/xonsh.changes 2018-05-08 13:36:40.874979574 +0200 +++ /work/SRC/openSUSE:Factory/.xonsh.new/xonsh.changes 2018-05-11 09:19:11.236532291 +0200 @@ -1,0 +2,23 @@ +Sun May 6 08:31:32 UTC 2018 - [email protected] + +- update to version 0.6.3: + * Added: + * Docs for using ``@(<expr>)`` as a way to run commands and a gotcha about + list of strings vs single string expressions. + * Ubuntu versions which xonsh is packaged for (with xonsh versions) + * Changed: + * When reporting errors without a traceback (i.e. ``$XONSH_SHOW_TRACEBACK = False``) and the error is a ``XonshError`` + the exception type is not longer printed. + * ``CommandPipeline.proc`` may now be ``None``, to accomodate when the process + fails to even start (i.e. a missing command or incorrect permisions). + * Fixed: + * The ``curl`` command will now be run in a thread, which prevents documents that + do not end in a newline from writing over the next prompt and vice versa. + * Fix bug on Windows when ``PATHEXT`` environment variable did not exist. + This also fixes building the xonsh documentation on Windows. + * Fixed a bug in the `free_cwd <http://xon.sh/xontribs.html#free-cwd>`__ Windows Xontrib, which caused the prompt to error if the current directory is + deleted/renamed from an other process. + * Fixed issue with ``$XONSH_SHOW_TRACEBACK`` not being respected in subprocess + mode when the command could not be found or had incorrect permissions. + +------------------------------------------------------------------- Old: ---- 0.6.2.tar.gz New: ---- 0.6.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xonsh.spec ++++++ --- /var/tmp/diff_new_pack.LpVAzu/_old 2018-05-11 09:19:12.236496059 +0200 +++ /var/tmp/diff_new_pack.LpVAzu/_new 2018-05-11 09:19:12.240495914 +0200 @@ -17,7 +17,7 @@ Name: xonsh -Version: 0.6.2 +Version: 0.6.3 Release: 0 Summary: A general purpose, Python-ish shell License: BSD-3-Clause AND BSD-2-Clause ++++++ 0.6.2.tar.gz -> 0.6.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/.appveyor.yml new/xonsh-0.6.3/.appveyor.yml --- old/xonsh-0.6.2/.appveyor.yml 2018-04-24 03:37:28.000000000 +0200 +++ new/xonsh-0.6.3/.appveyor.yml 2018-05-04 21:53:23.000000000 +0200 @@ -1,4 +1,4 @@ -version: 0.6.2.{build} +version: 0.6.3.{build} os: Windows Server 2012 R2 environment: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/CHANGELOG.rst new/xonsh-0.6.3/CHANGELOG.rst --- old/xonsh-0.6.2/CHANGELOG.rst 2018-04-24 03:37:28.000000000 +0200 +++ new/xonsh-0.6.3/CHANGELOG.rst 2018-05-04 21:53:23.000000000 +0200 @@ -4,6 +4,38 @@ .. current developments +v0.6.3 +==================== + +**Added:** + +* Docs for using ``@(<expr>)`` as a way to run commands and a gotcha about + list of strings vs single string expressions. +* Ubuntu versions which xonsh is packaged for (with xonsh versions) + + +**Changed:** + +* When reporting errors without a traceback (i.e. ``$XONSH_SHOW_TRACEBACK = False``) and the error is a ``XonshError`` + the exception type is not longer printed. +* ``CommandPipeline.proc`` may now be ``None``, to accomodate when the process + fails to even start (i.e. a missing command or incorrect permisions). + + +**Fixed:** + +* The ``curl`` command will now be run in a thread, which prevents documents that + do not end in a newline from writing over the next prompt and vice versa. +* Fix bug on Windows when ``PATHEXT`` environment variable did not exist. + This also fixes building the xonsh documentation on Windows. +* Fixed a bug in the `free_cwd <http://xon.sh/xontribs.html#free-cwd>`__ Windows Xontrib, which caused the prompt to error if the current directory is + deleted/renamed from an other process. +* Fixed issue with ``$XONSH_SHOW_TRACEBACK`` not being respected in subprocess + mode when the command could not be found or had incorrect permissions. + + + + v0.6.2 ==================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/docs/conf.py new/xonsh-0.6.3/docs/conf.py --- old/xonsh-0.6.2/docs/conf.py 2018-04-24 03:37:28.000000000 +0200 +++ new/xonsh-0.6.3/docs/conf.py 2018-05-04 21:53:23.000000000 +0200 @@ -294,7 +294,7 @@ default=vd.default, store_as_str=vd.store_as_str) s = s[:-9] fname = os.path.join(os.path.dirname(__file__), 'envvarsbody') - with open(fname, 'w') as f: + with open(fname, 'w', encoding='utf-8') as f: f.write(s) @@ -319,7 +319,8 @@ ':Website: {url}\n' ':Package: {pkg}\n\n' '{desc}\n\n' - '{inst}' + '{inst}\n\n' + '{usage}' '-------\n\n') for name in names: for d in md['xontribs']: @@ -334,6 +335,7 @@ if pkgname is None: pkg = 'unknown' inst = '' + usage = '' else: pd = md['packages'].get(pkgname, {}) pkg = pkgname @@ -343,16 +345,24 @@ pkg = pkg + ', ' + pd['license'] inst = '' installd = pd.get('install', {}) - if len(installd) > 0: + if pkgname == 'xonsh': + inst = ('This xontrib is preinstalled with xonsh.\n\n') + elif len(installd) > 0: inst = ('**Installation:**\n\n' '.. code-block:: xonsh\n\n') for k, v in sorted(pd.get('install', {}).items()): cmd = "\n ".join(v.split('\n')) inst += (' # install with {k}\n' - ' {cmd}\n\n').format(k=k, cmd=cmd) + ' {cmd}').format(k=k, cmd=cmd) + usage = ('**Usage:**\n\n' + 'Run the following command to enable (or add ' + 'it to your :doc:`.xonshrc </xonshrc>` file to enable ' + 'on startup.)\n\n' + '.. code-block:: xonsh\n\n') + usage += ' xontrib load {}\n\n'.format(name) s += sec.format(low=name.lower(), title=title, under=under, url=d.get('url', 'unknown'), desc=desc, - pkg=pkg, inst=inst) + pkg=pkg, inst=inst, usage=usage) s = s[:-9] fname = os.path.join(os.path.dirname(__file__), 'xontribsbody') with open(fname, 'w') as f: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/docs/devguide.rst new/xonsh-0.6.3/docs/devguide.rst --- old/xonsh-0.6.2/docs/devguide.rst 2018-05-11 09:19:12.456488088 +0200 +++ new/xonsh-0.6.3/docs/devguide.rst 2018-05-11 09:19:12.484487074 +0200 @@ -1 +1 @@ -symbolic link to ../CONTRIBUTING.rst +symbolic link to .. include:: ../CONTRIBUTING.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/docs/linux.rst new/xonsh-0.6.3/docs/linux.rst --- old/xonsh-0.6.2/docs/linux.rst 2018-04-24 03:37:28.000000000 +0200 +++ new/xonsh-0.6.3/docs/linux.rst 2018-05-04 21:53:23.000000000 +0200 @@ -40,6 +40,9 @@ $ apt install xonsh +Xonsh is available on bionic bever (version 0.6.0) and artful aardvark +(version 0.5.12). + Fedora users can install xonsh from the repository with: **dnf:** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/docs/osx.rst new/xonsh-0.6.3/docs/osx.rst --- old/xonsh-0.6.2/docs/osx.rst 2018-04-24 03:37:28.000000000 +0200 +++ new/xonsh-0.6.3/docs/osx.rst 2018-05-04 21:53:23.000000000 +0200 @@ -5,7 +5,7 @@ Installation ============ -You can install xonsh using homebrew, conda, pip, or from source. +You can install xonsh using a package manager including homebrew, macports, conda, pip, or from source. **homebrew:** @@ -14,6 +14,12 @@ $ brew install xonsh +**MacPorts:** + +.. code-block:: console + + $ sudo port install xonsh + **conda:** .. code-block:: console @@ -37,13 +43,23 @@ $ python3 setup.py install +Extras for macOS +================== +readline +-------- + +On macOS, it is *strongly* recommended to install the ``gnureadline`` library if using the readline shell. ``gnureadline`` can be installed via pip: + +.. code-block:: console + + $ pip3 install gnureadline Path Helper -=========== +----------- macOS provides a `path helper <http://www.softec.lu/site/DevelopersCorner/MasteringThePathHelper>`_, -which by default configures paths in bash and other shells. Without +which by default configures paths in bash and other POSIX or C shells. Without including these paths, common tools including those installed by Homebrew may be unavailable. See ``/etc/profile`` for details on how it is done. To ensure the path helper is invoked on xonsh (for all users), add the @@ -56,20 +72,39 @@ source-bash --seterrprevcmd "" /etc/profile -Extras for OSX -============== -On Mac OSX, it is *strongly* recommended to install the ``gnureadline`` library if using the readline shell. ``gnureadline`` can be installed via pip: +Tab completion +-------------- +Xonsh has support for using bash completion files on the shell, to use it you need to install the bash-completion package. The regular bash-completion package uses v1 which mostly works, but `occasionally has rough edges <https://github.com/xonsh/xonsh/issues/2111>`_ so we recommend using bash-completion v2. -.. code-block:: console +Bash completion comes from <https://github.com/scop/bash-completion> which suggests you use a package manager to install it, this manager will also install a new version of bash without affecting /bin/bash. Xonsh also needs to be told where the bash shell file that builds the completions is, this has to be added to $BASH_COMPLETIONS. The package includes completions for many Unix commands. - $ pip3 install gnureadline +Common packaging systems for MacOs include -Xonsh has support for using bash completion files on the shell, to use it you need to install the bash-completion package. The regular bash-completion package uses v1 which mostly works, but `occasionally has rough edges <https://github.com/xonsh/xonsh/issues/2111>`_ so we recommend using bash-completion v2 which is installed using the bash-completion2 package. + - Homebrew where the bash-completion2 package needs to be installed. -.. code-block:: console + .. code-block:: console + + $ brew install bash-completion2 + + This will install the bash_completion file in `/usr/local/share/bash-completion/bash_completion` which is in the current xonsh code and so should just work. + + - `MacPorts <https://trac.macports.org/wiki/howto/bash-completion>`_ where the bash-completion port needs to be installed. + + .. code-block:: console + + $ sudo port install bash-completion + + + + This includes a bash_completion file that needs to be added to the environment. + + .. code-block:: console + + $ $BASH_COMPLETIONS.insert(0, '/opt/local/share/bash-completion/bash_completion') + +Note that the `bash completion project page <https://github.com/scop/bash-completion>`_ gives the script to be called as in .../profile.d/bash_completion.sh which will the call the script mentioned above and one in $XDG_CONFIG_HOME . Currently xonsh seems only to be able to read the first script directly. - $ brew install bash-completion2 .. include:: dependencies.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/docs/tutorial.rst new/xonsh-0.6.3/docs/tutorial.rst --- old/xonsh-0.6.2/docs/tutorial.rst 2018-04-24 03:37:28.000000000 +0200 +++ new/xonsh-0.6.3/docs/tutorial.rst 2018-05-04 21:53:23.000000000 +0200 @@ -502,6 +502,10 @@ 42 yo >>> echo "hello" | @(lambda a, s=None: s.read().strip() + " world\n") hello world + >>> @(['echo', 'hello', 'world']) + hello world + >>> @('echo hello world') # note that strings are not split automatically + xonsh: subprocess mode: command not found: echo hello world This syntax can be used inside of a captured or uncaptured subprocess, and can be used to generate any of the tokens in the subprocess command list. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/xonsh/__init__.py new/xonsh-0.6.3/xonsh/__init__.py --- old/xonsh-0.6.2/xonsh/__init__.py 2018-04-24 03:37:28.000000000 +0200 +++ new/xonsh-0.6.3/xonsh/__init__.py 2018-05-04 21:53:23.000000000 +0200 @@ -1,4 +1,4 @@ -__version__ = '0.6.2' +__version__ = '0.6.3' # amalgamate exclude jupyter_kernel parser_table parser_test_table pyghooks diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/xonsh/commands_cache.py new/xonsh-0.6.3/xonsh/commands_cache.py --- old/xonsh-0.6.2/xonsh/commands_cache.py 2018-04-24 03:37:28.000000000 +0200 +++ new/xonsh-0.6.3/xonsh/commands_cache.py 2018-05-04 21:53:23.000000000 +0200 @@ -61,7 +61,7 @@ name on Windows as a list, conserving the ordering in `PATHEXT`. Returns a list as `name` being the only item in it on other platforms.""" if ON_WINDOWS: - pathext = builtins.__xonsh_env__.get('PATHEXT') + pathext = builtins.__xonsh_env__.get('PATHEXT', []) name = name.upper() return [ name + ext @@ -343,6 +343,7 @@ 'clear': predict_false, 'cls': predict_false, 'cmd': predict_shell, + 'curl': predict_true, 'ex': predict_false, 'emacsclient': predict_false, 'fish': predict_shell, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/xonsh/jobs.py new/xonsh-0.6.3/xonsh/jobs.py --- old/xonsh-0.6.2/xonsh/jobs.py 2018-04-24 03:37:28.000000000 +0200 +++ new/xonsh-0.6.3/xonsh/jobs.py 2018-05-04 21:53:23.000000000 +0200 @@ -221,7 +221,7 @@ to_remove = set() for tid in tasks: obj = get_task(tid)['obj'] - if obj.poll() is not None: + if obj is None or obj.poll() is not None: to_remove.add(tid) for job in to_remove: tasks.remove(job) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/xonsh/proc.py new/xonsh-0.6.3/xonsh/proc.py --- old/xonsh-0.6.2/xonsh/proc.py 2018-04-24 03:37:28.000000000 +0200 +++ new/xonsh-0.6.3/xonsh/proc.py 2018-05-04 21:53:23.000000000 +0200 @@ -1765,9 +1765,11 @@ self.starttime = time.time() try: proc = spec.run(pipeline_group=pipeline_group) - except XonshError: + except Exception: + print_exception() self._return_terminal() - raise + self.proc = None + return if proc.pid and pipeline_group is None and not spec.is_proxy and \ self.captured != 'object': pipeline_group = proc.pid @@ -1804,6 +1806,8 @@ # get appropriate handles spec = self.spec proc = self.proc + if proc is None: + return timeout = builtins.__xonsh_env__.get('XONSH_PROC_FREQUENCY') # get the correct stdout stdout = proc.stdout @@ -2067,22 +2071,26 @@ if p.poll() is None: any_running = True continue - self._safe_close(p.stdin) self._safe_close(s.stdin) - self._safe_close(p.stdout) self._safe_close(s.stdout) - self._safe_close(p.stderr) self._safe_close(s.stderr) + if p is None: + continue + self._safe_close(p.stdin) + self._safe_close(p.stdout) + self._safe_close(p.stderr) return False if any_running else (len(self) > 1) def _close_prev_procs(self): """Closes all but the last proc's stdout.""" for s, p in zip(self.specs[:-1], self.procs[:-1]): self._safe_close(s.stdin) - self._safe_close(p.stdin) self._safe_close(s.stdout) - self._safe_close(p.stdout) self._safe_close(s.stderr) + if p is None: + continue + self._safe_close(p.stdin) + self._safe_close(p.stdout) self._safe_close(p.stderr) def _close_proc(self): @@ -2090,16 +2098,20 @@ s = self.spec p = self.proc self._safe_close(s.stdin) - self._safe_close(p.stdin) self._safe_close(s.stdout) - self._safe_close(p.stdout) self._safe_close(s.stderr) - self._safe_close(p.stderr) self._safe_close(s.captured_stdout) self._safe_close(s.captured_stderr) + if p is None: + return + self._safe_close(p.stdin) + self._safe_close(p.stdout) + self._safe_close(p.stderr) def _set_input(self): """Sets the input variable.""" + if self.proc is None: + return stdin = self.proc.stdin if stdin is None or isinstance(stdin, int) or stdin.closed or \ not stdin.seekable() or not safe_readable(stdin): @@ -2127,7 +2139,7 @@ """Applies the results to the current history object.""" hist = builtins.__xonsh_history__ if hist is not None: - hist.last_cmd_rtn = self.proc.returncode + hist.last_cmd_rtn = 1 if self.proc is None else self.proc.returncode def _raise_subproc_error(self): """Raises a subprocess error, if we are supposed to.""" @@ -2191,6 +2203,8 @@ def returncode(self): """Process return code, waits until command is completed.""" self.end() + if self.proc is None: + return 1 return self.proc.returncode rtn = returncode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/xonsh/tools.py new/xonsh-0.6.3/xonsh/tools.py --- old/xonsh-0.6.2/xonsh/tools.py 2018-04-24 03:37:28.000000000 +0200 +++ new/xonsh-0.6.3/xonsh/tools.py 2018-05-04 21:53:23.000000000 +0200 @@ -842,12 +842,14 @@ sys.stderr.write(msg) -def display_error_message(): +def display_error_message(strip_xonsh_error_types=True): """ Prints the error message of the current exception on stderr. """ exc_type, exc_value, exc_traceback = sys.exc_info() exception_only = traceback.format_exception_only(exc_type, exc_value) + if exc_type is XonshError and strip_xonsh_error_types: + exception_only[0] = exception_only[0].partition(': ')[-1] sys.stderr.write(''.join(exception_only)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/xonsh/xontribs.json new/xonsh-0.6.3/xonsh/xontribs.json --- old/xonsh-0.6.2/xonsh/xontribs.json 2018-04-24 03:37:28.000000000 +0200 +++ new/xonsh-0.6.3/xonsh/xontribs.json 2018-05-04 21:53:23.000000000 +0200 @@ -84,13 +84,13 @@ "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", + "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": "whole_word_jumping", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xonsh-0.6.2/xontrib/free_cwd.py new/xonsh-0.6.3/xontrib/free_cwd.py --- old/xonsh-0.6.2/xontrib/free_cwd.py 2018-04-24 03:37:28.000000000 +0200 +++ new/xonsh-0.6.3/xontrib/free_cwd.py 2018-05-04 21:53:23.000000000 +0200 @@ -23,7 +23,7 @@ path = Path(path) try: os.chdir(path) - return path + return str(path.absolute()) except (FileNotFoundError, NotADirectoryError): path.resolve() return _chdir_up(path.parent)
