Xonsh

Latest version: v0.16.0

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

Scan your dependencies

Page 11 of 20

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

0.7.9

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

**Added:**

* The python-mode ``(expr)`` syntax may now be used inside of subprocess
arguments, not just as a stand-alone argument. For example:

.. code-block:: sh

$ x = 'hello'
$ echo /path/to/(x)
/path/to/hello

This syntax will even properly expand to the outer product if the ``expr``
is a list (or other non-string iterable) of values:

.. code-block:: sh

$ echo /path/to/(['hello', 'world'])
/path/to/hello /path/to/world

$ echo (['a', 'b']):('x', 'y')
a:x a:y b:x b:y

Previously this was not possible.
* New ``$DOTGLOB`` environment variable enables globs to match
"hidden" files which start with a literal ``.``. Set this
variable to ``True`` to get this matching behavior.
Cooresponding API changes have been made to
``xonsh.tools.globpath()`` and ``xonsh.tools.iglobpath()``
* New environment variable ``$FOREIGN_ALIASES_SUPPRESS_SKIP_MESSAGE``
enables the removal of skipping foreign alias messages.
* New ``--suppress-skip-message`` command line option for skipping
foreign alias messages when sourcing foreign shells.


**Fixed:**

* In Bash completions, if there are no files to source, a ``set()`` will
no longer be inserted into the completion script.
* Fixed issue with TAB completion in readline not replacing values
with spaces properly when the prefix was unquoted.

Page 11 of 20

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.