With the tracer on, modules at shutdown can be destroyed in an order
that prevents the `trace()` function from working. This was currently
the case with Python 3.13 where the function was still being called
during the `xonsh.tracer` module's destruction.
This change adds a test to prevent this from happening in the future,
and works around the issue by creating local references to necessary
functions that were otherwise set to None at shutdown.
* Added Copy Functionality.
Implemented click-to-copy functionality for specific code areas, displaying an alert upon successful copy.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fix SQL injection in history delete on the sqlite backend
Also, return a value from history delete on the sqlite backend. Otherwise the
command always responded with "Deleted None entries from history".
Also, use XH_SQLITE_TABLE_NAME consistently across xonsh.history.sqlite.
Before, most of the calls used the variable, but part of them hard-coded the
table name.
* Add news entry
* Fix ReST syntax in changelog entry
* Don't append a space if the single available completion ends with a directory separator
* Update subprocess-completions-dir-spaces.rst
---------
Co-authored-by: Andy Kipp <anki-code@users.noreply.github.com>
* add --session-id option to `history pull` command
* implement `history pull` for JSON history
* add news item for `history pull` updates
* add documentation for history pull `--session-id` option
* add explanatory comment for sleep in test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update json-history-pull.rst
* fix failing tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Andy Kipp <anki-code@users.noreply.github.com>
* fix combining consecutive history entries when loading ptk shell
* add test case for combining history items
* add news item for PTK history combining
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update ptk-history-combining.rst
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Andy Kipp <anki-code@users.noreply.github.com>
* propagate SIGHUP to child processes
* do not wait for active job if shell is exiting
* move on_postcommand event out of _append_history and document behavior
* add changelog
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update built_ins.py
* Update hup-propagation.rst
* use sys.exc_info instead of sys.exception for version compatibility
* update test_default_append_history to work with new history/postcommand interaction
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add tests for SIGHUP forwarding and postcommand blocking
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix linting errors in news entry
* use tmpdir fixture in sighup tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update test_integrations.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Andy Kipp <anki-code@users.noreply.github.com>
* feat(environ): allow XONSH_*_DIR to be configurable
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* test(env): add env var test
* fix(test): move test to test_environ
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update test_environ.py
* Update configurable-xonsh-dirs.rst
---------
Co-authored-by: Artur Manuel <balkenix@outlook.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Andy Kipp <anki-code@users.noreply.github.com>
* env: add `PROMPT_TOOLKIT_CURSOR_SHAPE` for configuring `prompt_toolkit` cursor shape
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* accepting prompt_toolkit.cursor_shapes.CursorShape as value
* rename PROMPT_TOOLKIT_CURSOR_SHAPE => XONSH_PROMPT_CURSOR_SHAPE
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* test
* test
* test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* test
---------
Co-authored-by: Andy Kipp <no@no.no>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Andy Kipp <123@321.123>
* test: split a test to include Windows
(moving non-Win commands like ls to a separate test)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* try just using CaseSenssitiveDict from requests to see if it works
* put the dependency back in pyproject.toml and ignore typing on import
* news
* code now passing tests locally. I still need to write tests for the new Class
* tests for CaseInsensitiveDict
Some combination of these tests is hanging CI, but so far isn't
reproducible locally. Need to narrow it down, but this is to unblock
other work.
test(ubuntu): skip all pipeline tests on Ubuntu on Python 3.12
test(specs): skip specs tests instead
test(pipelines): actually skip the pipeline tests
test: skip jobs
test: skip specs
test: only skip specs
test: skip specs and pipelines
This removes the false statement that Haskell and other functional programming languages does need nor not have macros.
Lisp is a functional programming language with macros at the core of the language. For Haskell specifically its called [Template Haskell](https://wiki.haskell.org/Template_Haskell).
There's also Erlang which has a token based macro system, something between the C preprocessor and Lisp. Elixir, a newer language in the same ecosystem as Erlang, has full procedural macros. This is similar to the macros in Xonsh; regular functions that take AST nodes as input and return a, potentially different, AST node.