adapters: fix for requests 2.32.2+#72
Merged
msabramo merged 1 commit intomsabramo:masterfrom Jan 5, 2025
simondeziel:compat-requests-2.32.2
Merged
adapters: fix for requests 2.32.2+#72msabramo merged 1 commit intomsabramo:masterfrom simondeziel:compat-requests-2.32.2
msabramo merged 1 commit intomsabramo:masterfrom
simondeziel:compat-requests-2.32.2
Conversation
This was referenced May 22, 2024
Collaborator
|
Since this project seems to be abandoned, but its longevity is important to my team, we've forked the project as
We've migrated this PR there, merged it, and released to PyPI as part of v0.4.0. |
simondeziel
added a commit
to simondeziel/pylxd
that referenced
this pull request
May 23, 2024
…ocket psf/requests#6710 msabramo/requests-unixsocket#72 Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
simondeziel
added a commit
to simondeziel/pylxd
that referenced
this pull request
May 23, 2024
requests 2.32 security fix recommends a fix: psf/requests#6710 This was proposed (but not yet merged) to requests-unixsocket in: msabramo/requests-unixsocket#72 Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
|
@msabramo Can we get this merged? This is a crucial fix |
|
I've tested this PR and pytest 8.2.1 fails in 4 units Here is pytest output:+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-requests-unixsocket-0.3.0-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-requests-unixsocket-0.3.0-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.10.14, pytest-8.2.1, pluggy-1.5.0
rootdir: /home/tkloczko/rpmbuild/BUILD/requests-unixsocket-0.3.0
configfile: pytest.ini
collected 5 items
requests_unixsocket/tests/test_requests_unixsocket.py FFF.F [100%]
========================================================================================= FAILURES ==========================================================================================
________________________________________________________________________________ test_unix_domain_adapter_ok ________________________________________________________________________________
requests_unixsocket/tests/test_requests_unixsocket.py:26: in test_unix_domain_adapter_ok
r = getattr(session, method)(url)
/usr/lib/python3.10/site-packages/requests/sessions.py:602: in get
return self.request("GET", url, **kwargs)
/usr/lib/python3.10/site-packages/requests/sessions.py:589: in request
resp = self.send(prep, **send_kwargs)
/usr/lib/python3.10/site-packages/requests/sessions.py:703: in send
r = adapter.send(request, **kwargs)
/usr/lib/python3.10/site-packages/requests/adapters.py:561: in send
self.cert_verify(conn, request.url, verify, cert)
/usr/lib/python3.10/site-packages/requests/adapters.py:320: in cert_verify
conn.cert_reqs = "CERT_NONE"
E AttributeError: 'NoneType' object has no attribute 'cert_reqs'
______________________________________________________________________ test_unix_domain_adapter_url_with_query_params _______________________________________________________________________
requests_unixsocket/tests/test_requests_unixsocket.py:53: in test_unix_domain_adapter_url_with_query_params
r = getattr(session, method)(url)
/usr/lib/python3.10/site-packages/requests/sessions.py:602: in get
return self.request("GET", url, **kwargs)
/usr/lib/python3.10/site-packages/requests/sessions.py:589: in request
resp = self.send(prep, **send_kwargs)
/usr/lib/python3.10/site-packages/requests/sessions.py:703: in send
r = adapter.send(request, **kwargs)
/usr/lib/python3.10/site-packages/requests/adapters.py:561: in send
self.cert_verify(conn, request.url, verify, cert)
/usr/lib/python3.10/site-packages/requests/adapters.py:320: in cert_verify
conn.cert_reqs = "CERT_NONE"
E AttributeError: 'NoneType' object has no attribute 'cert_reqs'
_________________________________________________________________________ test_unix_domain_adapter_connection_error _________________________________________________________________________
requests_unixsocket/tests/test_requests_unixsocket.py:76: in test_unix_domain_adapter_connection_error
getattr(session, method)(
/usr/lib/python3.10/site-packages/requests/sessions.py:602: in get
return self.request("GET", url, **kwargs)
/usr/lib/python3.10/site-packages/requests/sessions.py:589: in request
resp = self.send(prep, **send_kwargs)
/usr/lib/python3.10/site-packages/requests/sessions.py:703: in send
r = adapter.send(request, **kwargs)
/usr/lib/python3.10/site-packages/requests/adapters.py:561: in send
self.cert_verify(conn, request.url, verify, cert)
/usr/lib/python3.10/site-packages/requests/adapters.py:320: in cert_verify
conn.cert_reqs = "CERT_NONE"
E AttributeError: 'NoneType' object has no attribute 'cert_reqs'
___________________________________________________________________________ test_unix_domain_adapter_monkeypatch ____________________________________________________________________________
requests_unixsocket/tests/test_requests_unixsocket.py:101: in test_unix_domain_adapter_monkeypatch
r = getattr(requests, method)(url)
../../BUILDROOT/python-requests-unixsocket-0.3.0-2.fc37.x86_64/usr/lib/python3.10/site-packages/requests_unixsocket/__init__.py:51: in get
return request('get', url, **kwargs)
../../BUILDROOT/python-requests-unixsocket-0.3.0-2.fc37.x86_64/usr/lib/python3.10/site-packages/requests_unixsocket/__init__.py:46: in request
return session.request(method=method, url=url, **kwargs)
/usr/lib/python3.10/site-packages/requests/sessions.py:589: in request
resp = self.send(prep, **send_kwargs)
/usr/lib/python3.10/site-packages/requests/sessions.py:703: in send
r = adapter.send(request, **kwargs)
/usr/lib/python3.10/site-packages/requests/adapters.py:561: in send
self.cert_verify(conn, request.url, verify, cert)
/usr/lib/python3.10/site-packages/requests/adapters.py:320: in cert_verify
conn.cert_reqs = "CERT_NONE"
E AttributeError: 'NoneType' object has no attribute 'cert_reqs'
================================================================================== short test summary info ==================================================================================
FAILED requests_unixsocket/tests/test_requests_unixsocket.py::test_unix_domain_adapter_ok - AttributeError: 'NoneType' object has no attribute 'cert_reqs'
FAILED requests_unixsocket/tests/test_requests_unixsocket.py::test_unix_domain_adapter_url_with_query_params - AttributeError: 'NoneType' object has no attribute 'cert_reqs'
FAILED requests_unixsocket/tests/test_requests_unixsocket.py::test_unix_domain_adapter_connection_error - AttributeError: 'NoneType' object has no attribute 'cert_reqs'
FAILED requests_unixsocket/tests/test_requests_unixsocket.py::test_unix_domain_adapter_monkeypatch - AttributeError: 'NoneType' object has no attribute 'cert_reqs'
================================================================================ 4 failed, 1 passed in 0.37s ================================================================================ |
|
Missing return, use |
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Contributor
Author
|
@layercak3 thanks I don't understand how I could fail to copy-n-paste in such a way, embarrassing :/ |
Contributor
Author
|
The original proposal was initially missing the |
4 tasks
|
Just retested 0.3.0 against + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-requests-unixsocket-0.3.0-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-requests-unixsocket-0.3.0-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.10.14, pytest-8.2.1, pluggy-1.5.0
rootdir: /home/tkloczko/rpmbuild/BUILD/requests-unixsocket-0.3.0
configfile: pytest.ini
collected 5 items
requests_unixsocket/tests/test_requests_unixsocket.py ..... [100%]
===================================================================================== 5 passed in 0.18s ===================================================================================== |
L3n41c
added a commit
to DataDog/integrations-core
that referenced
this pull request
Jun 3, 2024
in order to get the following fix: msabramo/requests-unixsocket#72
L3n41c
added a commit
to DataDog/integrations-core
that referenced
this pull request
Jun 3, 2024
in order to get the following fix: msabramo/requests-unixsocket#72
steveny91
added a commit
to DataDog/integrations-core
that referenced
this pull request
Jun 7, 2024
… to ddev (#17702) * Upgrade `requests` to `2.32.3` * Add changelog entry * Bump the `requests-unixsocket` version to requests-unixsocket2==0.4.0 in order to get the following fix: msabramo/requests-unixsocket#72 * update license * changelog * Apply suggestions from code review Co-authored-by: Steven Yuen <steven.yuen@datadoghq.com> * Regenerate LICENSE-3rdparty.csv * conflicts * sync license * changelog --------- Co-authored-by: steveny91 <steven.yuen@datadoghq.com>
datadog-agent-integrations-bot bot
pushed a commit
to DataDog/integrations-core
that referenced
this pull request
Jun 7, 2024
… to ddev (#17702) * Upgrade `requests` to `2.32.3` * Add changelog entry * Bump the `requests-unixsocket` version to requests-unixsocket2==0.4.0 in order to get the following fix: msabramo/requests-unixsocket#72 * update license * changelog * Apply suggestions from code review Co-authored-by: Steven Yuen <steven.yuen@datadoghq.com> * Regenerate LICENSE-3rdparty.csv * conflicts * sync license * changelog --------- Co-authored-by: steveny91 <steven.yuen@datadoghq.com> (cherry picked from commit e1e61e5)
github-actions bot
pushed a commit
to DataDog/integrations-core
that referenced
this pull request
Jun 7, 2024
… to ddev (#17702) * Upgrade `requests` to `2.32.3` * Add changelog entry * Bump the `requests-unixsocket` version to requests-unixsocket2==0.4.0 in order to get the following fix: msabramo/requests-unixsocket#72 * update license * changelog * Apply suggestions from code review Co-authored-by: Steven Yuen <steven.yuen@datadoghq.com> * Regenerate LICENSE-3rdparty.csv * conflicts * sync license * changelog --------- Co-authored-by: steveny91 <steven.yuen@datadoghq.com> e1e61e5
steveny91
pushed a commit
to DataDog/integrations-core
that referenced
this pull request
Jun 10, 2024
… to ddev (#17702) (#17776) * Upgrade `requests` to `2.32.3` * Add changelog entry * Bump the `requests-unixsocket` version to requests-unixsocket2==0.4.0 in order to get the following fix: msabramo/requests-unixsocket#72 * update license * changelog * Apply suggestions from code review Co-authored-by: Steven Yuen <steven.yuen@datadoghq.com> * Regenerate LICENSE-3rdparty.csv * conflicts * sync license * changelog --------- Co-authored-by: steveny91 <steven.yuen@datadoghq.com> (cherry picked from commit e1e61e5) Co-authored-by: Lénaïc Huard <L3n41c@users.noreply.github.com>
kba
added a commit
to OCR-D/core
that referenced
this pull request
Jul 16, 2024
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without this, all requests to
http+unix://URLs fail with:requests.exceptions.InvalidURL: Not supported URL scheme http+unix.Fixes #73