Commit graph

1421 commits

Author SHA1 Message Date
David Strobach
5d64139b8f Add support for Python 3.8 star expressions in yield statement 2020-08-26 20:37:19 +02:00
David Strobach
fb664b3456 Fix starred return test 2020-08-26 20:32:53 +02:00
David Strobach
c9d45de556 Add support for Python 3.8 star expressions in return statement 2020-08-26 19:14:45 +02:00
Anthony Scopatz
f048b295d6 black updates to tests and docs 2020-08-26 10:10:59 -05:00
David Strobach
b0336dfbe5 Fix list comprehensions with multiple if clauses 2020-08-25 01:34:59 +02:00
Anthony Scopatz
22610f48d6 THREAD_SUBPROCS=None for xonshrc files 2020-08-20 20:11:37 -05:00
Anthony Scopatz
70bd020858
Merge pull request #3660 from laloch/fstrings
Improve handling of f-strings
2020-08-20 15:25:42 -05:00
David Strobach
5edd851feb Fix literal whitespace being deleted from f-strings
Fixes an issue with
 f"$HOME       = {$HOME}"
resulting in
 "$HOME= /home/foobar"
2020-08-20 05:41:28 +02:00
David Strobach
c3a354781b Finalize f-string handler transition
- 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.
2020-08-17 13:41:11 +02:00
David Strobach
9879fce927 Support Python 3.8 self-documenting f-string expressions 2020-08-17 04:57:39 +02:00
David Strobach
12c8990e53 Fix f-string tests 2020-08-17 04:57:39 +02:00
Anthony Scopatz
43e7827a9a fix tests 2020-08-16 19:13:35 -05:00
Anthony Scopatz
0d1d3574ea Env.rawkeys() 2020-08-16 18:46:02 -05:00
Anthony Scopatz
3c816367bb Merge branch 'ansi_prompt' of https://github.com/dyuri/xonsh into dyuri-ansi_prompt 2020-08-16 17:25:03 -05:00
Gyuri Horak
a4b61f5fc1
Moved tokenize_ansi into ptk_shell.shell, added unit tests for ANSI tokenization. 2020-08-16 20:13:07 +02:00
Anthony Scopatz
fc897fa55c
Merge pull request #3675 from laloch/walrus
Add Python 3.8 assignment expressions ("walrus"/PEP 572)
2020-08-16 10:28:54 -05:00
David Strobach
3a45923b83 Only return string keys while iterating over __xonsh__.env 2020-08-12 03:34:34 +02:00
Anthony Scopatz
377ab8d9de
Merge pull request #3662 from bobhy/is_3661
drop dependence on py.exe on Windows
2020-08-11 20:12:01 -04:00
David Strobach
40436e3a97 Add walrus tests 2020-08-11 18:26:40 +02:00
Bob Hyman
fc492cad97 Skip tests that run xonsh in subproc if not installedDo not try to shoehorn module into PATH(too complex to track Windows vs other VENV). 2020-08-10 17:16:36 -04:00
Bob Hyman
29a7ef09ea Merge branch 'is_3661' of /mnt/c/users/bobhy/src/xonsh into is_3661 2020-08-10 16:15:59 -04:00
Bob Hyman
f4bdbede2b integration tests add only tests/bin to PATH 2020-08-10 16:11:58 -04:00
Bob Hyman
24546280e9 Don't hack PATH for integration tests 2020-08-10 15:08:05 -04:00
Morten Enemark Lund
70da6af287 Merge branch 'fix_test_suite' into vend_ptk 2020-08-10 13:27:58 +02:00
Morten Enemark Lund
c7372342da Fix legitimate builtins has no attribute __xonsh__ errors 2020-08-10 13:24:10 +02:00
Bob Hyman
8740b15462 Run same wc,pwd,cat from tests/bin on Windows.
Run without depending on py.exe
2020-08-10 01:43:51 -04:00
Bob Hyman
c22e80b717 Fix test dependency on xonsh.bat (and xon.sh) 2020-08-10 00:42:36 -04:00
Morten Enemark Lund
a8fd1a3d7f remove mock
has_prompt_toolkit no longer used in xonsh.shell
2020-08-06 14:11:58 +02:00
Morten Enemark Lund
9e1316b0d0 Add test that PTK was vended correctly 2020-08-06 13:26:49 +02:00
Morten Enemark Lund
3ab222b55a Fix ptk shell tests 2020-08-06 13:05:50 +02:00
Anthony Scopatz
c40c9de9ad
Merge pull request #3627 from laloch/argv0
Set argv[0] of a subprocess to the command as inserted by the user
2020-08-05 10:41:48 -05:00
David Dotson
a8d4a57f01
Environment variable registration, deregistration (addresses #3227) (#3377)
* First attempt at register/deregister machinery for envvars

* Added detailed docstring, simplified ensurers

Also added some type checking that became clear from docstring writing.

* Changes in response to @scopatz review

Simplified kwarg names.

* defaultval -> default

* Created new Var namedtuple, as well as DEFAULT_VARS

We should now delete DEFAULT_ENSURERS, DEFAULT_VALUES, DEFAULT_DOCS, and
refactor Env to use the new single namedtuple and the DEFAULT_VARS dict

* Removed DEFAULT_ENSURERS, DEFAULT_VALUES, DEFAULT_DOCS

Now need to edit Env to use new DEFAULT_VARS, Var namedtuple

* Finished updating Env object to use new combined Var

Also made corresponding changes elsewhere ensurer was used

* Working on test failures

* More fixes in light of test failures

* Set default values for Var in register.

There's a bit of duplication here, but makes for a cleaner function.

* Black reformatting on environ.py

* Removed history replay

* Added register tests

* Added addtional deregistration test

* Removed all replay references, in docs too

* Added news item for env-reg-dereg

* trigger rebuild

* doc fix

* more doc fixes

* again

* attr names

* reorder imports

* fix flake error

Co-authored-by: Anthony Scopatz <scopatz@gmail.com>
2020-08-05 10:39:11 -04:00
Matthias Bussonnier
784c5286ef
Remove most of Python 3.5 compatibility code. (#3654)
There  now should not be any remaining  3,5 conditinal code.
We now directly use inspect's getouterframes, so remove it from
inspector

The 3.5 parser get merged into 3.6 and a number of global vaiable
referring to 3.5/3.6 are now gone.

The only remaining mention is appveyor test, which are anyway failing
but not being seen as so by GitHub, so I'll leave them alone.
2020-08-05 10:29:31 -04:00
David Strobach
dfcce2b4d0 Add test for subprocess argv[0]
The test needs access to procfs, so it only runs on Linux.
2020-08-05 15:15:02 +02:00
Anthony Scopatz
a816084d44
Merge pull request #3650 from daniel-shimon/improve-completers
Add tests and fix bugs for RichCompletion and Jedi xontrib
2020-08-04 21:11:47 -05:00
Daniel Shimon
a0439bd35f completers: ptk, readline: Add tests for RichCompletion 2020-08-05 00:15:17 +03:00
Daniel Shimon
5f50b620b7 xontrib: jedi: Add jedi completer tests 2020-08-05 00:15:17 +03:00
Anthony Scopatz
8b933da995
Merge pull request #3632 from dyuri/issue_3402
#3402 set the exit code for single commands
2020-08-01 12:34:40 -05:00
Gyuri Horak
a1a08386bc
Single command return code integration tests fixed for macOS (#3402) 2020-07-29 08:55:48 +02:00
David Strobach
3d954cacae tests: Fix line continuations test 2020-07-28 20:00:07 +02:00
Gyuri Horak
46143f2b6e
Integration tests for single command return codes #3402 2020-07-28 17:35:16 +02:00
Anthony Scopatz
6d0e6ee1ae
Merge pull request #3524 from bobhy/failback_shell_env
Failback shell env
2020-07-27 21:21:32 -05:00
Bob Hyman
de07c3ed37 Don't run test_integrations.py with XONSH_DEBUG=1 2020-06-28 14:21:53 -04:00
Bob Hyman
15f3d8852b fix history gc for JSON backend; deal with large accumulations while this was broken 2020-06-26 20:47:54 -04:00
Bob Hyman
dde73ba72c Xonsh failback to /usr/bin/bash in preference to /etc/shells 2020-06-25 19:49:04 -04:00
Bob Hyman
6492a61171 test 2020-06-24 20:03:56 -04:00
Bob Hyman
129ce9e44a LS_COLORS add mh, change rs to fi; support ln=target 2020-06-20 17:46:37 -04:00
Bob Hyman
016afa5281 Merge branch 'is_3608' of https://github.com/bobhy/xonsh into is_3608 2020-06-14 14:36:06 -04:00
Bob Hyman
b65f7b0ac5 Only test easy-to-test cases on Windows. 2020-06-14 13:16:37 -04:00
Bob Hyman
57ed6e553a Prune test cases that won't work on Windows. 2020-06-14 13:08:11 -04:00