contain characters unrepresentable at the OS level.
(Contributed by Serhiy Storchaka in :issue:`33721`.)
+venv
+----
+
+* :mod:`venv` now includes an ``Activate.ps1`` script on all platforms for
+ activating virtual environments under PowerShell Core 6.1.
+ (Contributed by Brett Cannon in :issue:`32718`.)
+
Optimizations
=============
* The interpreter loop has been simplified by moving the logic of unrolling
the stack of blocks into the compiler. The compiler emits now explicit
- instructions for adjusting the stack of values and calling the cleaning
+ instructions for adjusting the stack of values and calling the cleaning-
up code for :keyword:`break`, :keyword:`continue` and :keyword:`return`.
Removed opcodes :opcode:`BREAK_LOOP`, :opcode:`CONTINUE_LOOP`,
+function Script:add-bin([string]$envPath) {
+ $binPath = Join-Path -Path $env:VIRTUAL_ENV -ChildPath '__VENV_BIN_NAME__'
+ return ($binPath, $envPath) -join [IO.Path]::PathSeparator
+}
+
function global:deactivate ([switch]$NonDestructive) {
# Revert to original values
if (Test-Path function:_OLD_VIRTUAL_PROMPT) {
# Add the venv to the PATH
copy-item env:PATH env:_OLD_VIRTUAL_PATH
-$env:PATH = "$env:VIRTUAL_ENV\__VENV_BIN_NAME__;$env:PATH"
+$env:PATH = add-bin $env:PATH