-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove memoryview
usage in urllib3.contrib.pyopenssl#sendall
#719
Remove memoryview
usage in urllib3.contrib.pyopenssl#sendall
#719
Conversation
Looks swell, thank you for finding it, reporting it, and fixing it! (And to @Lukasa for being Captain Maintainer) 🍮 |
Remove `memoryview` usage in urllib3.contrib.pyopenssl#sendall
Sadly the lastest dev doesnt fix it for me, only rolling back to 1.10.4 does. Here is the traceback from latest dev on heroku trying to send email via djrill
|
In fact, your traceback is substantially identical to the one originally posted in #717, which strongly suggests you were using the flawed version of the code. =) |
It was very late/early this morning so you might be right and heroku has been known to cache previous versions :) I did however force a full reinstall by switching python versions to be sure caches were cleared and then even opened bash into heroku and checked the urllib3/contrib/pyopenssl.py that the following was gone.
And, like I said, as soon as I installled 1.10.4 it was working again. I will have to wait until later to try again as it is only happening under very specific circumstances. |
Bear in mind that requests uses its own personal copy of urllib3, and does not use any one that you install from PyPI. This may have caused your misleading result. |
^^yes. Exactly this. But then why would it work when I switched urllib3 to 1.10.4. |
It should be unrelated. Note, however, that this issue is not totally deterministic, and depends how the writes land on the SSL layer. |
Thanks for the help Lukasa. I will try again later and replace requests with an updated urllib3 fork to test. |
I'm still running into this issue in the latest version of kennethreitz/requests (2.8.1), which vendors urllib3 into itself. Might it be possible to cut a release soon so that I can try and get requests rolled forward with this fix included? |
Please how to remove this memoryview ??? |
@sjyvmbam Can you please open a new issue with the actual problem you're facing? We introduced another memoryview in 1.26.0, this six years old pull request is probably not related to your problem. |
hello,
please if you can help me that will be nice i put a picture inside my
email.
best Regards
Yvan Mbami
Am 29.09.2021 14:12, schrieb Quentin Pradet:
… @sjyvmbam [1] Can you please open a new issue with the actual problem
you're facing? We introduced another memoryview in 1.26.0, this six
years old pull request is probably not related to your problem.
--
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub [2], or unsubscribe
[3].
Triage notifications on the go with GitHub Mobile for iOS [4] or
Android [5].
Links:
------
[1] https://github.com/sjyvmbam
[2] #719 (comment)
[3]
https://github.com/notifications/unsubscribe-auth/AOTAN6GBISCLBNS7NXOMLHDUEL7EFANCNFSM4BR6PN4Q
[4]
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
[5]
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub
|
As described in #717,
urllib3.contrib.pyopenssl#sendall
currently fails when WantWriteError is thrown by OpenSSL due to urllib3 preemptively casting the data to be written as amemoryview
. This results in duplicate bytestring allocations by pyopenssl and OpenSSL issuing a SSL3_WRITE_PENDING error.This change removes
memoryview
usage fromurllib3/contrib/pyopenssl.py
. We thus rely on the underlying pyOpenSSL library's ability to cast data to the proper bytestring type.