Re: [Python-Dev] cpython: Issue #15168: Move importlb.test to test.test_importlib.
On Fri, 20 Jul 2012 20:49:03 +0200 (CEST)
brett.cannon
diff --git a/Lib/importlib/test/__init__.py b/Lib/test/test_importlib/__init__.py rename from Lib/importlib/test/__init__.py rename to Lib/test/test_importlib/__init__.py --- a/Lib/importlib/test/__init__.py +++ b/Lib/test/test_importlib/__init__.py @@ -1,5 +1,6 @@ import os import sys +from .. import support
I don't know if I'm only speaking for myself, but I really have trouble parsing non-trivial relative imports, and I personally prefer when people use absolute imports (e.g. "from test import support"). cheers Antoine. -- Software development and contracting: http://pro.pitrou.net
On Fri, 20 Jul 2012 22:12:26 +0200, Antoine Pitrou
On Fri, 20 Jul 2012 20:49:03 +0200 (CEST) brett.cannon
wrote: diff --git a/Lib/importlib/test/__init__.py b/Lib/test/test_importlib/__init__.py rename from Lib/importlib/test/__init__.py rename to Lib/test/test_importlib/__init__.py --- a/Lib/importlib/test/__init__.py +++ b/Lib/test/test_importlib/__init__.py @@ -1,5 +1,6 @@ import os import sys +from .. import support
I don't know if I'm only speaking for myself, but I really have trouble parsing non-trivial relative imports, and I personally prefer when people use absolute imports (e.g. "from test import support").
Agreed. I don't see that there is any reason to use relative imports in the stdlib. --David
+1
On Fri, Jul 20, 2012 at 11:25 PM, R. David Murray
On Fri, 20 Jul 2012 22:12:26 +0200, Antoine Pitrou
wrote: On Fri, 20 Jul 2012 20:49:03 +0200 (CEST) brett.cannon
wrote: diff --git a/Lib/importlib/test/__init__.py b/Lib/test/test_importlib/__init__.py rename from Lib/importlib/test/__init__.py rename to Lib/test/test_importlib/__init__.py --- a/Lib/importlib/test/__init__.py +++ b/Lib/test/test_importlib/__init__.py @@ -1,5 +1,6 @@ import os import sys +from .. import support
I don't know if I'm only speaking for myself, but I really have trouble parsing non-trivial relative imports, and I personally prefer when people use absolute imports (e.g. "from test import support").
Agreed. I don't see that there is any reason to use relative imports in the stdlib.
--David _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/andrew.svetlov%40gmail.com
-- Thanks, Andrew Svetlov
On Fri, Jul 20, 2012 at 4:12 PM, Antoine Pitrou
On Fri, 20 Jul 2012 20:49:03 +0200 (CEST) brett.cannon
wrote: diff --git a/Lib/importlib/test/__init__.py b/Lib/test/test_importlib/__init__.py rename from Lib/importlib/test/__init__.py rename to Lib/test/test_importlib/__init__.py --- a/Lib/importlib/test/__init__.py +++ b/Lib/test/test_importlib/__init__.py @@ -1,5 +1,6 @@ import os import sys +from .. import support
I don't know if I'm only speaking for myself, but I really have trouble parsing non-trivial relative imports,
I obviously don't, but then again I would hope I of all people could comprehend them after all this time. =)
and I personally prefer when people use absolute imports (e.g. "from test import support").
So I changed the import above, but I'm not going to go through and change every other relative import that stays within test.test_importlib. I'm fine if someone else wants to change them, but I leave that as an exercise for the reader. -Brett
cheers
Antoine.
-- Software development and contracting: http://pro.pitrou.net
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/brett%40python.org
participants (4)
-
Andrew Svetlov
-
Antoine Pitrou
-
Brett Cannon
-
R. David Murray