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.13 #49970

Merged
merged 16 commits into from
Mar 4, 2025

Update assert_png to check for magic bytes directly

5d65e02
Select commit
Loading
Failed to load commit list.
Merged

Add support for Python 3.13 #49970

Update assert_png to check for magic bytes directly
5d65e02
Select commit
Loading
Failed to load commit list.
Azure Pipelines / Azure Pipelines failed Feb 24, 2025 in 57m 36s

Build #20250224.19 had test failures

Details

Tests

  • Failed: 2 (0.04%)
  • Passed: 5,179 (93.62%)
  • Other: 351 (6.34%)
  • Total: 5,532

Annotations

Check failure on line 43 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure Pipelines

Build log #L43

Bash exited with code '1'.

Check failure on line 1543 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure Pipelines

Build log #L1543

Bash exited with code '1'.

Check failure on line 453 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure Pipelines

Build log #L453

Cmd.exe exited with code '1'.

Check failure on line 1 in test_raw_data_frame

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure Pipelines

test_raw_data_frame

httpx.ReadTimeout: The read operation timed out
Raw output
@contextlib.contextmanager
    def map_httpcore_exceptions() -> typing.Iterator[None]:
        try:
>           yield

.tox\py313\Lib\site-packages\httpx\_transports\default.py:72: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox\py313\Lib\site-packages\httpx\_transports\default.py:236: in handle_request
    resp = self._pool.handle_request(req)
.tox\py313\Lib\site-packages\httpcore\_sync\connection_pool.py:256: in handle_request
    raise exc from None
.tox\py313\Lib\site-packages\httpcore\_sync\connection_pool.py:236: in handle_request
    response = connection.handle_request(
.tox\py313\Lib\site-packages\httpcore\_sync\connection.py:103: in handle_request
    return self._connection.handle_request(request)
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:183: in handle_request
    raise exc
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:146: in handle_request
    status, headers = self._receive_response(
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:290: in _receive_response
    event = self._receive_stream_event(request, stream_id)
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:329: in _receive_stream_event
    self._receive_events(request, stream_id)
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:357: in _receive_events
    events = self._read_incoming_data(request)
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:446: in _read_incoming_data
    raise exc
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:432: in _read_incoming_data
    data = self._network_stream.read(self.READ_NUM_BYTES, timeout)
.tox\py313\Lib\site-packages\httpcore\_backends\sync.py:126: in read
    with map_exceptions(exc_map):
C:\hostedtoolcache\windows\Python\3.13.2\x64\Lib\contextlib.py:162: in __exit__
    self.gen.throw(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

map = {<class 'TimeoutError'>: <class 'httpcore.ReadTimeout'>, <class 'OSError'>: <class 'httpcore.ReadError'>}

    @contextlib.contextmanager
    def map_exceptions(map: ExceptionMapping) -> typing.Iterator[None]:
        try:
            yield
        except Exception as exc:  # noqa: PIE786
            for from_exc, to_exc in map.items():
                if isinstance(exc, from_exc):
>                   raise to_exc(exc) from exc
E                   httpcore.ReadTimeout: The read operation timed out

.tox\py313\Lib\site-packages\httpcore\_exceptions.py:14: ReadTimeout

The above exception was the direct cause of the following exception:

self = <functional.test_response.TestH2Response object at 0x0000023DCD91FE50>

    def test_raw_data_frame(self):
        @wptserve.handlers.handler
        def handler(request, response):
            response.write_status_headers()
            response.writer.write_raw_data_frame(data=b'Hello world', end_stream=True)
    
        route = ("GET", "/h2test/test_file_like_response", handler)
        self.server.router.register(*route)
>       resp = self.client.get(route[1])

wptserve\tests\functional\test_response.py:301: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox\py313\Lib\site-packages\httpx\_client.py:1066: in get
    return self.request(
.tox\py313\Lib\site-packages\httpx\_client.py:837: in request
    return self.send(request, auth=auth, follow_redirects=follow_redirects)
.tox\py313\Lib\site-packages\httpx\_client.py:926: in send
    response = self._send_handling_auth(
.tox\py313\Lib\site-packages\httpx\_client.py:954: in _send_handling_auth
    response = self._send_handling_redirects(
.tox\py313\Lib\site-packages\httpx\_client.py:991: in _send_handling_redirects
    response = self._send_single_request(request)
.tox\py313\Lib\site-packages\httpx\_client.py:1027: in _send_single_request
    response = transport.handle_request(request)
.tox\py313\Lib\site-packages\httpx\_transports\default.py:235: in handle_request
    with map_httpcore_exceptions():
C:\hostedtoolcache\windows\Python\3.13

Check failure on line 1 in test_raw_header_continuation_frame

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure Pipelines

test_raw_header_continuation_frame

httpx.ReadTimeout: The read operation timed out
Raw output
@contextlib.contextmanager
    def map_httpcore_exceptions() -> typing.Iterator[None]:
        try:
>           yield

.tox\py313\Lib\site-packages\httpx\_transports\default.py:72: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox\py313\Lib\site-packages\httpx\_transports\default.py:236: in handle_request
    resp = self._pool.handle_request(req)
.tox\py313\Lib\site-packages\httpcore\_sync\connection_pool.py:256: in handle_request
    raise exc from None
.tox\py313\Lib\site-packages\httpcore\_sync\connection_pool.py:236: in handle_request
    response = connection.handle_request(
.tox\py313\Lib\site-packages\httpcore\_sync\connection.py:103: in handle_request
    return self._connection.handle_request(request)
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:183: in handle_request
    raise exc
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:146: in handle_request
    status, headers = self._receive_response(
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:290: in _receive_response
    event = self._receive_stream_event(request, stream_id)
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:329: in _receive_stream_event
    self._receive_events(request, stream_id)
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:357: in _receive_events
    events = self._read_incoming_data(request)
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:446: in _read_incoming_data
    raise exc
.tox\py313\Lib\site-packages\httpcore\_sync\http2.py:432: in _read_incoming_data
    data = self._network_stream.read(self.READ_NUM_BYTES, timeout)
.tox\py313\Lib\site-packages\httpcore\_backends\sync.py:126: in read
    with map_exceptions(exc_map):
C:\hostedtoolcache\windows\Python\3.13.2\x64\Lib\contextlib.py:162: in __exit__
    self.gen.throw(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

map = {<class 'TimeoutError'>: <class 'httpcore.ReadTimeout'>, <class 'OSError'>: <class 'httpcore.ReadError'>}

    @contextlib.contextmanager
    def map_exceptions(map: ExceptionMapping) -> typing.Iterator[None]:
        try:
            yield
        except Exception as exc:  # noqa: PIE786
            for from_exc, to_exc in map.items():
                if isinstance(exc, from_exc):
>                   raise to_exc(exc) from exc
E                   httpcore.ReadTimeout: The read operation timed out

.tox\py313\Lib\site-packages\httpcore\_exceptions.py:14: ReadTimeout

The above exception was the direct cause of the following exception:

self = <functional.test_response.TestH2Response object at 0x0000023DCD825A50>

    def test_raw_header_continuation_frame(self):
        @wptserve.handlers.handler
        def handler(request, response):
            response.writer.write_raw_header_frame([
                (':status', '204')
            ])
    
            response.writer.write_raw_continuation_frame([
                ('server', 'TEST-H2')
            ], end_headers=True)
    
        route = ("GET", "/h2test/test_file_like_response", handler)
        self.server.router.register(*route)
>       resp = self.client.get(route[1])

wptserve\tests\functional\test_response.py:318: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox\py313\Lib\site-packages\httpx\_client.py:1066: in get
    return self.request(
.tox\py313\Lib\site-packages\httpx\_client.py:837: in request
    return self.send(request, auth=auth, follow_redirects=follow_redirects)
.tox\py313\Lib\site-packages\httpx\_client.py:926: in send
    response = self._send_handling_auth(
.tox\py313\Lib\site-packages\httpx\_client.py:954: in _send_handling_auth
    response = self._send_handling_redirects(
.tox\py313\Lib\site-packages\httpx\_client.py:991: in _send_handling_redirects
    response = self._send_single_request(request)
.tox\py313\Lib\site-packages\httpx\_client.py:1027: in _send_single_request
    response = transport.handle_request(request)
.tox\py313\Lib\site-packages\http