Bug 1959080
| Summary: | postgresql fails to build with Python 3.10: test python3/plpython_subtransaction FAILED | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> |
| Component: | postgresql | Assignee: | Patrik Novotný <panovotn> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | anon.amish, devrim, hhorak, jmlich83, mhroncok, panovotn, pkubat, praiskup, tgl, thrnciar |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | postgresql-13.2-9.fc35 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-05-24 15:54:16 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1890881 | ||
|
Description
Miro Hrončok
2021-05-10 16:56:38 UTC
This is caused by python 3.10 having slightly different traceback: cat /var/lib/mock/fedora-rawhide-python310/root/builddir/build/BUILD/postgresql-13.2/src/pl/plpython/regression.diffs diff -U3 /builddir/build/BUILD/postgresql-13.2/src/pl/plpython/expected/python3/plpython_subtransaction.out /builddir/build/BUILD/postgresql-13.2/src/pl/plpython/results/python3/plpython_subtransaction.out --- /builddir/build/BUILD/postgresql-13.2/src/pl/plpython/expected/python3/plpython_subtransaction.out 2021-05-11 17:05:24.116431883 +0200 +++ /builddir/build/BUILD/postgresql-13.2/src/pl/plpython/results/python3/plpython_subtransaction.out 2021-05-11 17:05:26.689459542 +0200 @@ -224,8 +224,8 @@ SELECT subtransaction_exit_subtransaction_in_with(); ERROR: ValueError: this subtransaction has already been exited CONTEXT: Traceback (most recent call last): - PL/Python function "subtransaction_exit_subtransaction_in_with", line 3, in <module> - s.__exit__(None, None, None) + PL/Python function "subtransaction_exit_subtransaction_in_with", line 2, in <module> + with plpy.subtransaction() as s: PL/Python function "subtransaction_exit_subtransaction_in_with" -- Make sure we don't get a "current transaction is aborted" error SELECT 1 as test; We'll need to look at how to not depend on the message itself. (In reply to Honza Horak from comment #1) > This is caused by python 3.10 having slightly different traceback: Bleah. We've dealt with some other inter-version message differences by generating alternate expected-files (see the expected/foo_N.out files under src/pl/plpython). Not sure whether that's the most expedient answer here. I'll bring this up upstream. (In reply to Tom Lane from comment #2) > (In reply to Honza Horak from comment #1) > > This is caused by python 3.10 having slightly different traceback: > > Bleah. We've dealt with some other inter-version message differences > by generating alternate expected-files (see the expected/foo_N.out > files under src/pl/plpython). Not sure whether that's the most > expedient answer here. I'll bring this up upstream. Thanks. I was so far thinking about rewriting the function python code by adding try/except and use an explicit exception text, so it returns the same text with all python versions. I haven't managed to try that yet. (In reply to Honza Horak from comment #3) > Thanks. I was so far thinking about rewriting the function python code by > adding try/except and use an explicit exception text, so it returns the same > text with all python versions. I haven't managed to try that yet. It seems to do the trick: https://src.fedoraproject.org/rpms/postgresql/pull-request/31 Upstream discussion: https://www.postgresql.org/message-id/853083.1620749597%40sss.pgh.pa.us Patch applied and built in F35. Let us know if the component does not compile properly with Python 3.10. |