Conversation
|
Thanks - I'm fine with the changes. Please add a changelog entry to document the reversal of the most recent minor API change back to what it was two versions before. Just for thinking it through: would the downstream Twisted benefit in any way from adopting bytearrays (instead of sticking with the "old" bytes-only API)? My assumption is that bytearrays are more performant - though I don't have data to back up this claim. I overlooked that the last change actually caused API breakage, because I misread the other ticket in a way that indicated it already was using bytesarray but not using the appropriate type hints. |
I can't imagine how. We are already receiving
It would be good to set up codspeed to have a tool that can quickly validate questions like this. For example, I would assume that the change I'm making here is a slight optimization, because it avoids calling a constructor and making a copy. "more performant" as a context-free term doesn't make much sense. More performant at what?
We really ought to have pins in our CI and dedicated downstream tests, so not exactly your fault for breaking a downstream (especially a new one). But, it would probably be good moving forward to have some tests for actually using bytearrays to make sure we're doing the right thing. |
|
@Kriechi changelog entry added |
1. deal with the fact that benchmarks now cause the benchmark to exit after the `benchmark` function is called 2. work around coverage opening files in the middle of our you-can't-open-files test coveragepy/coveragepy#2091 3. silence mypy about wsproto's overly-aggressive `bytearray` typing (this will probably need another update in a short while after a release includes python-hyper/wsproto#196 )
fixes #195