Skip to content

docs: fix deprecated capwords import for Python 3.11+ compatibility#2605

Merged
seratch merged 1 commit intoopenai:mainfrom
Jah-yee:fix/deprecated-capwords
Mar 5, 2026
Merged

docs: fix deprecated capwords import for Python 3.11+ compatibility#2605
seratch merged 1 commit intoopenai:mainfrom
Jah-yee:fix/deprecated-capwords

Conversation

@Jah-yee
Copy link
Contributor

@Jah-yee Jah-yee commented Mar 5, 2026

Replace deprecated string.capwords with str.title() for Python 3.11+ compatibility. The capwords function from the string module is deprecated since Python 3.11 and will be removed in Python 3.13. This fix updates docs/scripts/generate_ref_files.py to use the built-in str.title() method instead.

Replace deprecated string.capwords with str.title() for Python 3.11+ compatibility.
The capwords function from the 'string' module is deprecated since Python 3.11
and will be removed in Python 3.13.
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Mar 5, 2026
@seratch seratch changed the title Fix deprecated capwords import for Python 3.11+ compatibility docs: fix deprecated capwords import for Python 3.11+ compatibility Mar 5, 2026
@seratch seratch merged commit a48d801 into openai:main Mar 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants