public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sandro Mani <manisandro@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/pgadmin4] rawhide: Add patch to fix compatibility with pgadmin3 (#2527807)
Date: Thu, 03 Sep 2026 08:38:20 GMT [thread overview]
Message-ID: <178842470092.1.4239837361406144239.rpms-pgadmin4-78bab7a7763c@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/pgadmin4
Branch : rawhide
Commit : 78bab7a7763c9c4e5842365b3b43aa6730e95f25
Author : Sandro Mani <manisandro@gmail.com>
Date : 2026-09-03T10:38:08+02:00
Stats : +56/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/pgadmin4/c/78bab7a7763c9c4e5842365b3b43aa6730e95f25?branch=rawhide
Log:
Add patch to fix compatibility with pgadmin3 (#2527807)
---
diff --git a/pgadmin4.spec b/pgadmin4.spec
index 06a231d..b127379 100644
--- a/pgadmin4.spec
+++ b/pgadmin4.spec
@@ -7,7 +7,7 @@ Name: pgadmin4
# NOTE: Also regenerate requires as indicated below when updating!
# Verify Patch4 on next update
Version: 9.17
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Administration tool for PostgreSQL
# i686, armv7hl: The webpack terser plugin aborts with JS heap memory exhaustion on these arches
@@ -37,6 +37,8 @@ Patch0: pgadmin4_requirements.patch
Patch1: pgadmin4_azure-mgmt-rdbms.patch
# Drop requirement on unpackaged python-sphinxcontrib-youtube
Patch2: pgadmin4_sphinx_youtube.patch
+# Fix compatibility with psycopg3-3.5
+Patch3: pgadmin4_psycopg3.patch
# For docs
BuildRequires: glibc-langpack-en
@@ -249,6 +251,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
%changelog
+* Thu Sep 03 2026 Sandro Mani <manisandro@gmail.com> - 9.17-2
+- Add patch to fix compatibility with pgadmin3 (#2527807)
+
* Fri Jul 31 2026 Sandro Mani <manisandro@gmail.com> - 9.17-1
- Update to 9.17
diff --git a/pgadmin4_psycopg3.patch b/pgadmin4_psycopg3.patch
new file mode 100644
index 0000000..0af6fd0
--- /dev/null
+++ b/pgadmin4_psycopg3.patch
@@ -0,0 +1,50 @@
+diff -rupN pgadmin4-9.17/web/pgadmin/utils/driver/psycopg3/encoding.py pgadmin4-9.17-new/web/pgadmin/utils/driver/psycopg3/encoding.py
+--- pgadmin4-9.17/web/pgadmin/utils/driver/psycopg3/encoding.py 2026-07-30 05:14:00.000000000 +0200
++++ pgadmin4-9.17-new/web/pgadmin/utils/driver/psycopg3/encoding.py 2026-09-03 10:34:59.822183347 +0200
+@@ -43,8 +43,12 @@ def get_encoding(key):
+ current_app.logger.error(e)
+ postgres_encoding = 'utf-8'
+
+- python_encoding = psycopg._encodings._py_codecs.get(postgres_encoding,
+- 'utf-8')
++ if isinstance(psycopg._encodings._py_codecs, dict):
++ python_encoding = psycopg._encodings._py_codecs.get(postgres_encoding,
++ 'utf-8')
++ else:
++ python_encoding = psycopg._encodings.py_codecs.get(
++ postgres_encoding.upper().encode(), 'utf-8')
+
+ _dict = encode_dict.get(postgres_encoding.upper(),
+ [postgres_encoding,
+@@ -59,11 +63,23 @@ def configure_driver_encodings(encodings
+ # because for parameterized DML, param values are converted based on
+ # python encoding of pyscopg's internal encodings dict.
+
+- for key, val in encode_dict.items():
+- _, python_encoding = val
+- psycopg._encodings._py_codecs[key] = python_encoding
+-
+- encodings.update((k.encode(), v
+- ) for k, v in psycopg._encodings._py_codecs.items())
+- psycopg._encodings.pg_codecs = {
+- v: k.encode() for k, v in psycopg._encodings._py_codecs.items()}
++ # psycopg._encodings._py_codecs is a private symbol: it was a
++ # dict[str, str] up to psycopg 3.3.4 and became a tuple of alias
++ # groups in 3.3.5. Update the public py_codecs/pg_codecs maps that
++ # pg2pyenc()/py2pgenc() actually look at, instead of rebuilding them
++ # from the private one.
++
++ if isinstance(psycopg._encodings._py_codecs, dict):
++ for key, val in encode_dict.items():
++ _, python_encoding = val
++ psycopg._encodings._py_codecs[key] = python_encoding
++
++ encodings.update((k.encode(), v
++ ) for k, v in psycopg._encodings._py_codecs.items())
++ psycopg._encodings.pg_codecs = {
++ v: k.encode() for k, v in psycopg._encodings._py_codecs.items()}
++ else:
++ for key, val in encode_dict.items():
++ _, python_encoding = val
++ encodings[key.encode()] = python_encoding
++ psycopg._encodings.pg_codecs[python_encoding] = key.encode()
reply other threads:[~2026-09-03 8:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178842470092.1.4239837361406144239.rpms-pgadmin4-78bab7a7763c@fedoraproject.org \
--to=manisandro@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox