From 4965ed12bdb197b1fbbef17a3e461665559d59af Mon Sep 17 00:00:00 2001
From: Oleksii Shevchuk
Date: Tue, 4 Apr 2017 14:43:54 +0300
Subject: [PATCH] Remove links to self
---
pupy/packages/all/pupyimporter.py | 3 ---
pupy/pp.py | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/pupy/packages/all/pupyimporter.py b/pupy/packages/all/pupyimporter.py
index 29cf7d5b..19d1ac87 100644
--- a/pupy/packages/all/pupyimporter.py
+++ b/pupy/packages/all/pupyimporter.py
@@ -235,7 +235,6 @@ class PupyPackageLoader:
mod = imp.new_module(fullname)
mod.__name__ = fullname
mod.__file__ = 'pupy://{}'.format(self.path)
- mod.__loader__ = self
if self.is_pkg:
mod.__path__ = [mod.__file__.rsplit('/',1)[0]]
mod.__package__ = fullname
@@ -249,7 +248,6 @@ class PupyPackageLoader:
mod = imp.new_module(fullname)
mod.__name__ = fullname
mod.__file__ = 'pupy://{}'.format(self.path)
- mod.__loader__ = self
if self.is_pkg:
mod.__path__ = [mod.__file__.rsplit('/',1)[0]]
mod.__package__ = fullname
@@ -267,7 +265,6 @@ class PupyPackageLoader:
if mod:
mod.__name__=fullname
mod.__file__ = 'pupy://{}'.format(self.path)
- mod.__loader__ = self
mod.__package__ = fullname.rsplit('.',1)[0]
sys.modules[fullname] = mod
diff --git a/pupy/pp.py b/pupy/pp.py
index a27a8fbb..a5581a93 100755
--- a/pupy/pp.py
+++ b/pupy/pp.py
@@ -82,7 +82,7 @@ except ImportError, e:
print 'Couldnt load pupy: {}'.format(e)
mod = imp.new_module("pupy")
mod.__name__ = "pupy"
- mod.__file__ = "\\\\pupy"
+ mod.__file__ = "pupy://pupy"
mod.__package__ = "pupy"
sys.modules["pupy"] = mod
mod.pseudo = True