mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Co-authored-by: Alexander Firbas <alexander.firbas@gmail.com>
This commit is contained in:
parent
df1f215f92
commit
cee33bbd7e
2 changed files with 24 additions and 1 deletions
23
news/fix-__file__-attribute.rst
Normal file
23
news/fix-__file__-attribute.rst
Normal file
|
@ -0,0 +1,23 @@
|
|||
**Added:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Changed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Deprecated:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Removed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* If a .xsh file is imported, the resulting module will now always have an absolute \_\_file\_\_ attribute to be consistent with pythons behavior since python 3.4.
|
||||
|
||||
**Security:**
|
||||
|
||||
* <news item>
|
|
@ -75,7 +75,7 @@ class XonshImportHook(MetaPathFinder, SourceLoader):
|
|||
if fname not in {x.name for x in os.scandir(p)}:
|
||||
continue
|
||||
spec = ModuleSpec(fullname, self)
|
||||
self._filenames[fullname] = os.path.join(p, fname)
|
||||
self._filenames[fullname] = os.path.abspath(os.path.join(p, fname))
|
||||
break
|
||||
return spec
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue