Skip to content

[pull] main from openai:main - #195

Merged
pull[bot] merged 5 commits into
Pyrex77:mainfrom
openai:main
Sep 30, 2026
Merged

pull[bot] merged 5 commits into
Pyrex77:mainfrom
openai:main

Conversation

@pull

@pull pull Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

marcuswood-oai and others added 3 commits September 30, 2026 00:06
Fields wrapped in `NotRequired` currently skip alias, format, and nested
transformation metadata. Unwrap it alongside `Required` so optional
typed-dictionary fields serialize consistently, while omitted fields
stay omitted.

Carries forward @Shubham-Padkonde’s fix from #3872 with current main
merged in, preserving the original commit and authorship. Includes one
focused sync/async regression covering aliases, date formatting, nested
dictionaries, lists, and omission.

Validation: both regression cases fail on main; 69 transform/typing
tests pass on each Pydantic version. Ruff, mypy, strict Pyright, and the
custom-code budget pass. Security review found no new dependencies,
execution paths, network destinations, or credential handling.

Co-authored-by: Shubham Padkonde <shubhampadkonde12@gmail.com>
Automated Release PR
---


##
[3.22.1](v3.22.0...v3.22.1)
(2026-09-30)


### Bug Fixes

* **api:** correct the missing authentication error message
([#3993](#3993))
([51692ed](51692ed)),
closes [#3962](#3962)
* transform NotRequired typed dictionary fields
([#3995](#3995))
([5544c18](5544c18))


### Chores

* **tests:** mark sample_file.txt as text with LF line endings
([#3879](#3879))
([fd78a48](fd78a48))


### Documentation

* **examples:** fix two stale example comments
([#3877](#3877))
([1c4830b](1c4830b))
* **examples:** print event.delta in the streaming helpers doc
([#3876](#3876))
([063375b](063375b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: openai-sdks[bot] <284451331+openai-sdks[bot]@users.noreply.github.com>
## Summary
- Use `time.monotonic()` for elapsed-time deadlines in both synchronous
and asynchronous file-processing polling.
- Add regression coverage for a wall-clock rollback in both resource
variants.

## Bug

`Files.wait_for_processing()` and its asynchronous counterpart used
`time.time()` to measure elapsed time. If the system wall clock moves
backwards while a file is still processing, the calculated elapsed time
also moves backwards and the timeout can be postponed indefinitely.

### Reproduction

With `max_wait_seconds=1`, `poll_interval=5`, and a wall clock that
changes from `100` to `90` after the first poll:

- Expected: raise the timeout error once the monotonic deadline has
elapsed.
- Actual before this change: continue polling and enter another
five-second sleep.

## Root cause

Wall-clock time is adjustable and is not suitable for measuring elapsed
durations.

## Fix

Use Python's monotonic clock for both the initial timestamp and every
deadline check. This does not change the public API, poll interval,
terminal states, or error message.

## Validation

- `tests/lib/test_file_processing.py`: 15 passed
- Ruff check: passed
- Ruff format check: passed
- Isolated synchronous and asynchronous rollback reproducer: passed

Commands used:

```text
PYTHONPATH=/tmp/openai-python-file-timeout-deps-20260828:src python -m pytest -p no:cacheprovider -o addopts= --confcutdir=tests/lib --asyncio-mode=auto -q tests/lib/test_file_processing.py
python -m ruff check --no-cache src/openai/lib/_files.py tests/lib/test_file_processing.py
python -m ruff format --no-cache --check src/openai/lib/_files.py tests/lib/test_file_processing.py
```

---------

Co-authored-by: Marcus Wood <marcuswood@openai.com>
@pull pull Bot locked and limited conversation to collaborators Sep 30, 2026
@pull pull Bot added the ⤵️ pull label Sep 30, 2026
markstuart-oai and others added 2 commits September 30, 2026 06:36
## Summary

Responses WebSocket connections now honor `max_queue_size` during
reconnect even when no messages were queued before connecting.

## Changes

- Keep the caller's configured send queue for synchronous and
asynchronous Responses connections, including beta Responses.
- Continue raising `WebSocketQueueFullError` at the configured byte
limit and flush admitted messages after reconnect.

Co-authored-by: markstuart-oai <323302876+markstuart-oai@users.noreply.github.com>
## Summary

Preserve WebSocket endpoint paths and query parameters when using a
custom base URL.

## Changes

- Keep the Responses endpoint when the base URL includes a query string.
- Preserve query parameters on an explicit WebSocket base URL for
Responses, Realtime, and Live.
- Let connection query parameters override the selected URL, and the
selected URL override client defaults. Preserve repeated URL query
values.

Co-authored-by: markstuart-oai <323302876+markstuart-oai@users.noreply.github.com>
@pull
pull Bot merged commit 7f203fd into Pyrex77:main Sep 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants