* todo
* test: remove usage of DummyEnv and setting .env attribute on xession fixture
one step closer to making too much of tweaking to xession during tests
* test: fix tests vox and gitstatus-prompt
* docs: update test-fixture usage
* fix: import flake8 error
* test: remove direct access to XSH in tests
* test: remove usage of XSH in test files
* todo
* test: use tmp-dir to create stubs
* refactor: use fixture factory to mock out XonshSession
* refactor: remove direct access of XSH from functions
* refactor: remove direct access of XSH from functions
* fix: qa checks
* refactor: rename variables to match their values
* test: update failing tests because it had no PATH set previously
* fix: remove builtins usage from pyghooks.py
* style:
* refactor: update tests to use fixtures
* fix: env varialbe is setup per function
some tests accidentally update the env variables and that is leaking
into next tests
* fix: failing vox tests
* test: set commands_cache per test
* test: fix failing tests
* fix: failing tests on linux
ptk-highlight
* fix: failing tests on Windows
cwd-prompt
* test: copy env as to not affect original object
* fix: lazily evaluate cmds-cache in pyghooks
* test: fix failing tests
* fix: qa errors import
* test: set commands-cache per test
while caching path results
* test: speedup test_thread_local_swap
* fix: failing tests on windows
* refactor: Execer doesn't control session
* refactor: XSH.unload will take care of reversing builtins attrs set
* test: use env.update over monkeypatch
* Revert "test: use env.update over monkeypatch"
This reverts commit 010a5022247a098f1741966b8af1bf758663480e.
* Refactor: Don't modify XSH in Execer
This is not an invariant change - the __del__ method of the execer now does not unload the session. This is probably what we want - the session should be the final arbiter of when it goes out of scope, and we might need an explicit mechanism to handle this.
* Refactor: make import hook Execer explicit
This is ugly for now, but helps raise the global state modifications to the surface
* Style: run black
* Refactor: add `update_cache` to `CommandsCache`
Previously a lot of internal usage of `all_commands` was for the updating side-effect. Now we make that a separate routine.
* Refactor: remove args from XonshSession constructor
* Refactor: move non stateful XonshSession methods to __init__
* Refactor: don't create custom class for namespace
* Refactor: auto-generate set of default builtins
* Refactor: set session attributes to None in constructor
* Refactor: don't test hasattr for known attribute
* Refactor: add methods to restore and disable Python exit
* Refactor: add initial value for XSH.aliases
* Refactor: don't default getattr for known attribute
* Refactor: make _lastflush a closer and move to `load()`
* Fix: catch $path even if empty.
This shouldn't ever actually manifest itself, but whilst we're here!
* Refactor: support existing usage of install_import_hooks
* Style: run black
* Refactor: remove unneeded import
* Docs: add news item
* Fix: news item
* Refactor: remove unused arg
* docs: fix news item
* fix: no duplicate calls
add helpers properties to completion-context
* refactor: importing a module should not affect the session
the user has to have XSH loaded before
* fix: todo item for testing imphooks
Co-authored-by: Noortheen Raja <jnoortheen@gmail.com>
* feat: improve pip completer
* refactor: optimize imports
* fix: update tests for other completers
* fix: failing tests
* test: fix failing tests
* refactor: make error message clear
exception like KeyError will be more clear now
* qs import
* fix: failing tests on windows
* fix: failing tests on windows
* fix: failing tests on windows
* refactor: optimize imports
* specs: Make sure sub-specs are always captured regardless of $XONSH_CAPTURE_ALWAYS
* procs: Ensure env is used in functional aliases
* news: Add always-capture-aliases
* tests: procs: Skip known issues
* tests: Restore all builtins in the 'xonsh_builtins' fixture
* tests: vc: Use monkeypatch to mock CommandsCache functions
* tests: main: Don't use the local machine's xonshrc
* feat: use ArgparserAlias for xonfig
* test: update test for xonfig completions
* refactor: update docs
* refactor: use function based completer
* fix: remove old import
* docs:
* fix: merge issues
* test: move xsh_with_aliases to root conftest.py
* docs:
* feat: set subparser's prog from func-name
* feat: add colored help formatter and alias builder
closes#4284
* feat: add auto-completion support to argparser
* test: update test for completer
* fix: getting doc from params that have annotation
* refactor: use filter-function for checking alias completions
* doc: add discussion abount check for alias having parser
see discussion on
https://github.com/xonsh/xonsh/pull/4267
* type fix
* refactor: use function based completer
* test: fix failing argparser test
* docs: update news item
* update completion for argparser sub-commands to append_space
from comment on
https://github.com/xonsh/xonsh/pull/4267#discussion_r676044508
* docs: update docstring typo
* refactor: move inspect import to top
* feat: support option strings before positionals
and add env setting for showing completions for options by default
* test: update tests after adding new $ALIAS_COMPLETIONS_OPTIONS_BY_DEFAULT
* add suggested completion_context_parse fixture
* docs: add suggested doc for dispatch function
* refactor: use try/except for import of typing.annotated
* refactor: move complete_argparser_aliases to completers/aliases.py
* refactor: move argparser completer to its own module
* style:
* refactor: rename completer to not clash with argparse
* fix: expand option's descriptions
* fix: add completer/argparser to amalgam
* chore: adding py310 to ci
though this will require code/parser changes, this is to prepare for
upcoming adoption
* fix: set python version as string
* fix: reference to master -> main
* fix: coverage is not reported in master
- disable amalgamation
1. during coverage report tests
2. qa tools like mypy may follow imports
- use python 3.9 for coverage and qa report. since it will have more
coverage and better typing support
* chore: use py3.10 with setup-py action
* chore: add news-item check job
* fix: py3.10 error while starting
the match statement is not supported.
while the syntax support is only upto py3.8
* fix: news-item checker
* chore: enable fail report for py310 tests
* test: add test for ptk_shell
* refactor: remove usage of global variables in abbrevs.py
* chore: add flake8-mutable to prevent mutable defaults
* fix: abbrevs expand test
* refactor: add xonsh session singleton
* refactor: fix circular errors when using xonshSession as singleton
* refactor: remove black magicked builtin attributes
* style: black format tests as well
* refactor: update tests to use xonsh-session singleton
* refactor: update abbrevs to not use builtins
* test: remove DummyCommandsCache and patch orig class
* fix: failing test_command_completers
* test: use monkeypatch to update xession fixture
* fix: failing test_pipelines
* fix: failing test_main
* chore: run test suit as single invocation
* test: fix tests/test_xonsh.xsh
* refactor: remove builtins from docs/conf.py
* fix: mypy error in jobs
* fix: test error from test_main
* test: close xession error in test_command_completers
* chore: use pytest-cov for reporting coverage
this will include subprocess calls, and will increase coverage
* style:
- Moves the f-string handler into a separate FStringAdaptor class.
- Removes helper dictionary mapping int ID to f-string field.
The f-string fields are now rather patched early directly into the
AST as an argument to eval_fstring_field. This solves the problems
with f-string fields lifespan management.