Commit graph

9042 commits

Author SHA1 Message Date
Bob Hyman
91f1962d28 Enable xonsh-cat for invocation directly from OS shell. 2020-08-08 02:33:07 -04:00
Bob Hyman
f321ebf041 temp fix for #3666 2020-08-08 02:00:18 -04:00
Bob Hyman
989db694a3 Use setuputils generated console scripts for xonsh and xonsh-cat 2020-08-08 00:53:44 -04:00
Bob Hyman
d826d201cc Merge branch 'master' into is_3661 2020-08-07 20:03:18 -04:00
Bob Hyman
698b9d4d9b drop dependence on py.exe on Windows 2020-08-06 14:00:21 -04:00
Anthony Scopatz
8f131a089c
Merge pull request #3656 from daniel-shimon/print-mocks-correctly
Call repr() when pretty() fails in _pprint_displayhook
2020-08-05 12:54:07 -05: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
Anthony Scopatz
9ca0906793
Merge pull request #3563 from xonsh/fix-json-history
Fix json history
2020-08-05 10:39:30 -05:00
Daniel Shimon
d41e6ddf72 Call repr() when pretty() fails in _pprint_displayhook 2020-08-05 17:50:53 +03: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
David Strobach
6e9d1063b5 News entry 2020-08-05 11:51:44 +02:00
David Strobach
9629568c1b JSONHistory: Fix possible indexing error
Due to $HISTCONTROL setting some history entries may not be always
flushed to the file and the on-disk history may actually be shorter
than it was in the in-memory buffer. This patch fixes the indexing
error occuring under such condition.
2020-08-05 11:51:44 +02:00
David Strobach
fc2fc776a2 Don't clear JSON history buffer while it's being flushed 2020-08-05 11:51:44 +02:00
Anthony Scopatz
40352638bf
Merge pull request #3623 from laloch/fix-help-def
Fix help operator not displaying definitions
2020-08-04 21:12:24 -05: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
5f8e27b666 xontrib: jedi: Fix bugs in jedi completer 2020-08-05 00:15:17 +03:00
Daniel Shimon
c7cced30ad completers: ptk: Correct PTK Completion construction 2020-08-05 00:15:17 +03: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
7211827aa9
Merge pull request #3647 from laloch/revert-abbrev
Revert abbrevs expansion on the second consecutive space keypress
2020-08-04 13:08:01 -05:00
David Strobach
3e027ae61a changelog entry 2020-08-04 16:31:10 +02:00
David Strobach
abf836ec8f Fix resolving callable arguments
This makes help operator display object definition again.
2020-08-04 16:31:09 +02:00
David Strobach
861bf40615 changelog entry 2020-08-04 16:30:04 +02:00
David Strobach
8a021b3727 Set argv[0] of a subprocess to the command as inserted by the user
Currently Xonsh passes a resolved path of an executable as argv[0]
argument. This changes the argv[0] to containd the command as
inserted by the user. The new behavior is consistent with bash and
other shells. Some programs behave differently in dependence of the
argv[0] value.
See #3617 for details.
2020-08-04 16:30:04 +02:00
David Strobach
a7480f3f41 Changelog entry 2020-08-04 16:19:41 +02:00
David Strobach
7cf5a91673 Revert abbrevs expansion on the second consecutive space keypress 2020-08-04 16:19:41 +02:00
Anthony Scopatz
ebca1e464f
Merge pull request #3653 from cafehaine/master
docs: More examples of what SubprocSpec can do
2020-08-02 10:53:25 -05:00
cafehaine
cb14ea9acd docs: More examples of what SubprocSpec can do 2020-08-02 09:30:22 +02:00
Anthony Scopatz
60d403c132
Merge pull request #3652 from xonsh/vox-rm
vox rm
2020-08-01 17:13:55 -05:00
Anthony Scopatz
856cf6be88
Merge pull request #3589 from anki-code/patch-1
Issue template footer
2020-08-01 16:28:15 -05:00
Anthony Scopatz
1cb37cab2f
Merge pull request #3593 from xxh/bash_to_xonsh
bash to xsh improvements
2020-08-01 16:25:37 -05:00
Anthony Scopatz
4d97004777 added news 2020-08-01 14:38:37 -05:00
Anthony Scopatz
41a600de51 Merge branch 'patch-1' of https://github.com/sfermigier/xonsh into vox-rm 2020-08-01 14:37:38 -05:00
Anthony Scopatz
8d676bd061
Merge pull request #3606 from laloch/xontrib-pdb
Add pdb xontrib
2020-08-01 13:34:20 -05: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
Anthony Scopatz
a65b940992
Merge pull request #3630 from laloch/fix-linecont
Fix ctx-free parser stripping the trailing newline
2020-08-01 12:34:06 -05:00
Gyuri Horak
549dee1f77
Merge branch 'master' into issue_3402 2020-08-01 18:28:46 +02:00
Anthony Scopatz
dbd9279a0c
Merge pull request #3634 from laloch/fix-alias-return
Fix TypeError triggered by unexpected return from callable alias
2020-08-01 11:12:37 -05:00
Anthony Scopatz
1391aa7721
Merge pull request #3649 from jaraco/goodbye-distutils
Remove distutils fallback.
2020-08-01 10:59:51 -05:00
Jason R. Coombs
ad3351462b Declare build-time dependency 2020-07-29 17:08:56 -04:00
Jason R. Coombs
c63e1665a7 Add changelog entry 2020-07-29 15:57:14 -04:00
Jason R. Coombs
f67c6e83ec Remove distutils fallback. Fixes #3638.
Also remove Python 2 compatibility imports.
2020-07-29 15:53:13 -04:00
Gyuri Horak
a1a08386bc
Single command return code integration tests fixed for macOS (#3402) 2020-07-29 08:55:48 +02:00
Gyuri Horak
cf9bc3c82e
News entry rst fix (#3402) 2020-07-29 08:26:51 +02:00
Gyuri Horak
9c0ac6e406
News entry for single command exit code fix (#3402) 2020-07-28 22:08:15 +02:00
David Strobach
5ff57aee7f changelog entry 2020-07-28 20:04:17 +02:00
David Strobach
1ad143f9a5 Fix TypeError triggered by unexpected return from callable alias 2020-07-28 20:04:11 +02:00
David Strobach
3d954cacae tests: Fix line continuations test 2020-07-28 20:00:07 +02:00