@@ -3937,19 +3937,6 @@ _PyImport_LoadLazyImportTstate(PyThreadState *tstate, PyObject *lazy_import)
39373937 goto error ;
39383938 }
39393939
3940- Py_ssize_t dot = -1 ;
3941- int full = 0 ;
3942- if (lz -> lz_attr != NULL ) {
3943- full = 1 ;
3944- }
3945- if (!full ) {
3946- dot = PyUnicode_FindChar (lz -> lz_from , '.' , 0 ,
3947- PyUnicode_GET_LENGTH (lz -> lz_from ), 1 );
3948- }
3949- if (dot < 0 ) {
3950- full = 1 ;
3951- }
3952-
39533940 if (lz -> lz_attr != NULL ) {
39543941 if (PyUnicode_Check (lz -> lz_attr )) {
39553942 fromlist = PyTuple_New (1 );
@@ -3975,23 +3962,10 @@ _PyImport_LoadLazyImportTstate(PyThreadState *tstate, PyObject *lazy_import)
39753962 PyErr_SetString (PyExc_ImportError , "__import__ not found" );
39763963 goto error ;
39773964 }
3978- if (full ) {
3979- obj = _PyEval_ImportNameWithImport (
3980- tstate , import_func , globals , globals ,
3981- lz -> lz_from , fromlist , _PyLong_GetZero ()
3982- );
3983- }
3984- else {
3985- PyObject * name = PyUnicode_Substring (lz -> lz_from , 0 , dot );
3986- if (name == NULL ) {
3987- goto error ;
3988- }
3989- obj = _PyEval_ImportNameWithImport (
3990- tstate , import_func , globals , globals ,
3991- name , fromlist , _PyLong_GetZero ()
3992- );
3993- Py_DECREF (name );
3994- }
3965+ obj = _PyEval_ImportNameWithImport (
3966+ tstate , import_func , globals , globals ,
3967+ lz -> lz_from , fromlist , _PyLong_GetZero ()
3968+ );
39953969 if (obj == NULL ) {
39963970 goto error ;
39973971 }
0 commit comments