Closed twm closed 6 months ago
Does vendoring a stdlib function have license implications? I'd rather deal with the possibility of tinkering in the email module than copy the PSF license.
@glyph I thought we've vendored stuff from the stdlib in Twisted before... is that not the case?
Okay, I switched to using multipart
for everything.
Thanks for the feedback. Much appreciated!
I have approved the PR and I am ok with using multipart
for treq
.
My comment about multipart
vs stdlib
was more of a FYI for what was done in twisted/twisted to fix this issue.
Also, I remember some discussions for getting treq code include in Twisted and have it as a high-level API .
From what I can see in this PR, multipart
is used in "production" only to parse the Content-Type header. I was hoping that HTTP and MIME have the same standard for Content-Type header format.
I think that HTTP handling should be a core feature of any library, and this is why I would prefer to have http code implemented in stdlib.
For example, in Twisted, HTTP protocol handling is part of main Twisted package, while for LDAP we have a separate package.
Something similar for stdlib. I would expect Python to have a good enough HTTP handing, and use a separate package for LDAP handling.
Any chance we could get a new release with this fix? Fedora rawhide just updated to Python 3.13b2 and treq is failing to build. This PR doesn't apply cleanly to 23.11.0. Thanks.
I think that first we should fix the 3.13 support in twisted/twisted
Any chance we could get a new release with this fix? Fedora rawhide just updated to Python 3.13b2 and treq is failing to build. This PR doesn't apply cleanly to 23.11.0. Thanks.
Unfortunately on Fedora we don't package multipart, but python-multipart which is a different project. And while not entirely sure of the stability of each project, the multipart used here looks abandoned upstream (no commits since 2021).
multipart
may not be super-active, but it isn't abandoned. I just released 0.2.5.
multipart
may not be super-active, but it isn't abandoned. I just released 0.2.5.
That is awesome, thanks for the response here :). I'll work on getting it packaged for Fedora then.
@opoplawski Thanks for the ping! I'm currently a bit loopy on cough medicine, but I should be able to manage a release this weekend or next week.
Stop using
cgi
, which was deprecated in Python 3.11 and dropped in Python 3.13. Replace it with themultipart
package, which becomes a dependency.Fixes #355.