[issue12317] inspect.getabsfile() is not documented

2019-02-14 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
nosy:  -giampaolo.rodola

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2019-02-14 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2019-02-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Given the absence of agreement among core-devs, a PR is a bit premature.  

Looking again at the existing docstring, I think it must be revised before 
copying and *not* copied as is.

0. The existing first sentence mislead me.  The 'source or compiled file' must 
be a Python source or compiled Python (.pyc) file.  An object in a compiled C 
file gives a TypeError.  Change 'an object' to 'a Python-coded object'.

1. The 'object' argument cannot be just any Python-coded object (class object 
instance).  Based on the exception message, add this second sentence: "The 
object must be a module, class, method, function, traceback, frame, or code 
object."  Otherwise, TypeError.

2. The second paragraph is garbled.  All objects in a module have a common 
origin, not a unique origin.  I think the idea is that the name for the origin 
should be a standardized full path.  I think that this paragraph adds so little 
that it should be deleted rather than revised.

What paused this issue was Brett's opinion that getabsfile is untrustworthy 
and, with __file__ absolute, 'pointless', to a degree that it should not be 
documented. (If that were true, it should be deprecated.)

I read the 3.7.2 source for getabsfile, getsourcefile, and getfile. The 
returned name is based on either module.__file__ or code.co_filename. I think 
the function should be kept and documented.

1. Assuming that both __file__ and co_filename are now normcased and normalized 
absolute paths, (and identical for functions,) then 
"os.path.normcase(os.path.abspath(_filename))" is a no-op returning _filename 
as is, and should be dropped.  There is no longer a "guess at what the cwd was 
when a module was imported" in getabsfile itself.

2. getfile and getsourcefile do non-trivial switching and name processing that 
users would not get right if getabsfile were not present.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2019-02-10 Thread Dong-hee Na


Dong-hee Na  added the comment:

@terry.reedy
I submited the PR 11786 for this issue.
If you are okay can you take a look please?
Thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2019-02-07 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

3.6 is also on security-fix-only status

--
versions:  -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2019-02-07 Thread Dong-hee Na


Change by Dong-hee Na :


--
keywords: +patch, patch, patch
pull_requests: +11776, 11777, 11778
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2019-02-07 Thread Dong-hee Na


Change by Dong-hee Na :


--
keywords: +patch, patch
pull_requests: +11776, 11777
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2019-02-07 Thread Dong-hee Na


Change by Dong-hee Na :


--
keywords: +patch
pull_requests: +11776
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2019-02-07 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi @corona10, Antoine's message is from 2013 and inspect.getabsfile() is still 
not documented, I think it's safe to say he's not working on it.

You can work on the issue and open a new PR on GitHub when you think it is 
ready for review :)

--
nosy: +remi.lapeyre
versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2019-02-07 Thread Dong-hee Na


Dong-hee Na  added the comment:

@pitrou
Hi, Can I work on this issue?

--
nosy: +corona10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2014-06-14 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
assignee: giampaolo.rodola - 

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12317
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2013-09-08 Thread Akira Kitada

Changes by Akira Kitada akit...@gmail.com:


--
nosy: +akitada

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12317
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2013-09-08 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +brett.cannon
versions: +Python 3.4 -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12317
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2013-09-08 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
dependencies: +Move to absolute file paths for module.__file__

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12317
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2013-09-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This shouldn't be a dependency. The function is already implemented, it just 
needs to be documented.

--
dependencies:  -Move to absolute file paths for module.__file__
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12317
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2013-09-08 Thread Brett Cannon

Brett Cannon added the comment:

It technically doesn't need to be a dependency, but if __file__ goes absolute 
then the point of the function becomes moot and thus shouldn't get documented 
as it is then pointless (and honestly I don't trust any code that tries to 
guess at what the cwd was when a module was imported).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12317
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2012-10-25 Thread Hieu Nguyen

Changes by Hieu Nguyen ndhie...@gmail.com:


--
nosy: +hieu.nguyen

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12317
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2011-06-17 Thread Terry J. Reedy

New submission from Terry J. Reedy tjre...@udel.edu:

 help(inspect.getabsfile) could be copied

getabsfile(object, _filename=None)
Return an absolute path to the source or compiled file for an object.

The idea is for each object to have a unique origin, so this routine
normalizes the result as much as possible.

--
components: +Documentation
nosy: +terry.reedy
stage:  - needs patch
versions:  -Python 2.6, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12317
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12317] inspect.getabsfile() is not documented

2011-06-11 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
assignee: giampaolo.rodola
nosy: giampaolo.rodola
priority: normal
severity: normal
status: open
title: inspect.getabsfile() is not documented
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12317
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com