[issue415492] Compiler generates relative filenames

2022-04-10 Thread admin


Change by admin :


--
github: None -> 34308

___
Python tracker 

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



[issue415492] Compiler generates relative filenames

2012-06-24 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

So co_filename is absolute in Python 3.3, but __file__ on modules is not if a 
relative path is used from sys.path (as Nick pointed out). Changing this would 
possibly break code as this has been baked into the import system for quite 
some time. I think Nick as suggested making all paths absolute for __file__, 
but I can't remember where that discussion was held and why we never changed 
the semantics.

Regardless, __file__ being absolute is a different issue than co_filename, so 
I'm closing this at out of date.

--
resolution:  - out of date
status: open - closed

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



[issue415492] Compiler generates relative filenames

2012-06-19 Thread Ramchandra Apte

Ramchandra Apte maniandra...@gmail.com added the comment:

What is the status of this bug?
This is the oldest open bug.

--
nosy: +ramchandra.apte

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



[issue415492] Compiler generates relative filenames

2011-10-21 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

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



[issue415492] Compiler generates relative filenames

2011-10-17 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue415492] Compiler generates relative filenames

2011-10-16 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

It's fairly easy to check this is still a problem:

$ ./python
Python 3.3.0a0 (default:a06ef7ab7321, Sep 22 2011, 13:41:29) 
[GCC 4.6.0 20110603 (Red Hat 4.6.0-10)] on linux
Type help, copyright, credits or license for more information.
 import setup
 setup.__file__
'setup.py'

That's a relative path rather than an absolute one. If you edit sys.path to use 
'.' instead of '', it becomes clear that the import machinery is just doing a 
blind join of the sys.path entry with the relative location of the file:

 del sys.modules['setup']
 sys.path[0] = '.'
 import setup
 setup.__file__
'./setup.py'

--
nosy: +brett.cannon, ncoghlan
resolution: fixed - 
status: closed - open

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



[issue415492] Compiler generates relative filenames

2011-10-16 Thread Armin Ronacher

Armin Ronacher armin.ronac...@active-4.com added the comment:

The reason why this is a problem:

$ cat test.py
def foo():
pass


 import test, os, inspect
 os.chdir('/')
 inspect.getsource(test)
'def foo():\npass\n'

But

 import test, os, inspect
 os.chdir('/')
 inspect.getsource(test)
Traceback (most recent call last):
  File stdin, line 1, in module
IOError: source code not available

--
nosy: +aronacher

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



[issue415492] Compiler generates relative filenames

2011-10-16 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


--
nosy: +eric.snow

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



[issue415492] Compiler generates relative filenames

2011-10-16 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy:  -terry.reedy

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