diff options
author | Bernat Gabor <bgabor8@bloomberg.net> | 2018-12-31 12:36:26 +0000 |
---|---|---|
committer | Bernat Gabor <bgabor8@bloomberg.net> | 2018-12-31 13:29:26 +0000 |
commit | bd536857c9a8cdcf9597d53fefc3a5d711613846 (patch) | |
tree | 1260bb7aaec3bb944b2c989ab289cdb27a7f0e26 | |
parent | 1cf41c5846db1cd86435b3d4022d94734e203241 (diff) | |
download | virtualenv-release-16.2.0.tar.gz |
fish 3 compatbilityrelease-16.2.0
-rw-r--r-- | azure-pipelines.yml | 33 | ||||
-rw-r--r-- | docs/changes.rst | 1 | ||||
-rw-r--r-- | tests/activation/test_activation.py | 5 | ||||
-rwxr-xr-x | virtualenv.py | 36 | ||||
-rw-r--r-- | virtualenv_embedded/activate.fish | 14 |
5 files changed, 53 insertions, 36 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e4716fd..c082cbd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -129,19 +129,20 @@ jobs: reportDirectory: '$(System.DefaultWorkingDirectory)/.tox/htmlcov' failIfCoverageEmpty: true -- job: publish - dependsOn: - - report_coverage - - linux_fix_lint - - linux_docs - - linux_embed - - linux_package_readme - condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) - pool: {vmImage: 'Ubuntu 16.04'} - steps: - - task: UsePythonVersion@0 - displayName: setup python3.7 - inputs: {versionSpec: '3.7'} - - script: 'python3.7 -m pip -U install twine pip' - - script: 'python3.7 -m pip wheel -w "$(System.DefaultWorkingDirectory)/w" --no-deps' - - script: 'python3.7 -m twine -r pypi-gb --config-file $(PYPIRC_PATH) "$(System.DefaultWorkingDirectory)/w/*"' +- ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}: + - job: publish + dependsOn: + - report_coverage + - linux_fix_lint + - linux_docs + - linux_embed + - linux_package_readme + condition: succeeded() + pool: {vmImage: 'Ubuntu 16.04'} + steps: + - task: UsePythonVersion@0 + displayName: setup python3.7 + inputs: {versionSpec: '3.7'} + - script: 'python3.7 -m pip install -U twine pip' + - script: 'python3.7 -m pip wheel -w "$(System.DefaultWorkingDirectory)/w" --no-deps .' + - script: 'python3.7 -m twine -r pypi-gb --config-file $(PYPIRC_PATH) "$(System.DefaultWorkingDirectory)/w/*"' diff --git a/docs/changes.rst b/docs/changes.rst index e634839..1bc5a29 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -21,6 +21,7 @@ Bugfixes Features ^^^^^^^^ +- ``fish`` version 3 support for the activation script. (`#1275 <https://github.com/pypa/virtualenv/issues/1275>`_) - ``powershell`` activator is no longer signed. (`#816 <https://github.com/pypa/virtualenv/issues/816>`_) - ``pyproject.toml`` with ``PEP-517`` and ``PEP-518`` is now provided. ``tox.ini`` is now packaged with the ``sdist``. Distributions repackaging the library should use ``tox -e py`` to run the test suite on the ``sdist``. (`#909 <https://github.com/pypa/virtualenv/issues/909>`_) - ``activate_this.py`` improvements: set ``VIRTUAL_ENV`` environment variable; ``pypy``, ``pypy3`` and ``jython`` support. (`#1057 <https://github.com/pypa/virtualenv/issues/1057>`_) diff --git a/tests/activation/test_activation.py b/tests/activation/test_activation.py index 26060ae..d2ad1c1 100644 --- a/tests/activation/test_activation.py +++ b/tests/activation/test_activation.py @@ -116,7 +116,10 @@ class Activation(object): env = get_env() env.update(self.env) - raw = subprocess.check_output(invoke_shell, universal_newlines=True, stderr=subprocess.STDOUT, env=env) + try: + raw = subprocess.check_output(invoke_shell, universal_newlines=True, stderr=subprocess.STDOUT, env=env) + except subprocess.CalledProcessError as exception: + assert not exception.returncode, exception.output out = re.sub(r"pydev debugger: process \d+ is connecting\n\n", "", raw, re.M).strip().split("\n") # pre-activation diff --git a/virtualenv.py b/virtualenv.py index 75e65c5..ba42590 100755 --- a/virtualenv.py +++ b/virtualenv.py @@ -2126,23 +2126,25 @@ Ac1FhrMbX+3UzW8yB99gBv7n/Puf2ffa3CPN/gKu/HeT # file activate.fish ACTIVATE_FISH = convert( """ -eJyFVm1v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dFHU9f2lUMHaXgaITw5heIhBQZflaFJREatYrI18Pq +7E23z7tDJtPuo4aXLoTrXxgXIP5s1lG6SHvwSdhImVKU0z3xGSoOPE5sxxcE1bB4+YEwSbzXJAmt +/v+PuP4jYVWennEFklbrsu2XPFXz02VBh3QJbHFX2PfCHyXJh8k0md4+jjETR5E638t+wxJL21P4 +MQ7KJwz/hhMO6XbF46kuPPW1tC+7pt92B5Pjh+G2/HZcEhy65qtv7ciSu8nz7YeH8XF+wuN991Hu +Dm7k0wKbCRupTQy1bYKUcTqjRxpqTb4/9Gcz3YJ3cgIOHtnTlkN9bYgp9Du33XgyGlHErmN6x8kB +N7MzUrTmS+FKiU+KT6WTEhcUxXBNQK17fGa/epjJ2m5+7+Avu2vuFN1hip1z/nIgyJY2tv37opms +I2klzT3hyqiYMGuIrvSVjjrhMMBYklRyjL3cWl65kht1gyt9DVGHMAxweKj1uN0doae24tIyBfOO +a6FOZy1jZzukdvvqN1kPccDLjbwGdtJ8m72rgeki+xOnXcf/CzFcuJM= """ ) diff --git a/virtualenv_embedded/activate.fish b/virtualenv_embedded/activate.fish index 028ca61..4e8a09b 100644 --- a/virtualenv_embedded/activate.fish +++ b/virtualenv_embedded/activate.fish @@ -17,7 +17,12 @@ end function deactivate -d 'Exit virtualenv mode and return to the normal environment.' # reset old environment variables if test -n "$_OLD_VIRTUAL_PATH" - set -gx PATH (_fishify_path $_OLD_VIRTUAL_PATH) + # https://github.com/fish-shell/fish-shell/issues/436 altered PATH handling + if test (echo $FISH_VERSION | tr "." "\n")[1] -lt 3 + set -gx PATH (_fishify_path $_OLD_VIRTUAL_PATH) + else + set -gx PATH $_OLD_VIRTUAL_PATH + end set -e _OLD_VIRTUAL_PATH end @@ -53,7 +58,12 @@ deactivate nondestructive set -gx VIRTUAL_ENV "__VIRTUAL_ENV__" -set -gx _OLD_VIRTUAL_PATH (_bashify_path $PATH) +# https://github.com/fish-shell/fish-shell/issues/436 altered PATH handling +if test (echo $FISH_VERSION | tr "." "\n")[1] -lt 3 + set -gx _OLD_VIRTUAL_PATH (_bashify_path $PATH) +else + set -gx _OLD_VIRTUAL_PATH $PATH +end set -gx PATH "$VIRTUAL_ENV/__BIN_NAME__" $PATH # Unset `$PYTHONHOME` if set. |