Skip to content
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

Add support for Python 3.12 and 3.13 to AWS Lambda integration. #3965

Merged
merged 2 commits into from
Jan 20, 2025

Conversation

antonpirker
Copy link
Member

@antonpirker antonpirker commented Jan 20, 2025

Its time to add support for newer versions of Python to our AWS Lambda integration.

Fixes #3946

Copy link

codecov bot commented Jan 20, 2025

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
13846 5 13841 4165
View the top 3 failed tests by shortest run time
tests.integrations.requests.test_requests test_omit_url_data_if_parsing_fails
Stack Traces | 0.092s run time
.tox/py3.13-requests/lib/python3.13.........................../site-packages/urllib3/connectionpool.py:787: in urlopen
    response = self._make_request(
.tox/py3.13-requests/lib/python3.13.........................../site-packages/urllib3/connectionpool.py:488: in _make_request
    raise new_e
.tox/py3.13-requests/lib/python3.13.........................../site-packages/urllib3/connectionpool.py:464: in _make_request
    self._validate_conn(conn)
.tox/py3.13-requests/lib/python3.13.........................../site-packages/urllib3/connectionpool.py:1093: in _validate_conn
    conn.connect()
.tox/py3.13-requests/lib/python3.13............/site-packages/urllib3/connection.py:741: in connect
    sock_and_verified = _ssl_wrap_socket_and_match_hostname(
.tox/py3.13-requests/lib/python3.13............/site-packages/urllib3/connection.py:920: in _ssl_wrap_socket_and_match_hostname
    ssl_sock = ssl_wrap_socket(
.tox/py3.13-requests/lib/python3.13.../urllib3/util/ssl_.py:460: in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
.tox/py3.13-requests/lib/python3.13.../urllib3/util/ssl_.py:504: in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
.../hostedtoolcache/Python/3.13.1................../x64/lib/python3.13/ssl.py:455: in wrap_socket
    return self.sslsocket_class._create(
.../hostedtoolcache/Python/3.13.1................../x64/lib/python3.13/ssl.py:1076: in _create
    self.do_handshake()
.../hostedtoolcache/Python/3.13.1................../x64/lib/python3.13/ssl.py:1372: in do_handshake
    self._sslobj.do_handshake()
E   ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:
.tox/py3.13-requests/lib/python3.13....../site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.tox/py3.13-requests/lib/python3.13.........................../site-packages/urllib3/connectionpool.py:841: in urlopen
    retries = retries.increment(
.tox/py3.13-requests/lib/python3.13.../urllib3/util/retry.py:474: in increment
    raise reraise(type(error), error, _stacktrace)
.tox/py3.13-requests/lib/python3.13.../urllib3/util/util.py:38: in reraise
    raise value.with_traceback(tb)
.tox/py3.13-requests/lib/python3.13.........................../site-packages/urllib3/connectionpool.py:787: in urlopen
    response = self._make_request(
.tox/py3.13-requests/lib/python3.13.........................../site-packages/urllib3/connectionpool.py:488: in _make_request
    raise new_e
.tox/py3.13-requests/lib/python3.13.........................../site-packages/urllib3/connectionpool.py:464: in _make_request
    self._validate_conn(conn)
.tox/py3.13-requests/lib/python3.13.........................../site-packages/urllib3/connectionpool.py:1093: in _validate_conn
    conn.connect()
.tox/py3.13-requests/lib/python3.13............/site-packages/urllib3/connection.py:741: in connect
    sock_and_verified = _ssl_wrap_socket_and_match_hostname(
.tox/py3.13-requests/lib/python3.13............/site-packages/urllib3/connection.py:920: in _ssl_wrap_socket_and_match_hostname
    ssl_sock = ssl_wrap_socket(
.tox/py3.13-requests/lib/python3.13.../urllib3/util/ssl_.py:460: in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
.tox/py3.13-requests/lib/python3.13.../urllib3/util/ssl_.py:504: in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
.../hostedtoolcache/Python/3.13.1................../x64/lib/python3.13/ssl.py:455: in wrap_socket
    return self.sslsocket_class._create(
.../hostedtoolcache/Python/3.13.1................../x64/lib/python3.13/ssl.py:1076: in _create
    self.do_handshake()
.../hostedtoolcache/Python/3.13.1................../x64/lib/python3.13/ssl.py:1372: in do_handshake
    self._sslobj.do_handshake()
E   urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:
.../integrations/requests/test_requests.py:53: in test_omit_url_data_if_parsing_fails
    response = requests.get(url)
.tox/py3.13-requests/lib/python3.13....../site-packages/requests/api.py:73: in get
    return request("get", url, params=params, **kwargs)
.tox/py3.13-requests/lib/python3.13....../site-packages/requests/api.py:59: in request
    return session.request(method=method, url=url, **kwargs)
.tox/py3.13-requests/lib/python3.13....../site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.tox/py3.13-requests/lib/python3.13....../site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.tox/py3.13-requests/lib/python3.13....../site-packages/requests/adapters.py:682: in send
    raise ConnectionError(err, request=request)
E   requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
tests.integrations.requests.test_requests test_omit_url_data_if_parsing_fails
Stack Traces | 0.171s run time
.tox/py3.7-common/lib/python3.7.........................../site-packages/urllib3/connectionpool.py:803: in urlopen
    **response_kw,
.tox/py3.7-common/lib/python3.7.........................../site-packages/urllib3/connectionpool.py:492: in _make_request
    raise new_e
.tox/py3.7-common/lib/python3.7.........................../site-packages/urllib3/connectionpool.py:468: in _make_request
    self._validate_conn(conn)
.tox/py3.7-common/lib/python3.7.........................../site-packages/urllib3/connectionpool.py:1097: in _validate_conn
    conn.connect()
.tox/py3.7-common/lib/python3.7............/site-packages/urllib3/connection.py:658: in connect
    assert_fingerprint=self.assert_fingerprint,
.tox/py3.7-common/lib/python3.7............/site-packages/urllib3/connection.py:793: in _ssl_wrap_socket_and_match_hostname
    tls_in_tls=tls_in_tls,
.tox/py3.7-common/lib/python3.7.../urllib3/util/ssl_.py:471: in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
.tox/py3.7-common/lib/python3.7.../urllib3/util/ssl_.py:515: in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
.../hostedtoolcache/Python/3.7.17................../x64/lib/python3.7/ssl.py:423: in wrap_socket
    session=session
.../hostedtoolcache/Python/3.7.17................../x64/lib/python3.7/ssl.py:870: in _create
    self.do_handshake()
.../hostedtoolcache/Python/3.7.17................../x64/lib/python3.7/ssl.py:1139: in do_handshake
    self._sslobj.do_handshake()
E   ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:
.tox/py3.7-common/lib/python3.7....../site-packages/requests/adapters.py:497: in send
    chunked=chunked,
.tox/py3.7-common/lib/python3.7.........................../site-packages/urllib3/connectionpool.py:846: in urlopen
    method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
.tox/py3.7-common/lib/python3.7.../urllib3/util/retry.py:470: in increment
    raise reraise(type(error), error, _stacktrace)
.tox/py3.7-common/lib/python3.7.../urllib3/util/util.py:38: in reraise
    raise value.with_traceback(tb)
.tox/py3.7-common/lib/python3.7.........................../site-packages/urllib3/connectionpool.py:803: in urlopen
    **response_kw,
.tox/py3.7-common/lib/python3.7.........................../site-packages/urllib3/connectionpool.py:492: in _make_request
    raise new_e
.tox/py3.7-common/lib/python3.7.........................../site-packages/urllib3/connectionpool.py:468: in _make_request
    self._validate_conn(conn)
.tox/py3.7-common/lib/python3.7.........................../site-packages/urllib3/connectionpool.py:1097: in _validate_conn
    conn.connect()
.tox/py3.7-common/lib/python3.7............/site-packages/urllib3/connection.py:658: in connect
    assert_fingerprint=self.assert_fingerprint,
.tox/py3.7-common/lib/python3.7............/site-packages/urllib3/connection.py:793: in _ssl_wrap_socket_and_match_hostname
    tls_in_tls=tls_in_tls,
.tox/py3.7-common/lib/python3.7.../urllib3/util/ssl_.py:471: in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
.tox/py3.7-common/lib/python3.7.../urllib3/util/ssl_.py:515: in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
.../hostedtoolcache/Python/3.7.17................../x64/lib/python3.7/ssl.py:423: in wrap_socket
    session=session
.../hostedtoolcache/Python/3.7.17................../x64/lib/python3.7/ssl.py:870: in _create
    self.do_handshake()
.../hostedtoolcache/Python/3.7.17................../x64/lib/python3.7/ssl.py:1139: in do_handshake
    self._sslobj.do_handshake()
E   urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:
.../integrations/requests/test_requests.py:53: in test_omit_url_data_if_parsing_fails
    response = requests.get(url)
.tox/py3.7-common/lib/python3.7....../site-packages/requests/api.py:73: in get
    return request("get", url, params=params, **kwargs)
.tox/py3.7-common/lib/python3.7....../site-packages/requests/api.py:59: in request
    return session.request(method=method, url=url, **kwargs)
.tox/py3.7-common/lib/python3.7....../site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.tox/py3.7-common/lib/python3.7....../site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.tox/py3.7-common/lib/python3.7....../site-packages/requests/adapters.py:501: in send
    raise ConnectionError(err, request=request)
E   requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
tests.integrations.stdlib.test_httplib test_span_origin
Stack Traces | 0.183s run time
.../integrations/stdlib/test_httplib.py:338: in test_span_origin
    conn.request("GET", "/foo")
.../hostedtoolcache/Python/3.7.17.........................../x64/lib/python3.7/http/client.py:1281: in request
    self._send_request(method, url, body, headers, encode_chunked)
.../hostedtoolcache/Python/3.7.17.........................../x64/lib/python3.7/http/client.py:1327: in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
.../hostedtoolcache/Python/3.7.17.........................../x64/lib/python3.7/http/client.py:1276: in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
.../hostedtoolcache/Python/3.7.17.........................../x64/lib/python3.7/http/client.py:1036: in _send_output
    self.send(msg)
.../hostedtoolcache/Python/3.7.17.........................../x64/lib/python3.7/http/client.py:976: in send
    self.connect()
.../hostedtoolcache/Python/3.7.17.........................../x64/lib/python3.7/http/client.py:1451: in connect
    server_hostname=server_hostname)
.../hostedtoolcache/Python/3.7.17.........................../x64/lib/python3.7/ssl.py:423: in wrap_socket
    session=session
.../hostedtoolcache/Python/3.7.17.........................../x64/lib/python3.7/ssl.py:870: in _create
    self.do_handshake()
.../hostedtoolcache/Python/3.7.17.........................../x64/lib/python3.7/ssl.py:1139: in do_handshake
    self._sslobj.do_handshake()
E   ConnectionResetError: [Errno 104] Connection reset by peer

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@antonpirker antonpirker marked this pull request as ready for review January 20, 2025 14:41
@antonpirker antonpirker merged commit d2ccac0 into master Jan 20, 2025
145 checks passed
@antonpirker antonpirker deleted the antonpirker/aws-lambda/new-python-versions branch January 20, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Python 3.12 and 3.13 support to AWS Lambda Layer
2 participants