Closed sethmlarson closed 1 year ago
Oh my. Mostly I'm just impressed if it works. Good call on only changing it for non-CPython implementations, in case someone is already using isinstance to check if they've got our SSLContext.
I'll wait for final review until the tests pass.
Looks like a bug in PyPy's SSLContext.load_cert_chain()
function, they're not accepting PosixPath
objects. Unfortunately their GitLab instance appears to be offline right now. I guess I'll check later?
Okay @davisagli tests are passing so ready for review. If you'd like to take a stab at PyPy support without the horrible hacks please do, I would like to not have them :sweat:
Thanks for getting PyPy to work. I am not familiar with the project, but am a PyPy core dev. Please ping me (mattip) if you come across any other PyPy problems.
I opened https://foss.heptapod.net/pypy/pypy/-/issues/4002 to continue the discussion.
@mattip Thanks Matti! We'll keep you in mind if we run into future problems :)
This is very much a hack, I don't like it, but attempting to add support to PyPy while maintaining the
SSLContext
subclassing is a huge pain from my initial attempt. The__class__
hack maintains compatibility for aiohttp and trustme.Closes #112