Skip to content

Resolved pTest failure by upgrading python-twisted to version 23.10.0#17675

Open
v-aaditya wants to merge 4 commits into
microsoft:3.0-devfrom
Kanishk-Bansal:topic-upgrade/python-twisted/3.0/23.10.0
Open

Resolved pTest failure by upgrading python-twisted to version 23.10.0#17675
v-aaditya wants to merge 4 commits into
microsoft:3.0-devfrom
Kanishk-Bansal:topic-upgrade/python-twisted/3.0/23.10.0

Conversation

@v-aaditya

@v-aaditya v-aaditya commented Jun 10, 2026

Copy link
Copy Markdown
Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary
  • Issue

    • python-twisted version 22.10.0 is not compatible with python 3.12 which is a known issue and can be fixed by upgrading python-twisted to version 23.8.0 which was the first which has official python 3.12 support or above. Reference Link - Python 3.12 test failures twisted/twisted#11888
    • The test cases in pTest are getting failed for multiple reasons -
      1. Logging / warning system changes in 3.12
      2. Stricter AF_UNIX path-length enforcement
      3. Due to missing or changes in modules.
      4. Test cases in twisted.internet.test, twisted.names.test, twisted.conch.test, and twisted.web.test open real sockets, depend on multicast, DNS resolution, /etc/services, real getaddrinfo and child processes via os.fork. In a restricted chroot environment, many of these could be blocked.
    • Fedora is using the package version 22.10.0 only for EPEL9, where they are either patching the test cases or skipping them. When I used the same patches on AZL, I was able to build the package but the pTest were still getting stuck. Other fedora versions are using package version 24.11.0 or 25.5.0.
  • Fix

    • Upgrade python-twisted to version 23.10.0 which is compatible with python version 3.12 and above.
    • Below CVEs have been backported as they affected this version as well -
    • CVE-2023-46137 has been removed as it does not affect this version. Refer - https://nvd.nist.gov/vuln/detail/CVE-2023-46137.
    • Some test cases which were getting failed and were expected failures, have been skipped using patch Disable-multicast-ssl-test.patch.
    • Removed python3-twisted from BuildRequires in package pytest as it was giving circular dependency issue.
      Reasoning - On Azure Linux 3.0 we don't run pytest's own twisted-based test suite for which it was needed in the BR. Fedora also handles python3-twisted for pytest only as an optional test dependency, gated with %if %{with optional_tests} (refer Fedora pytest 8.3.5 spec file).
AI Analysis relevance (In %) / Reasoning

AI Analysis relevance (In %): 0 (No AI analysis was available)

Change Log
  • deleted: SPECS/python-twisted/CVE-2023-46137.patch
  • modified: SPECS/python-twisted/CVE-2024-41671.patch
  • modified: SPECS/python-twisted/CVE-2024-41810.patch
  • modified: SPECS/python-twisted/CVE-2026-42304.patch
  • new file: SPECS/python-twisted/Disable-multicast-ssl-test.patch
  • deleted: SPECS/python-twisted/disable_multicast_test.patch
  • modified: SPECS/python-twisted/python-twisted.signatures.json
  • modified: SPECS/python-twisted/python-twisted.spec
  • modified: cgmanifest.json
Does this affect the toolchain?

NO

Associated Issues
Test Methodology

@microsoft-github-policy-service microsoft-github-policy-service Bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Jun 10, 2026
@v-aaditya

Copy link
Copy Markdown
Author

Triggered Buddy Build and it has passed !

@v-aaditya v-aaditya marked this pull request as ready for review June 11, 2026 04:31
@v-aaditya v-aaditya requested a review from a team as a code owner June 11, 2026 04:31
@v-aaditya

Copy link
Copy Markdown
Author

After reviewing pytest's test log, I found that it's pTest is also not executing. I am investigating it as well.
Kindly refer current test log - pytest-7.4.0-3.azl3.src.rpm.test.log

image

@Kanishk-Bansal Kanishk-Bansal added the ptest package testing (%check section in spec) label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0 Packaging ptest package testing (%check section in spec)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants