Skip to content

Commit 0517b3f

Browse files
datadog-agent-integrations-bot[bot]nubtronsethsamuel
authored
Revert "Update Posgres to psycopg3 (#19322)" (#19499) (#19504)
Co-authored-by: Enrico Donnici <[email protected]> Co-authored-by: Seth Samuel <[email protected]>
1 parent 71fdec4 commit 0517b3f

34 files changed

+376
-440
lines changed

.builders/images/helpers.ps1

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,3 @@ function Add-ToPath() {
3838
$target="$oldPath;$Append"
3939
[Environment]::SetEnvironmentVariable("Path", $target, [System.EnvironmentVariableTarget]::User)
4040
}
41-
42-
function RunOnVSConsole() {
43-
param(
44-
[Parameter(Mandatory = $true)][string] $Command
45-
)
46-
Write-Host "Running $Command"
47-
Start-Process -Wait -NoNewWindow "cmd.exe" -ArgumentList "/c ""$Env:VCVARSALL_BAT"" $Env:DD_TARGET_ARCH && $Command"
48-
}

.builders/images/linux-aarch64/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ RUN \
9191
--without-debugger \
9292
--disable-static
9393

94-
# libpq and pg_config as needed by psycopg
94+
# libpq and pg_config as needed by psycopg2
9595
RUN \
9696
DOWNLOAD_URL="https://ftp.postgresql.org/pub/source/v{{version}}/postgresql-{{version}}.tar.bz2" \
9797
VERSION="16.0" \

.builders/images/linux-x86_64/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ RUN \
9595
--without-debugger \
9696
--disable-static
9797

98-
# libpq and pg_config as needed by psycopg
98+
# libpq and pg_config as needed by psycopg2
9999
RUN \
100100
DOWNLOAD_URL="https://ftp.postgresql.org/pub/source/v{{version}}/postgresql-{{version}}.tar.bz2" \
101101
VERSION="16.0" \

.builders/images/macos-x86_64/builder_setup.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,6 @@ RELATIVE_PATH="curl-{{version}}" \
9494
# Remove the binary installed so that we consistenly use the same original `curl` binary
9595
rm "${DD_PREFIX_PATH}/bin/curl"
9696

97-
# libpq and pg_config as needed by psycopg
98-
DOWNLOAD_URL="https://ftp.postgresql.org/pub/source/v{{version}}/postgresql-{{version}}.tar.bz2" \
99-
VERSION="16.0" \
100-
SHA256="df9e823eb22330444e1d48e52cc65135a652a6fdb3ce325e3f08549339f51b99" \
101-
RELATIVE_PATH="postgresql-{{version}}" \
102-
install-from-source --without-readline --with-openssl --without-icu
103-
10497
# Dependencies needed to build librdkafka (and thus, confluent-kafka) with kerberos support
10598
DOWNLOAD_URL="https://github.com/LMDB/lmdb/archive/LMDB_{{version}}.tar.gz" \
10699
VERSION="0.9.29" \

.builders/images/windows-x86_64/Dockerfile

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ RUN curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtoo
2525
--add Microsoft.VisualStudio.Workload.VCTools `
2626
|| IF "%ERRORLEVEL%"=="3010" EXIT 0) `
2727
&& del /q vs_buildtools.exe
28-
ENV VCVARSALL_BAT="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat"
2928

3029
# Upgrade PowerShell
3130
ENV POWERSHELL_VERSION="7.4.0"
@@ -115,42 +114,7 @@ RUN Get-RemoteFile `
115114
Add-ToPath -Append "C:\perl\perl\bin" && `
116115
Remove-Item "strawberry-perl-$Env:PERL_VERSION-64bit.zip"
117116

118-
# Nasm
119-
ENV NASM_VERSION="2.16.03"
120-
RUN Get-RemoteFile `
121-
-Uri https://www.nasm.us/pub/nasm/releasebuilds/$Env:NASM_VERSION/win64/nasm-$Env:NASM_VERSION-win64.zip `
122-
-Path "nasm-$Env:NASM_VERSION-win64.zip" `
123-
-Hash '3ee4782247bcb874378d02f7eab4e294a84d3d15f3f6ee2de2f47a46aa7226e6' && `
124-
7z x "nasm-$Env:NASM_VERSION-win64.zip" -o"C:\nasm" && `
125-
Add-ToPath -Append "C:\nasm\nasm-$Env:NASM_VERSION" && `
126-
Remove-Item "nasm-$Env:NASM_VERSION-win64.zip"
127-
# openssl
128117
ENV OPENSSL_VERSION="3.3.2"
129-
RUN Get-RemoteFile `
130-
-Uri https://www.openssl.org/source/openssl-$Env:OPENSSL_VERSION.tar.gz `
131-
-Path openssl-$Env:OPENSSL_VERSION.tar.gz `
132-
-Hash '2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281'; `
133-
7z x openssl-$Env:OPENSSL_VERSION.tar.gz -r -y && `
134-
7z x openssl-$Env:OPENSSL_VERSION.tar -oC:\openssl_3 && `
135-
cd C:\openssl_3\openssl-$Env:OPENSSL_VERSION && `
136-
RunOnVSConsole -Command `
137-
'C:\perl\perl\bin\perl.exe Configure && `
138-
nmake && `
139-
nmake install_sw'
140-
# libpq and pg_config as needed by psycopg
141-
ENV PG_VERSION="16.0"
142-
COPY pg_config.pl C:\pg_config.pl
143-
RUN Get-RemoteFile `
144-
-Uri https://ftp.postgresql.org/pub/source/v$Env:PG_VERSION/postgresql-$Env:PG_VERSION.tar.bz2 `
145-
-Path postgresql-$Env:PG_VERSION.tar.bz2 `
146-
-Hash 'df9e823eb22330444e1d48e52cc65135a652a6fdb3ce325e3f08549339f51b99'; `
147-
7z x postgresql-$Env:PG_VERSION.tar.bz2 -r -y && `
148-
7z x postgresql-$Env:PG_VERSION.tar -oC:\postgresql_src && `
149-
cd C:\postgresql_src\postgresql-$Env:PG_VERSION\src\tools\msvc && `
150-
Copy-Item C:\pg_config.pl -Destination .\config.pl && `
151-
RunOnVSConsole -Command 'C:\perl\perl\bin\perl.exe build.pl' && `
152-
RunOnVSConsole -Command 'C:\perl\perl\bin\perl.exe install.pl C:\postgresql' && `
153-
Add-ToPath -Append "C:\postgresql\bin"
154118

155119
ENV CURL_VERSION="8.11.1"
156120

.builders/images/windows-x86_64/pg_config.pl

Lines changed: 0 additions & 4 deletions
This file was deleted.

.ddev/ci/scripts/postgres/linux/50_install_postgres.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

.ddev/config.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ oauthlib = ['BSD-3-Clause']
8383
mmh3 = ['CC0-1.0']
8484
# https://github.com/paramiko/paramiko/blob/master/LICENSE
8585
paramiko = ['LGPL-2.1-only']
86-
# https://github.com/psycopg/psycopg/blob/master/LICENSE.txt
87-
psycopg = ['LGPL-3.0-only']
8886
# https://github.com/psycopg/psycopg2/blob/master/LICENSE
8987
# https://github.com/psycopg/psycopg2/blob/master/doc/COPYING.LESSER
9088
psycopg2-binary = ['LGPL-3.0-only', 'BSD-3-Clause']

LICENSE-3rdparty.csv

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ ply,PyPI,BSD-3-Clause,Copyright (C) 2001-2018
4545
prometheus-client,PyPI,Apache-2.0,Copyright 2015 The Prometheus Authors
4646
protobuf,PyPI,BSD-3-Clause,Copyright 2008 Google Inc. All rights reserved.
4747
psutil,PyPI,BSD-3-Clause,"Copyright (c) 2009, Jay Loden, Dave Daeschler, Giampaolo Rodola"
48-
psycopg,PyPI,LGPL-3.0-only,Copyright (C) 2020 The Psycopg Team
4948
psycopg2-binary,PyPI,BSD-3-Clause,Copyright 2013 Federico Di Gregorio
5049
psycopg2-binary,PyPI,LGPL-3.0-only,Copyright (C) 2013 Federico Di Gregorio
5150
pyOpenSSL,PyPI,Apache-2.0,Copyright The pyOpenSSL developers

agent_requirements.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ prometheus-client==0.21.1
3232
protobuf==5.29.3
3333
psutil==6.0.0
3434
psycopg2-binary==2.9.9
35-
psycopg[c]==3.2.3
3635
pyasn1==0.4.8
3736
pycryptodomex==3.21.0
3837
pydantic==2.10.5

0 commit comments

Comments
 (0)