Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue15531] os.path symlink docs missing

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Aug 1, 2012, 12:00 PM

Post #1 of 7 (97 views)
Permalink
[issue15531] os.path symlink docs missing

New submission from Dave Abrahams:

the docs for os.path don't mention the following facts which I think are important (in fact I assumed the facts would be the reverse):

os.path.realpath(l) works when l is a broken symbolic link, returning the path to the (missing) target

os.path.readlink(l) causes an error when l is a broken symbolic link.

----------
assignee: docs [at] pytho
components: Documentation
messages: 167163
nosy: dabrahams, docs [at] pytho
priority: normal
severity: normal
status: open
title: os.path symlink docs missing
type: enhancement
versions: Python 2.7

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15531>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 4, 2012, 1:56 PM

Post #2 of 7 (93 views)
Permalink
[issue15531] os.path symlink docs missing [In reply to]

R. David Murray added the comment:

The first of those acts as I would expect: os.path.realpath is operating only on the path, so if the last element is a symbolic link it doesn't have any reason to look for the target of that link.

The second one does seem less intuitive.

I'm not sure the first case is worth a patch...I'd have to see a suggested wording. The second probably is, assuming it is not in fact a bug.

----------
nosy: +larry, r.david.murray

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15531>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 4, 2012, 5:36 PM

Post #3 of 7 (95 views)
Permalink
[issue15531] os.path symlink docs missing [In reply to]

Larry Hastings added the comment:

I just tried it, and os.readlink('/tmp/broken-symlink') worked fine. What OS are you using?

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15531>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 4, 2012, 5:42 PM

Post #4 of 7 (95 views)
Permalink
[issue15531] os.path symlink docs missing [In reply to]

Dave Abrahams added the comment:

MacOS 10.7

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15531>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 4, 2012, 5:54 PM

Post #5 of 7 (92 views)
Permalink
[issue15531] os.path symlink docs missing [In reply to]

Larry Hastings added the comment:

What does the following script print out?

import os

os.chdir('/tmp')
os.symlink('--success--', 'foo')
print("this should print --success-- :")
print(os.readlink('foo'))
os.unlink('foo')

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15531>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 5, 2012, 12:02 PM

Post #6 of 7 (92 views)
Permalink
[issue15531] os.path symlink docs missing [In reply to]

Dave Abrahams added the comment:

on Sat Aug 04 2012, Larry Hastings <report-AT-bugs.python.org> wrote:

> Larry Hastings added the comment:
>
> What does the following script print out?
>
> import os
>
> os.chdir('/tmp')
> os.symlink('--success--', 'foo')
> print("this should print --success-- :")
> print(os.readlink('foo'))
> os.unlink('foo')

--8<---------------cut here---------------start------------->8---
this should print --success-- :
--success--
--8<---------------cut here---------------end--------------->8---

So, I guess I don't know what was causing the symptom I observed.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15531>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 5, 2012, 2:19 PM

Post #7 of 7 (93 views)
Permalink
[issue15531] os.path symlink docs missing [In reply to]

Larry Hastings added the comment:

Since everything is working fine, and the documentation arguably needs no update, I'm closing this.

----------
resolution: -> works for me
stage: -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15531>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.