-
Notifications
You must be signed in to change notification settings - Fork 1.4k
posix.link, termios.error, warn() error, closefd=False for std in/out #6942
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
Conversation
- Use linkat() with AT_SYMLINK_FOLLOW on Unix - Raise NotImplementedError on non-Unix when follow_symlinks=False - Register link in supports_follow_symlinks
- Replace manual exception creation with new_os_subtype_error in termios - Remove redundant .to_owned() calls in os.link() error messages
- Prevent closing underlying fd when stdio wrappers are dropped - Remove expectedFailure from test_fdopen in test_os.py
📝 WalkthroughWalkthroughThis PR updates error handling and OS-specific function behavior across multiple stdlib modules. Changes include refactoring termios error construction to use a structured pattern, adding follow_symlinks parameter support to os.link with platform-specific implementations, propagating warning errors instead of silencing them, and adjusting file descriptor closure behavior for standard IO streams. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [ ] lib: cpython/Lib/os.py dependencies:
dependent tests: (158 tests)
Legend:
|
Summary by CodeRabbit
New Features
follow_symlinksparameter control to the link function for enhanced symlink handling.Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.