Commit graph

1735 commits

Author SHA1 Message Date
Bob Hyman
06986fc0d4 Merge branch 'master' into environment_fixes 2020-09-11 01:15:49 -04:00
Bob Hyman
034f9f325d Cleanup per review. 2020-09-11 01:11:29 -04:00
Bob Hyman
d0096fb655 Test cases, news and fix one bug. 2020-09-08 14:44:26 -04:00
Bob Hyman
a9048d2841 Allow "ANSICON", "TERM", "VIRTUAL_ENV" registered envvars to not be in env. 2020-09-07 20:39:35 -04:00
David Strobach
76cd2ea43e Add test for leading variable initialization 2020-09-04 21:55:12 +02:00
David Strobach
00aeb7645a tests: Add VIRTUAL_ENV key to DummyEnv
Needed by test_vox.py.
2020-08-29 16:39:14 +02:00
David Strobach
f9f485f25d Add tests for args non-default following default 2020-08-28 17:55:05 +02:00
David Strobach
2eb5271fa0 Add PEP 570 pos-only parameters to lambda varargs 2020-08-27 03:28:44 +02:00
David Strobach
79eccc488c Fix pos-only parameters not requiring comma before slash
This fixes `def foo(x /, y):` being accepted as valid syntax.
2020-08-27 03:28:44 +02:00
David Strobach
b5575947ad Fix positional-only args test 2020-08-27 03:28:44 +02:00
David Strobach
af9c5b59bd Add support for PEP 570 positional-only arguments 2020-08-27 03:28:37 +02:00
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
Bob Hyman
c4aaede00b Rewrite fix per code review, cleaner! 2020-08-25 16:17:34 -04:00
Bob Hyman
e4ce7a6d9c Merge branch 'master' into wizard-fail 2020-08-25 14:55:16 -04:00
David Strobach
b0336dfbe5 Fix list comprehensions with multiple if clauses 2020-08-25 01:34:59 +02:00
Bob Hyman
e0d9ace4b0 fix commit list 2020-08-24 13:32:49 -04: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