Martin von Löwis  committed bbeba12

Rename find_partial_package to find_package_portion.

  • Participants
  • Parent commits 275796a
  • Branches pep-382

Comments (0)

Files changed (2)

File Modules/zipimport.c

    (.pyp directory). Return the directory's path name if yes,
    else None. */
 static PyObject *
-zipimporter_find_partial_package(PyObject *obj, PyObject *args)
+zipimporter_find_package_portion(PyObject *obj, PyObject *args)
     ZipImporter *self = (ZipImporter *)obj;
     PyObject *result, *subname;
     PyObject *fullname;
     enum zi_module_info mi;
-    if (!PyArg_ParseTuple(args, "U:zipimporter.find_partial_package",
+    if (!PyArg_ParseTuple(args, "U:zipimporter.find_package_portion",
         return NULL;
     if (PyUnicode_READY(fullname) == -1)
 The optional 'path' argument is ignored -- it's there for compatibility\n\
 with the importer protocol.");
-"find_partial_package(fullname) -> path or None.\n\
+"find_package_portion(fullname) -> path or None.\n\
 Search for a partial package specified by 'fullname'.\n\
 If a portion of the package exists, return an entry\n\
 static PyMethodDef zipimporter_methods[] = {
     {"find_module", zipimporter_find_module, METH_VARARGS,
-    {"find_partial_package", zipimporter_find_partial_package,
-     METH_VARARGS, doc_find_partial_package},
+    {"find_package_portion", zipimporter_find_package_portion,
+     METH_VARARGS, doc_find_package_portion},
     {"load_module", zipimporter_load_module, METH_VARARGS,
     {"get_data", zipimporter_get_data, METH_VARARGS,

File Python/import.c

                  PyObject **p_path, PyObject **p_loader, struct filedescr **p_fd,
                  PyObject **p_pyp)
-    _Py_IDENTIFIER(find_partial_package);
+    _Py_IDENTIFIER(find_package_portion);
     PyObject *path_unicode, *filename = NULL, *pypname;
     Py_ssize_t len, pos;
     struct stat statbuf;
             /* If p_pyp is not NULL, we look for partial packages. */
             if (importer != Py_None && p_pyp != NULL) {
-                pypname = _PyObject_CallMethodId(importer, &PyId_find_partial_package,
+                pypname = _PyObject_CallMethodId(importer, &PyId_find_package_portion,
                                                  "O", fullname);
                 if (pypname == NULL) {
                     if (PyErr_ExceptionMatches(PyExc_AttributeError))