Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
Accelerator
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Type
/
to search
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading.
Please reload this page
.
python
/
cpython
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
35.2k
Star
74.3k
Code
Issues
5k+
Pull requests
2.5k
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
gh-153967: handle invalid file object in argparse._print_message
- #153969
#153969
Merged
savannahostrowski
merged 15 commits into
python:main
python/cpython:main
from
ptim0626:argparse-invalid-file-error
ptim0626/cpython:argparse-invalid-file-error
Copy head branch name to clipboard
Aug 7, 2026
Conversation
Commits
15
(15)
Checks
Files changed
Merged
gh-153967: handle invalid file object in argparse._print_message
#153969
savannahostrowski
merged 15 commits into
python:main
python/cpython:main
from
ptim0626:argparse-invalid-file-error
ptim0626/cpython:argparse-invalid-file-error
Copy head branch name to clipboard
Commits
Commits on Jul 18, 2026
Handle invalid file object when passed explicitly
ptim0626
committed
fd8fc3a
View commit details
Copy full SHA for fd8fc3a
Browse repository at this point
Add tests for valid/invalid file with stdout/err as None
ptim0626
committed
259fa8e
View commit details
Copy full SHA for 259fa8e
Browse repository at this point
Update assertRaise to use context-manager format
ptim0626
committed
84bc110
View commit details
Copy full SHA for 84bc110
Browse repository at this point
Remove redundant tests
ptim0626
committed
2f22610
View commit details
Copy full SHA for 2f22610
Browse repository at this point
Add NEWS entry
ptim0626
committed
b25daae
View commit details
Copy full SHA for b25daae
Browse repository at this point
Modify invalid file test to include falsy object
ptim0626
committed
27787e9
View commit details
Copy full SHA for 27787e9
Browse repository at this point
Refactor to a flatter structure and silently pass with falsy message
ptim0626
committed
516ff20
View commit details
Copy full SHA for 516ff20
Browse repository at this point
Commits on Jul 19, 2026
Fix docs parser issue
ptim0626
committed
d0af2f4
View commit details
Copy full SHA for d0af2f4
Browse repository at this point
Fix missing file name in meth ref
ptim0626
committed
97c6b58
View commit details
Copy full SHA for 97c6b58
Browse repository at this point
Merge branch 'main' into argparse-invalid-file-error
ZeroIntensity
authored
7a5d2ec
View commit details
Copy full SHA for 7a5d2ec
Browse repository at this point
Merge branch 'main' into argparse-invalid-file-error
chris-eibl
authored
a5a4d6d
View commit details
Copy full SHA for a5a4d6d
Browse repository at this point
Commits on Jul 24, 2026
Remove _IOBase check to support writable objects
ptim0626
committed
0d22e85
View commit details
Copy full SHA for 0d22e85
Browse repository at this point
Commits on Aug 6, 2026
Add test to ensure argparse.exit always raise SystemExit
ptim0626
committed
772a8e1
View commit details
Copy full SHA for 772a8e1
Browse repository at this point
Suppess OSError in _print_message
ptim0626
committed
6206743
View commit details
Copy full SHA for 6206743
Browse repository at this point
Commits on Aug 7, 2026
Merge branch 'main' into argparse-invalid-file-error
savannahostrowski
authored
70ad764
View commit details
Copy full SHA for 70ad764
Browse repository at this point
You can’t perform that action at this time.