-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4169 from pypa/feature/vendor-update
Update vendored dependencies, relevant API usage, and CI config
- Loading branch information
Showing
574 changed files
with
48,979 additions
and
25,994 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Taken from https://github.com/pypa/pip/blob/ceaf75b9ede9a9c25bcee84fe512fa6774889685/.azure-pipelines/scripts/New-RAMDisk.ps1 | ||
[CmdletBinding()] | ||
param( | ||
[Parameter(Mandatory=$true, | ||
HelpMessage="Drive letter to use for the RAMDisk")] | ||
[String]$drive, | ||
[Parameter(HelpMessage="Size to allocate to the RAMDisk")] | ||
[UInt64]$size=1GB | ||
) | ||
|
||
$ErrorActionPreference = "Stop" | ||
Set-StrictMode -Version Latest | ||
|
||
Write-Output "Installing FS-iSCSITarget-Server" | ||
Install-WindowsFeature -Name FS-iSCSITarget-Server | ||
|
||
Write-Output "Starting MSiSCSI" | ||
Start-Service MSiSCSI | ||
$retry = 10 | ||
do { | ||
$service = Get-Service MSiSCSI | ||
if ($service.Status -eq "Running") { | ||
break; | ||
} | ||
$retry-- | ||
Start-Sleep -Milliseconds 500 | ||
} until ($retry -eq 0) | ||
|
||
$service = Get-Service MSiSCSI | ||
if ($service.Status -ne "Running") { | ||
throw "MSiSCSI is not running" | ||
} | ||
|
||
Write-Output "Configuring Firewall" | ||
Get-NetFirewallServiceFilter -Service MSiSCSI | Enable-NetFirewallRule | ||
|
||
Write-Output "Configuring RAMDisk" | ||
# Must use external-facing IP address, otherwise New-IscsiTargetPortal is | ||
# unable to connect. | ||
$ip = ( | ||
Get-NetIPAddress -AddressFamily IPv4 | | ||
Where-Object {$_.IPAddress -ne "127.0.0.1"} | ||
)[0].IPAddress | ||
if ( | ||
-not (Get-IscsiServerTarget -ComputerName localhost | Where-Object {$_.TargetName -eq "ramdisks"}) | ||
) { | ||
New-IscsiServerTarget ` | ||
-ComputerName localhost ` | ||
-TargetName ramdisks ` | ||
-InitiatorId IPAddress:$ip | ||
} | ||
|
||
$newVirtualDisk = New-IscsiVirtualDisk ` | ||
-ComputerName localhost ` | ||
-Path ramdisk:local$drive.vhdx ` | ||
-Size $size | ||
Add-IscsiVirtualDiskTargetMapping ` | ||
-ComputerName localhost ` | ||
-TargetName ramdisks ` | ||
-Path ramdisk:local$drive.vhdx | ||
|
||
Write-Output "Connecting to iSCSI" | ||
New-IscsiTargetPortal -TargetPortalAddress $ip | ||
Get-IscsiTarget | Where-Object {!$_.IsConnected} | Connect-IscsiTarget | ||
|
||
Write-Output "Configuring disk" | ||
$newDisk = Get-IscsiConnection | | ||
Get-Disk | | ||
Where-Object {$_.SerialNumber -eq $newVirtualDisk.SerialNumber} | ||
|
||
Set-Disk -InputObject $newDisk -IsOffline $false | ||
Initialize-Disk -InputObject $newDisk -PartitionStyle MBR | ||
New-Partition -InputObject $newDisk -UseMaximumSize -DriveLetter $drive | ||
|
||
Format-Volume -DriveLetter $drive -NewFileSystemLabel Temp -FileSystem NTFS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,31 @@ | ||
parameters: | ||
python_version: '' | ||
|
||
steps: | ||
- script: 'python -m pip install --upgrade pip setuptools wheel -e .[dev,tests] --upgrade' | ||
|
||
- script: | | ||
echo "##vso[task.setvariable variable=LANG]C.UTF-8" | ||
echo "##vso[task.setvariable variable=PIP_PROCESS_DEPENDENCY_LINKS]1" | ||
displayName: Set Environment Variables | ||
|
||
- script: | | ||
echo "Python path: $(PY_EXE)" | ||
echo "GIT_SSL_CAINFO: $(GIT_SSL_CAINFO)" | ||
echo "PIPENV PYTHON VERSION: $(python.version)" | ||
echo "python_version: ${{ parameters.python_version }}" | ||
git submodule sync | ||
git submodule update --init --recursive | ||
$(PY_EXE) -m pip install --upgrade --upgrade-strategy=eager pip setuptools wheel | ||
$(PY_EXE) -m pip install "virtualenv<20" | ||
env: | ||
PIPENV_DEFAULT_PYTHON_VERSION: ${{ parameters.python_version }} | ||
PYTHONWARNINGS: 'ignore:DEPRECATION' | ||
PIPENV_NOSPIN: '1' | ||
displayName: Make Virtualenv | ||
|
||
- script: | | ||
$(PY_EXE) -m pip install -e . --upgrade | ||
$(PY_EXE) -m pipenv install --deploy --dev --python="$(PY_EXE)" | ||
displayName: Upgrade Pip & Install Pipenv | ||
env: | ||
PYTHONWARNINGS: 'ignore:DEPRECATION' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,56 @@ | ||
parameters: | ||
python_version: '' | ||
python_architecture: '' | ||
|
||
steps: | ||
- powershell: | | ||
subst T: "$env:TEMP" | ||
Write-Host "##vso[task.setvariable variable=TEMP]T:\" | ||
Write-Host "##vso[task.setvariable variable=TMP]T:\" | ||
Write-Host "##vso[task.setvariable variable=PIPENV_DEFAULT_PYTHON_VERSION]$env:PYTHON_VERSION" | ||
Write-Host "##vso[task.setvariable variable=PIPENV_NOSPIN]1" | ||
displayName: Fix Temp Variable | ||
env: | ||
PYTHON_VERSION: ${{ parameters.python_version }} | ||
- task: PowerShell@2 | ||
inputs: | ||
filePath: .azure-pipelines/scripts/New-RAMDisk.ps1 | ||
arguments: "-Drive R -Size 2GB" | ||
displayName: Setup RAMDisk | ||
|
||
- script: | | ||
git submodule sync && git submodule update --init --recursive | ||
pipenv run pytest -ra --ignore=pipenv\patched --ignore=pipenv\vendor --junitxml=test-results.xml tests | ||
displayName: Run integration tests | ||
env: | ||
PYTHONWARNINGS: 'ignore:DEPRECATION' | ||
PIPENV_NOSPIN: '1' | ||
- powershell: | | ||
mkdir R:\virtualenvs | ||
$acl = Get-Acl "R:\" | ||
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule( | ||
"Everyone", "FullControl", "ContainerInherit,ObjectInherit", "None", "Allow" | ||
) | ||
$acl.AddAccessRule($rule) | ||
Set-Acl "R:\" $acl | ||
displayName: Set RAMDisk Permissions | ||
- powershell: | | ||
Write-Host "##vso[task.setvariable variable=TEMP]R:\" | ||
Write-Host "##vso[task.setvariable variable=TMP]R:\" | ||
Write-Host "##vso[task.setvariable variable=WORKON_HOME]R:\virtualenvs" | ||
Write-Host "##vso[task.setvariable variable=PIPENV_DEFAULT_PYTHON_VERSION]$env:PYTHON_VERSION" | ||
Write-Host "##vso[task.setvariable variable=PIPENV_NOSPIN]1" | ||
displayName: Fix Temp Variable | ||
env: | ||
PYTHON_VERSION: ${{ parameters.python_version }} | ||
- powershell: | | ||
pip install certifi | ||
$env:PYTHON_PATH=$(python -c "import sys; print(sys.executable)") | ||
$env:CERTIFI_CONTENT=$(python -m certifi) | ||
echo "##vso[task.setvariable variable=GIT_SSL_CAINFO]$env:CERTIFI_CONTENT" | ||
echo "##vso[task.setvariable variable=PY_EXE]$env:PYTHON_PATH" | ||
displayName: Set Python Path | ||
env: | ||
PYTHONWARNINGS: 'ignore:DEPRECATION' | ||
- template: install-dependencies.yml | ||
parameters: | ||
python_version: ${{ parameters.python_version }} | ||
|
||
- script: | | ||
git submodule sync | ||
git submodule update --init --recursive | ||
pipenv run pytest -ra -n 4 --junit-xml=junit/test-results.xml tests/ | ||
failOnStderr: false | ||
displayName: Run integration tests | ||
env: | ||
TEMP: 'R:\' | ||
PYTHONWARNINGS: 'ignore:DEPRECATION' | ||
PIPENV_NOSPIN: 1 | ||
GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=accept-new -o CheckHostIP=no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.