[Python-checkins] cpython: Remove now useless arbitrary limit of module name length

victor.stinner python-checkins at python.org
Thu Jan 26 00:36:17 CET 2012


http://hg.python.org/cpython/rev/e12b8d3a3d03
changeset:   74627:e12b8d3a3d03
parent:      74624:e68ddfc193d5
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Thu Jan 26 00:31:49 2012 +0100
summary:
  Remove now useless arbitrary limit of module name length

files:
  Python/import.c |  6 ------
  1 files changed, 0 insertions(+), 6 deletions(-)


diff --git a/Python/import.c b/Python/import.c
--- a/Python/import.c
+++ b/Python/import.c
@@ -2052,12 +2052,6 @@
     if (p_loader != NULL)
         *p_loader = NULL;
 
-    if (PyUnicode_GET_LENGTH(name) > MAXPATHLEN) {
-        PyErr_SetString(PyExc_OverflowError,
-                        "module name is too long");
-        return NULL;
-    }
-
     /* sys.meta_path import hook */
     if (p_loader != NULL) {
         _Py_IDENTIFIER(find_module);

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list