Skip to content

refs #12500 -- put set info callback on connection rather than context - #12505

Merged
glyph merged 1 commit into
twisted:trunkfrom
alex:no-context-info-callback
Sep 14, 2025
Merged

glyph merged 1 commit into
twisted:trunkfrom
alex:no-context-info-callback

Conversation

@alex

@alex alex commented Sep 14, 2025

Copy link
Copy Markdown
Member

this avoids mutating a connection that may be reused, which will be prohibited in future pyOpenSSL releases (and is already unsound)

@codspeed

codspeed Bot commented Sep 14, 2025 •

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #12505 will degrade performances by 2.11%

Comparing alex:no-context-info-callback (7472cbe) with trunk (aedee3e)

Summary

⚡ 7 improvements
❌ 1 (👁 1) regression
✅ 28 untouched

Benchmarks breakdown

Benchmark BASE HEAD Change
⚡ test_main_method[testAddCleanupPlain] 1.2 ms 1.1 ms +2.41%
⚡ test_main_method[testAddCleanupResolvedDeferred] 1.2 ms 1.1 ms +2.28%
⚡ test_main_method[testPlain] 1.2 ms 1.1 ms +2.36%
⚡ test_main_method[testResolvedDeferred] 1.1 ms 1.1 ms +2.43%
⚡ test_setup_teardown[BenchmarkTestsSetUpTearDownPlain] 1.1 ms 1.1 ms +2.11%
⚡ test_setup_teardown[BenchmarkTestsSetUpTearDownResolvedDeferred] 1.1 ms 1.1 ms +2.63%
👁 test_http_client_small_response 320.6 µs 327.5 µs -2.11%
⚡ test_http11_server_chunked_request 1.8 ms 1.8 ms +2.05%

@alex

alex commented Sep 14, 2025

Copy link
Copy Markdown
Member Author

given this is an internal only change (until the remainder of #12500 is resolved), what's teh etiquette for newsfragments?

@glyph

glyph commented Sep 14, 2025

Copy link
Copy Markdown
Member

Newsfragments can be empty .misc if it’s internal progress towards a goal. As @adiroiban has previously suggested I think we can just use the PR number if you don’t think an issue with its own description would be helpful

… context

this avoids mutating a connection that may be reused, which will be prohibited in future pyOpenSSL releases (and is already unsound)
@alex
alex force-pushed the no-context-info-callback branch from 25178f9 to 7472cbe Compare September 14, 2025 18:50
@alex

alex commented Sep 14, 2025 •

Copy link
Copy Markdown
Member Author

please review

@glyph

glyph commented Sep 14, 2025

Copy link
Copy Markdown
Member

I've acknowledged the regression on codespeed but @alex in the future please avoid making changes to malloc.c in PRs like this

@glyph glyph left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this change is actually going to get us all the way to the relevant change, but it may be a good step along the way, so let's land it.

@glyph
glyph merged commit 968e1d5 into twisted:trunk Sep 14, 2025
@alex
alex deleted the no-context-info-callback branch September 14, 2025 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants