@@ -3940,19 +3940,6 @@ _PyImport_LoadLazyImportTstate(PyThreadState *tstate, PyObject *lazy_import)
39403940 goto error ;
39413941 }
39423942
3943- Py_ssize_t dot = -1 ;
3944- int full = 0 ;
3945- if (lz -> lz_attr != NULL ) {
3946- full = 1 ;
3947- }
3948- if (!full ) {
3949- dot = PyUnicode_FindChar (lz -> lz_from , '.' , 0 ,
3950- PyUnicode_GET_LENGTH (lz -> lz_from ), 1 );
3951- }
3952- if (dot < 0 ) {
3953- full = 1 ;
3954- }
3955-
39563943 if (lz -> lz_attr != NULL ) {
39573944 if (PyUnicode_Check (lz -> lz_attr )) {
39583945 fromlist = PyTuple_New (1 );
@@ -3978,23 +3965,10 @@ _PyImport_LoadLazyImportTstate(PyThreadState *tstate, PyObject *lazy_import)
39783965 PyErr_SetString (PyExc_ImportError , "__import__ not found" );
39793966 goto error ;
39803967 }
3981- if (full ) {
3982- obj = _PyEval_ImportNameWithImport (
3983- tstate , import_func , globals , globals ,
3984- lz -> lz_from , fromlist , _PyLong_GetZero ()
3985- );
3986- }
3987- else {
3988- PyObject * name = PyUnicode_Substring (lz -> lz_from , 0 , dot );
3989- if (name == NULL ) {
3990- goto error ;
3991- }
3992- obj = _PyEval_ImportNameWithImport (
3993- tstate , import_func , globals , globals ,
3994- name , fromlist , _PyLong_GetZero ()
3995- );
3996- Py_DECREF (name );
3997- }
3968+ obj = _PyEval_ImportNameWithImport (
3969+ tstate , import_func , globals , globals ,
3970+ lz -> lz_from , fromlist , _PyLong_GetZero ()
3971+ );
39983972 if (obj == NULL ) {
39993973 goto error ;
40003974 }
0 commit comments