Skip to content

📝 Add a note that Python 3.13+ venv creates .gitignore by default#10

Open
hbrooks wants to merge 4 commits into
masterfrom
demo/pr-15592
Open

📝 Add a note that Python 3.13+ venv creates .gitignore by default#10
hbrooks wants to merge 4 commits into
masterfrom
demo/pr-15592

Conversation

@hbrooks
Copy link
Copy Markdown

@hbrooks hbrooks commented May 28, 2026

Originally PR fastapi#15592 in fastapi/fastapi by @ftnext

ftnext added 4 commits May 24, 2026 13:27
Python 3.13's venv module creates SCM ignore files by default, including Git ignore files, so the manual .gitignore step is only needed for Python 3.12 and below.

This matches the existing uv tip, as uv also creates .venv/.gitignore when creating the virtual environment.

Reference: https://docs.python.org/3/whatsnew/3.13.html#venv

Context: noticed while checking virtual-environments.md after fastapi#15463 in 0.163.2.
@github-actions github-actions Bot added the docs label May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants