Skip to content

Unbreak unit tests with Twisted 25.5.0 by add parsePOSTFormSubmission arg to FakeSite#18577

Merged
anoadragon453 merged 7 commits intodevelopfrom
anoa/fix_twisted_25_5_0
Jun 24, 2025
Merged

Unbreak unit tests with Twisted 25.5.0 by add parsePOSTFormSubmission arg to FakeSite#18577
anoadragon453 merged 7 commits intodevelopfrom
anoa/fix_twisted_25_5_0

Conversation

@anoadragon453
Copy link
Copy Markdown
Member

@anoadragon453 anoadragon453 commented Jun 19, 2025

Twisted's Site exposes _parsePOSTFormSubmission which is accessed by Request during initialisation (since Twisted 25.5.0, https://github.com/twisted/twisted/pull/12413/files#diff-6c8252af78a4a1c3cdfd2474b7349fb479c0e0a308a8336e4ddab729f55df9baR802).

Provide the same attribute so that tests remain compatible across Twisted versions.

Several other changes were needed as well, see each commit.

Fixes #18565.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

@anoadragon453 anoadragon453 marked this pull request as ready for review June 19, 2025 13:24
@anoadragon453 anoadragon453 requested a review from a team as a code owner June 19, 2025 13:24
anoadragon453 and others added 5 commits June 20, 2025 18:41
Twisted's `Site` exposes `_parsePOSTFormSubmission` which is
accessed by `Request` during initialisation (since Twisted 25.5.0).
Provide the same attribute so that tests remain compatible across
Twisted versions.
Otherwise they end up overrunning Twisted’s AMP protocol message size and raising a `TooLong` error.
@anoadragon453 anoadragon453 force-pushed the anoa/fix_twisted_25_5_0 branch from 6f26c31 to b3ddde3 Compare June 20, 2025 17:41
Comment thread tests/test_server.py Dismissed
@anoadragon453 anoadragon453 enabled auto-merge (squash) June 24, 2025 10:28
@anoadragon453
Copy link
Copy Markdown
Member Author

CI failures look like a flake, so going to merge.

@anoadragon453 anoadragon453 disabled auto-merge June 24, 2025 10:52
@anoadragon453 anoadragon453 merged commit 6791e6e into develop Jun 24, 2025
42 of 44 checks passed
@anoadragon453 anoadragon453 deleted the anoa/fix_twisted_25_5_0 branch June 24, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failures with Twisted 25.5.0

4 participants