Xonsh

Latest version: v0.19.0

Safety actively analyzes 688568 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 12 of 21

0.8.4

====================

**Added:**

* Added the possibility of arbitrary paths to the help strings in ``vox activate`` and
``vox remove``; also updated the documentation accordingly.
* New ``xonsh.aliases.ExecAlias`` class enables multi-statement aliases.
* New ``xonsh.ast.isexpression()`` function will return a boolean of whether
code is a simple xonsh expression or not.
* Added top-level ``run-tests.xsh`` script for safely running the test suite.


**Changed:**

* String aliases are no longer split with ``shlex.split()``, but instead use
``xonsh.lexer.Lexer.split()``.
* Update xonsh/prompt/cwd.py _collapsed_pwd to print 2 chars if a directory begins with "."
* test which determines whether a directory is a virtualenv

previously it used to check the existence of 'pyvenv.cfg'
now it checks if 'bin/python' is executable


**Fixed:**

* Fixed issue with ``and`` & ``or`` being incorrectly tokenized in implicit
subprocesses. Auto-wrapping of certain subprocesses will now correctly work.
For example::

$ echo x-and-y
x-and-y
* Fix EOFError when press `control+d`
* fix no candidates if no permission files in PATH
* Fixed interpretation of color names with PTK2 and Pygments 2.3.
* Several ResourceWarnings: unclosed file in tests
* AttributeError crash when using --timings flag
* issue 2929

0.8.3

====================

**Added:**

* Dociumentation paragrapgh about gow to run xonsh in Emacs shell


**Changed:**

* Updated what pip requirements are needed to build the documnetaion
* ``$XONSH_TRACEBACK_LOGFILE`` now beside strings also accepts ``os.PathLike``
objects.
* Updated vended version of ``ply`` to 3.11
* Deprecation warnings now print from stacklevel 3.


**Fixed:**

* Annotation assignment statements (e.g. ``x : int = 42``) are now supported.
* Fixed error output wording for fg and bg commands
* Flake8 errors
* xonsh can now properly parse import statements with trailing comma within
parentheses, e.g.::

from x import (y, z,)
* ResourceWarning: unclosed scandir iterator in imphooks.py
* Removed use of deprecated ``inspect.formatargspec()`` for ``inspect.signature()``
* ``Makefile`` directive that updates vended version of ``ply``

0.8.2

====================

**Changed:**

* Now there is only a single instance of ``string.Formatter()`` in the
code base, which is called ``xonsh.tools.FORMATTER``.


**Fixed:**

* f-strings (``f"{expr}"``) are now fully capable of executing xonsh expressions.
The one exception to this is that ``![cmd]`` and ``!(cmd)`` don't work because
the ``!`` character interferes with Python string formatting. If you need to
run subprocesses inside of f-strings, use ``$[cmd]`` and ``$(cmd)`` instead.
* Fixed occasional "no attribute 'settitle' error"

0.8.1

====================

**Added:**

* ``SubprocSpec`` has a new ``pipeline_index`` integer attribute that indicates
the commands position in a pipeline. For example, in

.. code-block:: sh

p = ![ls -l | grep x]

The ``ls`` command would have a pipeline index of 0
(``p.specs[0].pipeline_index == 0``) and ``grep`` would have a pipeline index
of 1 (``p.specs[1].pipeline_index == 1``). This may be usefule in callable
alaises which recieve the spec as an argument.


**Changed:**

* Removed ``fish`` from list of supported foreign shells in the wizard.
* Circle CI config updated to use a pinned version of ``black`` (18.9b0)
* Pytest plugin now uses ``xonsh.main.setup()`` to setup test environment.
* Linux platform discovery will no longer use ``platform.linux_distribution()``
on Python >=3.6.6. due to pending deprecation warning.
* Updated Linux Guide as Xonsh is now available in Arch Linux official repositories.


**Fixed:**

* Builtin dynamic proxies and deprecation warning proxies were not deleting
attributes and items properly.
* Fixed stdout/sdterr writing infinite recursion error that would occur in
long pipelines of callable aliases.
* Fixed a bug which under very rare conditions could cause the shell
to die with PermissionError exception while sending SIGSTOP signal
to a child process.
* Fixed further raw string deprecation warnings thoughout the code base.

0.8.0

====================

**Added:**

* Windows CI jobs on Azure Pipelines
* The ``cryptop`` command will no longer have its output captured
by default.
* Added new env-var ``PTK_STYLE_OVERRIDES``. The variable is
a dictionary containing custom prompt_toolkit style definitions.
For instance::

$PTK_STYLE_OVERRIDES['completion-menu'] = 'bg:333333 EEEEEE'

will provide for more visually pleasing completion menu style whereas::

$PTK_STYLE_OVERRIDES['bottom-toolbar'] = 'noreverse'

will prevent prompt_toolkit from inverting the bottom toolbar colors
(useful for powerline extension users)

Note: This only works with prompt_toolkit 2 prompter.


**Changed:**

* All ``__xonsh_*__`` builtins have been migrated to a ``XonshSession`` instance at
``__xonsh__``. E.g. ``__xonsh_env__`` is now ``__xonsh__.env``.
* Other xonsh-specific builtins (such as ``XonshError``) have been proxied to
the ``__xonsh__`` session object as well.


**Deprecated:**

* All ``__xonsh_*__`` builtins are deprected. Instead, the corresponding
``__xonsh__.*`` accessor should be used. The existing ``__xonsh_*__`` accessors
still work, but issue annoying warnings.


**Fixed:**

* Fixed deprecation warnings from unallowed escape sequences as well as importing abstract base classes directly from ``collections``
* Fix for string index error in stripped prefix
* bash_completions to include special characters in lprefix

Previously, glob expansion characters would not be included in lprefix for replacement

.. code-block:: sh

$ touch /tmp/abc
$ python
>>> from bash_completion import bash_completions
>>>
>>> def get_completions(line):
... split = line.split()
... if len(split) > 1 and not line.endswith(' '):
... prefix = split[-1]
... begidx = len(line.rsplit(prefix)[0])
... else:
... prefix = ''
... begidx = len(line)
... endidx = len(line)
... return bash_completions(prefix, line, begidx, endidx)
...
>>> get_completions('ls /tmp/a*')
({'/tmp/abc '}, 0)

Now, lprefix begins at the first special character:

.. code-block:: sh

$ python
>>> from bash_completion import bash_completions
>>>
>>> def get_completions(line):
... split = line.split()
... if len(split) > 1 and not line.endswith(' '):
... prefix = split[-1]
... begidx = len(line.rsplit(prefix)[0])
... else:
... prefix = ''
... begidx = len(line)
... endidx = len(line)
... return bash_completions(prefix, line, begidx, endidx)
...
>>> get_completions('ls /tmp/a*')
({'/tmp/abc '}, 7)
* The ``xonsh.main.setup()`` function now correctly passes the
``shell_type`` argument to the shell instance.
* try_subproc_toks now works for subprocs with trailing and leading whitespace

Previously, non-greedy wrapping of commands would fail if they had leading and trailing whitespace:

.. code-block:: sh

$ true && false || echo a
xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True
NameError: name 'false' is not defined

$ echo; echo && echo a

xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True
NameError: name 'echo' is not defined

Now, the commands are parsed as expected:

.. code-block:: sh

$ true && false || echo a
a

$ echo; echo && echo a


a

0.7.10

====================

**Added:**

* 'off' can be passed as falsy value to all flags accepting boolean argument.
* DragonFly BSD support
* Format strings (f-strings) now allow environment variables to be looked up.
For example, ``f"{$HOME}"`` will yield ``"/home/user"``. Note that this will
look up and fill in the ``detype()``-ed version of the environment variable,
i.e. it's native string representation.


**Changed:**

* Running ``aurman`` command will now be predicted to be unthreaded by default.


**Fixed:**

* The xonsh ``xonfig wizard`` would crash if an unknown foreign shell was
provided. This has been fixed.
* The ``hg split`` command will now predict as unthreadable.
* Fixed path completer crash on attempted f-string completion

Page 12 of 21

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.