/* Generated code for Python source for module 'urllib3.packages.ssl_match_hostname' * created by Nuitka version 0.6.0 * * This code is in part copyright 2018 Kay Hayen. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "nuitka/prelude.h" #include "__helpers.h" /* The _module_urllib3$packages$ssl_match_hostname is a Python object pointer of module type. */ /* Note: For full compatibility with CPython, every module variable access * needs to go through it except for cases where the module cannot possibly * have changed in the mean time. */ PyObject *module_urllib3$packages$ssl_match_hostname; PyDictObject *moduledict_urllib3$packages$ssl_match_hostname; /* The module constants used, if any. */ extern PyObject *const_str_plain_sys; extern PyObject *const_str_plain___all__; extern PyObject *const_str_plain_CertificateError; extern PyObject *const_int_pos_1; extern PyObject *const_str_plain___file__; static PyObject *const_list_str_digest_74c883b10bff008486190122ecdcd34d_list; extern PyObject *const_str_plain_ssl; extern PyObject *const_int_0; extern PyObject *const_tuple_int_pos_3_int_pos_5_tuple; extern PyObject *const_int_pos_3; static PyObject *const_str_digest_74c883b10bff008486190122ecdcd34d; extern PyObject *const_str_plain_version_info; extern PyObject *const_str_plain___path__; extern PyObject *const_tuple_empty; static PyObject *const_tuple_str_plain_CertificateError_str_plain_match_hostname_tuple; extern PyObject *const_int_pos_5; extern PyObject *const_str_plain_match_hostname; static PyObject *const_str_plain__implementation; static PyObject *const_str_digest_475b2ea1a571899388a5b2478e30509e; static PyObject *const_str_digest_271a1fe2e0d1766bf2ae185524322ff2; static PyObject *const_str_digest_5445f5c70d719d755f5eecf9a5301ba4; static PyObject *const_str_digest_1c7df957e33fd767688fba18d37a74da; extern PyObject *const_str_plain___doc__; extern PyObject *const_str_plain___cached__; static PyObject *const_str_digest_bfc280cca00a02c82fe5d444a2180a38; static PyObject *module_filename_obj; static bool constants_created = false; static void createModuleConstants( void ) { const_list_str_digest_74c883b10bff008486190122ecdcd34d_list = PyList_New( 1 ); const_str_digest_74c883b10bff008486190122ecdcd34d = UNSTREAM_STRING( &constant_bin[ 1493900 ], 68, 0 ); PyList_SET_ITEM( const_list_str_digest_74c883b10bff008486190122ecdcd34d_list, 0, const_str_digest_74c883b10bff008486190122ecdcd34d ); Py_INCREF( const_str_digest_74c883b10bff008486190122ecdcd34d ); const_tuple_str_plain_CertificateError_str_plain_match_hostname_tuple = PyTuple_New( 2 ); PyTuple_SET_ITEM( const_tuple_str_plain_CertificateError_str_plain_match_hostname_tuple, 0, const_str_plain_CertificateError ); Py_INCREF( const_str_plain_CertificateError ); PyTuple_SET_ITEM( const_tuple_str_plain_CertificateError_str_plain_match_hostname_tuple, 1, const_str_plain_match_hostname ); Py_INCREF( const_str_plain_match_hostname ); const_str_plain__implementation = UNSTREAM_STRING( &constant_bin[ 8368 ], 15, 1 ); const_str_digest_475b2ea1a571899388a5b2478e30509e = UNSTREAM_STRING( &constant_bin[ 1493968 ], 44, 0 ); const_str_digest_271a1fe2e0d1766bf2ae185524322ff2 = UNSTREAM_STRING( &constant_bin[ 1494012 ], 25, 0 ); const_str_digest_5445f5c70d719d755f5eecf9a5301ba4 = UNSTREAM_STRING( &constant_bin[ 1493976 ], 35, 0 ); const_str_digest_1c7df957e33fd767688fba18d37a74da = UNSTREAM_STRING( &constant_bin[ 1494037 ], 80, 0 ); const_str_digest_bfc280cca00a02c82fe5d444a2180a38 = UNSTREAM_STRING( &constant_bin[ 1494117 ], 28, 0 ); constants_created = true; } #ifndef __NUITKA_NO_ASSERT__ void checkModuleConstants_urllib3$packages$ssl_match_hostname( void ) { // The module may not have been used at all. if (constants_created == false) return; } #endif // The module code objects. static PyCodeObject *codeobj_b35193f8f9ddcca8aba1229d3a19a956; static void createModuleCodeObjects(void) { module_filename_obj = const_str_digest_1c7df957e33fd767688fba18d37a74da; codeobj_b35193f8f9ddcca8aba1229d3a19a956 = MAKE_CODEOBJ( module_filename_obj, const_str_digest_475b2ea1a571899388a5b2478e30509e, 1, const_tuple_empty, 0, 0, CO_NOFREE ); } // The module function declarations. // The module function definitions. #if PYTHON_VERSION >= 300 static struct PyModuleDef mdef_urllib3$packages$ssl_match_hostname = { PyModuleDef_HEAD_INIT, "urllib3.packages.ssl_match_hostname", /* m_name */ NULL, /* m_doc */ -1, /* m_size */ NULL, /* m_methods */ NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL, /* m_free */ }; #endif extern PyObject *const_str_plain___package__; #if PYTHON_VERSION >= 300 extern PyObject *const_str_dot; extern PyObject *const_str_plain___loader__; extern PyObject *metapath_based_loader; #endif #if PYTHON_VERSION >= 340 extern PyObject *const_str_plain___spec__; extern PyObject *const_str_plain__initializing; #endif extern void _initCompiledCellType(); extern void _initCompiledGeneratorType(); extern void _initCompiledFunctionType(); extern void _initCompiledMethodType(); extern void _initCompiledFrameType(); #if PYTHON_VERSION >= 350 extern void _initCompiledCoroutineTypes(); #endif #if PYTHON_VERSION >= 360 extern void _initCompiledAsyncgenTypes(); #endif // The exported interface to CPython. On import of the module, this function // gets called. It has to have an exact function name, in cases it's a shared // library export. This is hidden behind the MOD_INIT_DECL. MOD_INIT_DECL( urllib3$packages$ssl_match_hostname ) { #if defined(_NUITKA_EXE) || PYTHON_VERSION >= 300 static bool _init_done = false; // Modules might be imported repeatedly, which is to be ignored. if ( _init_done ) { return MOD_RETURN_VALUE( module_urllib3$packages$ssl_match_hostname ); } else { _init_done = true; } #endif #ifdef _NUITKA_MODULE // In case of a stand alone extension module, need to call initialization // the init here because that's the first and only time we are going to get // called here. // Initialize the constant values used. _initBuiltinModule(); createGlobalConstants(); /* Initialize the compiled types of Nuitka. */ _initCompiledCellType(); _initCompiledGeneratorType(); _initCompiledFunctionType(); _initCompiledMethodType(); _initCompiledFrameType(); #if PYTHON_VERSION >= 350 _initCompiledCoroutineTypes(); #endif #if PYTHON_VERSION >= 360 _initCompiledAsyncgenTypes(); #endif #if PYTHON_VERSION < 300 _initSlotCompare(); #endif #if PYTHON_VERSION >= 270 _initSlotIternext(); #endif patchBuiltinModule(); patchTypeComparison(); // Enable meta path based loader if not already done. #ifdef _NUITKA_TRACE puts("urllib3.packages.ssl_match_hostname: Calling setupMetaPathBasedLoader()."); #endif setupMetaPathBasedLoader(); #if PYTHON_VERSION >= 300 patchInspectModule(); #endif #endif /* The constants only used by this module are created now. */ #ifdef _NUITKA_TRACE puts("urllib3.packages.ssl_match_hostname: Calling createModuleConstants()."); #endif createModuleConstants(); /* The code objects used by this module are created now. */ #ifdef _NUITKA_TRACE puts("urllib3.packages.ssl_match_hostname: Calling createModuleCodeObjects()."); #endif createModuleCodeObjects(); // puts( "in initurllib3$packages$ssl_match_hostname" ); // Create the module object first. There are no methods initially, all are // added dynamically in actual code only. Also no "__doc__" is initially // set at this time, as it could not contain NUL characters this way, they // are instead set in early module code. No "self" for modules, we have no // use for it. #if PYTHON_VERSION < 300 module_urllib3$packages$ssl_match_hostname = Py_InitModule4( "urllib3.packages.ssl_match_hostname", // Module Name NULL, // No methods initially, all are added // dynamically in actual module code only. NULL, // No "__doc__" is initially set, as it could // not contain NUL this way, added early in // actual code. NULL, // No self for modules, we don't use it. PYTHON_API_VERSION ); #else module_urllib3$packages$ssl_match_hostname = PyModule_Create( &mdef_urllib3$packages$ssl_match_hostname ); #endif moduledict_urllib3$packages$ssl_match_hostname = MODULE_DICT( module_urllib3$packages$ssl_match_hostname ); // Update "__package__" value to what it ought to be. { #if 1 PyObject *module_name = GET_STRING_DICT_VALUE( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___name__ ); UPDATE_STRING_DICT1( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___package__, module_name ); #else #if PYTHON_VERSION < 300 PyObject *module_name = GET_STRING_DICT_VALUE( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___name__ ); char const *module_name_cstr = PyString_AS_STRING( module_name ); char const *last_dot = strrchr( module_name_cstr, '.' ); if ( last_dot != NULL ) { UPDATE_STRING_DICT1( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___package__, PyString_FromStringAndSize( module_name_cstr, last_dot - module_name_cstr ) ); } #else PyObject *module_name = GET_STRING_DICT_VALUE( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___name__ ); Py_ssize_t dot_index = PyUnicode_Find( module_name, const_str_dot, 0, PyUnicode_GetLength( module_name ), -1 ); if ( dot_index != -1 ) { UPDATE_STRING_DICT1( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___package__, PyUnicode_Substring( module_name, 0, dot_index ) ); } #endif #endif } CHECK_OBJECT( module_urllib3$packages$ssl_match_hostname ); // Seems to work for Python2.7 out of the box, but for Python3, the module // doesn't automatically enter "sys.modules", so do it manually. #if PYTHON_VERSION >= 300 { int r = PyObject_SetItem( PySys_GetObject( (char *)"modules" ), const_str_digest_5445f5c70d719d755f5eecf9a5301ba4, module_urllib3$packages$ssl_match_hostname ); assert( r != -1 ); } #endif // For deep importing of a module we need to have "__builtins__", so we set // it ourselves in the same way than CPython does. Note: This must be done // before the frame object is allocated, or else it may fail. if ( GET_STRING_DICT_VALUE( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___builtins__ ) == NULL ) { PyObject *value = (PyObject *)builtin_module; // Check if main module, not a dict then but the module itself. #if !defined(_NUITKA_EXE) || !0 value = PyModule_GetDict( value ); #endif UPDATE_STRING_DICT0( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___builtins__, value ); } #if PYTHON_VERSION >= 300 UPDATE_STRING_DICT0( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___loader__, metapath_based_loader ); #endif #if PYTHON_VERSION >= 340 #if 0 UPDATE_STRING_DICT0( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___spec__, Py_None ); #else { PyObject *bootstrap_module = PyImport_ImportModule("importlib._bootstrap"); CHECK_OBJECT( bootstrap_module ); PyObject *module_spec_class = PyObject_GetAttrString( bootstrap_module, "ModuleSpec" ); Py_DECREF( bootstrap_module ); PyObject *args[] = { GET_STRING_DICT_VALUE( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___name__ ), metapath_based_loader }; PyObject *spec_value = CALL_FUNCTION_WITH_ARGS2( module_spec_class, args ); SET_ATTRIBUTE( spec_value, const_str_plain__initializing, Py_True ); UPDATE_STRING_DICT1( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___spec__, spec_value ); Py_DECREF( module_spec_class ); } #endif #endif // Temp variables if any PyObject *tmp_import_from_1__module = NULL; PyObject *tmp_import_from_2__module = NULL; PyObject *tmp_import_from_3__module = NULL; struct Nuitka_FrameObject *frame_b35193f8f9ddcca8aba1229d3a19a956; NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; PyObject *exception_type = NULL; PyObject *exception_value = NULL; PyTracebackObject *exception_tb = NULL; NUITKA_MAY_BE_UNUSED int exception_lineno = 0; int tmp_res; PyObject *exception_keeper_type_1; PyObject *exception_keeper_value_1; PyTracebackObject *exception_keeper_tb_1; NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; PyObject *exception_keeper_type_2; PyObject *exception_keeper_value_2; PyTracebackObject *exception_keeper_tb_2; NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2; PyObject *exception_preserved_type_2; PyObject *exception_preserved_value_2; PyTracebackObject *exception_preserved_tb_2; PyObject *exception_keeper_type_3; PyObject *exception_keeper_value_3; PyTracebackObject *exception_keeper_tb_3; NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3; PyObject *exception_keeper_type_4; PyObject *exception_keeper_value_4; PyTracebackObject *exception_keeper_tb_4; NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4; PyObject *exception_preserved_type_1; PyObject *exception_preserved_value_1; PyTracebackObject *exception_preserved_tb_1; PyObject *exception_keeper_type_5; PyObject *exception_keeper_value_5; PyTracebackObject *exception_keeper_tb_5; NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_5; bool tmp_result; PyObject *exception_keeper_type_6; PyObject *exception_keeper_value_6; PyTracebackObject *exception_keeper_tb_6; NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_6; PyObject *exception_keeper_type_7; PyObject *exception_keeper_value_7; PyTracebackObject *exception_keeper_tb_7; NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_7; // Module code. { PyObject *tmp_assign_source_1; tmp_assign_source_1 = Py_None; UPDATE_STRING_DICT0( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___doc__, tmp_assign_source_1 ); } { PyObject *tmp_assign_source_2; tmp_assign_source_2 = const_str_digest_1c7df957e33fd767688fba18d37a74da; UPDATE_STRING_DICT0( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___file__, tmp_assign_source_2 ); } { PyObject *tmp_assign_source_3; tmp_assign_source_3 = LIST_COPY( const_list_str_digest_74c883b10bff008486190122ecdcd34d_list ); UPDATE_STRING_DICT1( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___path__, tmp_assign_source_3 ); } { PyObject *tmp_assign_source_4; tmp_assign_source_4 = Py_None; UPDATE_STRING_DICT0( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___cached__, tmp_assign_source_4 ); } { PyObject *tmp_assign_source_5; PyObject *tmp_name_name_1; PyObject *tmp_globals_name_1; PyObject *tmp_locals_name_1; PyObject *tmp_fromlist_name_1; PyObject *tmp_level_name_1; tmp_name_name_1 = const_str_plain_sys; tmp_globals_name_1 = (PyObject *)moduledict_urllib3$packages$ssl_match_hostname; tmp_locals_name_1 = Py_None; tmp_fromlist_name_1 = Py_None; tmp_level_name_1 = const_int_0; tmp_assign_source_5 = IMPORT_MODULE5( tmp_name_name_1, tmp_globals_name_1, tmp_locals_name_1, tmp_fromlist_name_1, tmp_level_name_1 ); assert( !(tmp_assign_source_5 == NULL) ); UPDATE_STRING_DICT1( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain_sys, tmp_assign_source_5 ); } // Frame without reuse. frame_b35193f8f9ddcca8aba1229d3a19a956 = MAKE_MODULE_FRAME( codeobj_b35193f8f9ddcca8aba1229d3a19a956, module_urllib3$packages$ssl_match_hostname ); // Push the new frame as the currently active one, and we should be exclusively // owning it. pushFrameStack( frame_b35193f8f9ddcca8aba1229d3a19a956 ); assert( Py_REFCNT( frame_b35193f8f9ddcca8aba1229d3a19a956 ) == 2 ); // Framed code: { // Tried code: { nuitka_bool tmp_condition_result_1; PyObject *tmp_compexpr_left_1; PyObject *tmp_compexpr_right_1; PyObject *tmp_source_name_1; PyObject *tmp_mvar_value_1; tmp_mvar_value_1 = GET_STRING_DICT_VALUE( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain_sys ); if (unlikely( tmp_mvar_value_1 == NULL )) { tmp_mvar_value_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_sys ); } CHECK_OBJECT( tmp_mvar_value_1 ); tmp_source_name_1 = tmp_mvar_value_1; tmp_compexpr_left_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain_version_info ); if ( tmp_compexpr_left_1 == NULL ) { assert( ERROR_OCCURRED() ); FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); exception_lineno = 6; goto try_except_handler_1; } tmp_compexpr_right_1 = const_tuple_int_pos_3_int_pos_5_tuple; tmp_res = RICH_COMPARE_BOOL_LT( tmp_compexpr_left_1, tmp_compexpr_right_1 ); Py_DECREF( tmp_compexpr_left_1 ); if ( tmp_res == -1 ) { assert( ERROR_OCCURRED() ); FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); exception_lineno = 6; goto try_except_handler_1; } tmp_condition_result_1 = ( tmp_res != 0 ) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; if ( tmp_condition_result_1 == NUITKA_BOOL_TRUE ) { goto branch_yes_1; } else { goto branch_no_1; } branch_yes_1:; { PyObject *tmp_raise_type_1; PyObject *tmp_make_exception_arg_1; tmp_make_exception_arg_1 = const_str_digest_271a1fe2e0d1766bf2ae185524322ff2; frame_b35193f8f9ddcca8aba1229d3a19a956->m_frame.f_lineno = 7; { PyObject *call_args[] = { tmp_make_exception_arg_1 }; tmp_raise_type_1 = CALL_FUNCTION_WITH_ARGS1( PyExc_ImportError, call_args ); } assert( !(tmp_raise_type_1 == NULL) ); exception_type = tmp_raise_type_1; exception_lineno = 7; RAISE_EXCEPTION_WITH_TYPE( &exception_type, &exception_value, &exception_tb ); goto try_except_handler_1; } branch_no_1:; } { PyObject *tmp_assign_source_6; PyObject *tmp_name_name_2; PyObject *tmp_globals_name_2; PyObject *tmp_locals_name_2; PyObject *tmp_fromlist_name_2; PyObject *tmp_level_name_2; tmp_name_name_2 = const_str_plain_ssl; tmp_globals_name_2 = (PyObject *)moduledict_urllib3$packages$ssl_match_hostname; tmp_locals_name_2 = Py_None; tmp_fromlist_name_2 = const_tuple_str_plain_CertificateError_str_plain_match_hostname_tuple; tmp_level_name_2 = const_int_0; frame_b35193f8f9ddcca8aba1229d3a19a956->m_frame.f_lineno = 9; tmp_assign_source_6 = IMPORT_MODULE5( tmp_name_name_2, tmp_globals_name_2, tmp_locals_name_2, tmp_fromlist_name_2, tmp_level_name_2 ); if ( tmp_assign_source_6 == NULL ) { assert( ERROR_OCCURRED() ); FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); exception_lineno = 9; goto try_except_handler_1; } assert( tmp_import_from_1__module == NULL ); tmp_import_from_1__module = tmp_assign_source_6; } { // Tried code: { PyObject *tmp_assign_source_7; PyObject *tmp_import_name_from_1; CHECK_OBJECT( tmp_import_from_1__module ); tmp_import_name_from_1 = tmp_import_from_1__module; tmp_assign_source_7 = IMPORT_NAME( tmp_import_name_from_1, const_str_plain_CertificateError ); if ( tmp_assign_source_7 == NULL ) { assert( ERROR_OCCURRED() ); FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); exception_lineno = 9; goto try_except_handler_2; } UPDATE_STRING_DICT1( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain_CertificateError, tmp_assign_source_7 ); } { PyObject *tmp_assign_source_8; PyObject *tmp_import_name_from_2; CHECK_OBJECT( tmp_import_from_1__module ); tmp_import_name_from_2 = tmp_import_from_1__module; tmp_assign_source_8 = IMPORT_NAME( tmp_import_name_from_2, const_str_plain_match_hostname ); if ( tmp_assign_source_8 == NULL ) { assert( ERROR_OCCURRED() ); FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); exception_lineno = 9; goto try_except_handler_2; } UPDATE_STRING_DICT1( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain_match_hostname, tmp_assign_source_8 ); } goto try_end_1; // Exception handler code: try_except_handler_2:; exception_keeper_type_1 = exception_type; exception_keeper_value_1 = exception_value; exception_keeper_tb_1 = exception_tb; exception_keeper_lineno_1 = exception_lineno; exception_type = NULL; exception_value = NULL; exception_tb = NULL; exception_lineno = 0; { CHECK_OBJECT( (PyObject *)tmp_import_from_1__module ); Py_DECREF( tmp_import_from_1__module ); tmp_import_from_1__module = NULL; } { // Re-raise. exception_type = exception_keeper_type_1; exception_value = exception_keeper_value_1; exception_tb = exception_keeper_tb_1; exception_lineno = exception_keeper_lineno_1; goto try_except_handler_1; } // End of try: try_end_1:; } { CHECK_OBJECT( (PyObject *)tmp_import_from_1__module ); Py_DECREF( tmp_import_from_1__module ); tmp_import_from_1__module = NULL; } goto try_end_2; // Exception handler code: try_except_handler_1:; exception_keeper_type_2 = exception_type; exception_keeper_value_2 = exception_value; exception_keeper_tb_2 = exception_tb; exception_keeper_lineno_2 = exception_lineno; exception_type = NULL; exception_value = NULL; exception_tb = NULL; exception_lineno = 0; { // Preserve existing published exception. exception_preserved_type_2 = EXC_TYPE(PyThreadState_GET()); Py_XINCREF( exception_preserved_type_2 ); exception_preserved_value_2 = EXC_VALUE(PyThreadState_GET()); Py_XINCREF( exception_preserved_value_2 ); exception_preserved_tb_2 = (PyTracebackObject *)EXC_TRACEBACK(PyThreadState_GET()); Py_XINCREF( exception_preserved_tb_2 ); } { if ( exception_keeper_tb_2 == NULL ) { exception_keeper_tb_2 = MAKE_TRACEBACK( frame_b35193f8f9ddcca8aba1229d3a19a956, exception_keeper_lineno_2 ); } else if ( exception_keeper_lineno_2 != 0 ) { exception_keeper_tb_2 = ADD_TRACEBACK( exception_keeper_tb_2, frame_b35193f8f9ddcca8aba1229d3a19a956, exception_keeper_lineno_2 ); } NORMALIZE_EXCEPTION( &exception_keeper_type_2, &exception_keeper_value_2, &exception_keeper_tb_2 ); PyException_SetTraceback( exception_keeper_value_2, (PyObject *)exception_keeper_tb_2 ); PUBLISH_EXCEPTION( &exception_keeper_type_2, &exception_keeper_value_2, &exception_keeper_tb_2 ); } { // Tried code: { nuitka_bool tmp_condition_result_2; PyObject *tmp_compexpr_left_2; PyObject *tmp_compexpr_right_2; tmp_compexpr_left_2 = EXC_TYPE(PyThreadState_GET()); tmp_compexpr_right_2 = PyExc_ImportError; tmp_res = EXCEPTION_MATCH_BOOL( tmp_compexpr_left_2, tmp_compexpr_right_2 ); if ( tmp_res == -1 ) { assert( ERROR_OCCURRED() ); FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); exception_lineno = 10; goto try_except_handler_3; } tmp_condition_result_2 = ( tmp_res != 0 ) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; if ( tmp_condition_result_2 == NUITKA_BOOL_TRUE ) { goto branch_yes_2; } else { goto branch_no_2; } branch_yes_2:; { // Tried code: { PyObject *tmp_assign_source_9; PyObject *tmp_name_name_3; PyObject *tmp_globals_name_3; PyObject *tmp_locals_name_3; PyObject *tmp_fromlist_name_3; PyObject *tmp_level_name_3; tmp_name_name_3 = const_str_digest_bfc280cca00a02c82fe5d444a2180a38; tmp_globals_name_3 = (PyObject *)moduledict_urllib3$packages$ssl_match_hostname; tmp_locals_name_3 = Py_None; tmp_fromlist_name_3 = const_tuple_str_plain_CertificateError_str_plain_match_hostname_tuple; tmp_level_name_3 = const_int_0; frame_b35193f8f9ddcca8aba1229d3a19a956->m_frame.f_lineno = 13; tmp_assign_source_9 = IMPORT_MODULE5( tmp_name_name_3, tmp_globals_name_3, tmp_locals_name_3, tmp_fromlist_name_3, tmp_level_name_3 ); if ( tmp_assign_source_9 == NULL ) { assert( ERROR_OCCURRED() ); FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); exception_lineno = 13; goto try_except_handler_4; } assert( tmp_import_from_2__module == NULL ); tmp_import_from_2__module = tmp_assign_source_9; } { // Tried code: { PyObject *tmp_assign_source_10; PyObject *tmp_import_name_from_3; CHECK_OBJECT( tmp_import_from_2__module ); tmp_import_name_from_3 = tmp_import_from_2__module; tmp_assign_source_10 = IMPORT_NAME( tmp_import_name_from_3, const_str_plain_CertificateError ); if ( tmp_assign_source_10 == NULL ) { assert( ERROR_OCCURRED() ); FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); exception_lineno = 13; goto try_except_handler_5; } UPDATE_STRING_DICT1( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain_CertificateError, tmp_assign_source_10 ); } { PyObject *tmp_assign_source_11; PyObject *tmp_import_name_from_4; CHECK_OBJECT( tmp_import_from_2__module ); tmp_import_name_from_4 = tmp_import_from_2__module; tmp_assign_source_11 = IMPORT_NAME( tmp_import_name_from_4, const_str_plain_match_hostname ); if ( tmp_assign_source_11 == NULL ) { assert( ERROR_OCCURRED() ); FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); exception_lineno = 13; goto try_except_handler_5; } UPDATE_STRING_DICT1( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain_match_hostname, tmp_assign_source_11 ); } goto try_end_3; // Exception handler code: try_except_handler_5:; exception_keeper_type_3 = exception_type; exception_keeper_value_3 = exception_value; exception_keeper_tb_3 = exception_tb; exception_keeper_lineno_3 = exception_lineno; exception_type = NULL; exception_value = NULL; exception_tb = NULL; exception_lineno = 0; { CHECK_OBJECT( (PyObject *)tmp_import_from_2__module ); Py_DECREF( tmp_import_from_2__module ); tmp_import_from_2__module = NULL; } { // Re-raise. exception_type = exception_keeper_type_3; exception_value = exception_keeper_value_3; exception_tb = exception_keeper_tb_3; exception_lineno = exception_keeper_lineno_3; goto try_except_handler_4; } // End of try: try_end_3:; } { CHECK_OBJECT( (PyObject *)tmp_import_from_2__module ); Py_DECREF( tmp_import_from_2__module ); tmp_import_from_2__module = NULL; } goto try_end_4; // Exception handler code: try_except_handler_4:; exception_keeper_type_4 = exception_type; exception_keeper_value_4 = exception_value; exception_keeper_tb_4 = exception_tb; exception_keeper_lineno_4 = exception_lineno; exception_type = NULL; exception_value = NULL; exception_tb = NULL; exception_lineno = 0; { // Preserve existing published exception. exception_preserved_type_1 = EXC_TYPE(PyThreadState_GET()); Py_XINCREF( exception_preserved_type_1 ); exception_preserved_value_1 = EXC_VALUE(PyThreadState_GET()); Py_XINCREF( exception_preserved_value_1 ); exception_preserved_tb_1 = (PyTracebackObject *)EXC_TRACEBACK(PyThreadState_GET()); Py_XINCREF( exception_preserved_tb_1 ); } { if ( exception_keeper_tb_4 == NULL ) { exception_keeper_tb_4 = MAKE_TRACEBACK( frame_b35193f8f9ddcca8aba1229d3a19a956, exception_keeper_lineno_4 ); } else if ( exception_keeper_lineno_4 != 0 ) { exception_keeper_tb_4 = ADD_TRACEBACK( exception_keeper_tb_4, frame_b35193f8f9ddcca8aba1229d3a19a956, exception_keeper_lineno_4 ); } NORMALIZE_EXCEPTION( &exception_keeper_type_4, &exception_keeper_value_4, &exception_keeper_tb_4 ); PyException_SetTraceback( exception_keeper_value_4, (PyObject *)exception_keeper_tb_4 ); PUBLISH_EXCEPTION( &exception_keeper_type_4, &exception_keeper_value_4, &exception_keeper_tb_4 ); } { // Tried code: { nuitka_bool tmp_condition_result_3; PyObject *tmp_compexpr_left_3; PyObject *tmp_compexpr_right_3; tmp_compexpr_left_3 = EXC_TYPE(PyThreadState_GET()); tmp_compexpr_right_3 = PyExc_ImportError; tmp_res = EXCEPTION_MATCH_BOOL( tmp_compexpr_left_3, tmp_compexpr_right_3 ); if ( tmp_res == -1 ) { assert( ERROR_OCCURRED() ); FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); exception_lineno = 14; goto try_except_handler_6; } tmp_condition_result_3 = ( tmp_res != 0 ) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; if ( tmp_condition_result_3 == NUITKA_BOOL_TRUE ) { goto branch_yes_3; } else { goto branch_no_3; } branch_yes_3:; { PyObject *tmp_assign_source_12; PyObject *tmp_name_name_4; PyObject *tmp_globals_name_4; PyObject *tmp_locals_name_4; PyObject *tmp_fromlist_name_4; PyObject *tmp_level_name_4; tmp_name_name_4 = const_str_plain__implementation; tmp_globals_name_4 = (PyObject *)moduledict_urllib3$packages$ssl_match_hostname; tmp_locals_name_4 = Py_None; tmp_fromlist_name_4 = const_tuple_str_plain_CertificateError_str_plain_match_hostname_tuple; tmp_level_name_4 = const_int_pos_1; frame_b35193f8f9ddcca8aba1229d3a19a956->m_frame.f_lineno = 16; tmp_assign_source_12 = IMPORT_MODULE5( tmp_name_name_4, tmp_globals_name_4, tmp_locals_name_4, tmp_fromlist_name_4, tmp_level_name_4 ); if ( tmp_assign_source_12 == NULL ) { assert( ERROR_OCCURRED() ); FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); exception_lineno = 16; goto try_except_handler_6; } assert( tmp_import_from_3__module == NULL ); tmp_import_from_3__module = tmp_assign_source_12; } { // Tried code: { PyObject *tmp_assign_source_13; PyObject *tmp_import_name_from_5; CHECK_OBJECT( tmp_import_from_3__module ); tmp_import_name_from_5 = tmp_import_from_3__module; if ( PyModule_Check( tmp_import_name_from_5 ) ) { tmp_assign_source_13 = IMPORT_NAME_OR_MODULE( tmp_import_name_from_5, (PyObject *)MODULE_DICT(tmp_import_name_from_5), const_str_plain_CertificateError, const_int_pos_1 ); } else { tmp_assign_source_13 = IMPORT_NAME( tmp_import_name_from_5, const_str_plain_CertificateError ); } if ( tmp_assign_source_13 == NULL ) { assert( ERROR_OCCURRED() ); FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); exception_lineno = 16; goto try_except_handler_7; } UPDATE_STRING_DICT1( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain_CertificateError, tmp_assign_source_13 ); } { PyObject *tmp_assign_source_14; PyObject *tmp_import_name_from_6; CHECK_OBJECT( tmp_import_from_3__module ); tmp_import_name_from_6 = tmp_import_from_3__module; if ( PyModule_Check( tmp_import_name_from_6 ) ) { tmp_assign_source_14 = IMPORT_NAME_OR_MODULE( tmp_import_name_from_6, (PyObject *)MODULE_DICT(tmp_import_name_from_6), const_str_plain_match_hostname, const_int_pos_1 ); } else { tmp_assign_source_14 = IMPORT_NAME( tmp_import_name_from_6, const_str_plain_match_hostname ); } if ( tmp_assign_source_14 == NULL ) { assert( ERROR_OCCURRED() ); FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb ); exception_lineno = 16; goto try_except_handler_7; } UPDATE_STRING_DICT1( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain_match_hostname, tmp_assign_source_14 ); } goto try_end_5; // Exception handler code: try_except_handler_7:; exception_keeper_type_5 = exception_type; exception_keeper_value_5 = exception_value; exception_keeper_tb_5 = exception_tb; exception_keeper_lineno_5 = exception_lineno; exception_type = NULL; exception_value = NULL; exception_tb = NULL; exception_lineno = 0; { CHECK_OBJECT( (PyObject *)tmp_import_from_3__module ); Py_DECREF( tmp_import_from_3__module ); tmp_import_from_3__module = NULL; } { // Re-raise. exception_type = exception_keeper_type_5; exception_value = exception_keeper_value_5; exception_tb = exception_keeper_tb_5; exception_lineno = exception_keeper_lineno_5; goto try_except_handler_6; } // End of try: try_end_5:; } { CHECK_OBJECT( (PyObject *)tmp_import_from_3__module ); Py_DECREF( tmp_import_from_3__module ); tmp_import_from_3__module = NULL; } goto branch_end_3; branch_no_3:; { tmp_result = RERAISE_EXCEPTION( &exception_type, &exception_value, &exception_tb ); if (unlikely( tmp_result == false )) { exception_lineno = 11; } if (exception_tb && exception_tb->tb_frame == &frame_b35193f8f9ddcca8aba1229d3a19a956->m_frame) frame_b35193f8f9ddcca8aba1229d3a19a956->m_frame.f_lineno = exception_tb->tb_lineno; goto try_except_handler_6; } branch_end_3:; } goto try_end_6; // Exception handler code: try_except_handler_6:; exception_keeper_type_6 = exception_type; exception_keeper_value_6 = exception_value; exception_keeper_tb_6 = exception_tb; exception_keeper_lineno_6 = exception_lineno; exception_type = NULL; exception_value = NULL; exception_tb = NULL; exception_lineno = 0; { // Restore previous exception. SET_CURRENT_EXCEPTION( exception_preserved_type_1, exception_preserved_value_1, exception_preserved_tb_1 ); } { // Re-raise. exception_type = exception_keeper_type_6; exception_value = exception_keeper_value_6; exception_tb = exception_keeper_tb_6; exception_lineno = exception_keeper_lineno_6; goto try_except_handler_3; } // End of try: try_end_6:; } { // Restore previous exception. SET_CURRENT_EXCEPTION( exception_preserved_type_1, exception_preserved_value_1, exception_preserved_tb_1 ); } goto try_end_4; // exception handler codes exits in all cases NUITKA_CANNOT_GET_HERE( urllib3$packages$ssl_match_hostname ); return MOD_RETURN_VALUE( NULL ); // End of try: try_end_4:; } goto branch_end_2; branch_no_2:; { tmp_result = RERAISE_EXCEPTION( &exception_type, &exception_value, &exception_tb ); if (unlikely( tmp_result == false )) { exception_lineno = 3; } if (exception_tb && exception_tb->tb_frame == &frame_b35193f8f9ddcca8aba1229d3a19a956->m_frame) frame_b35193f8f9ddcca8aba1229d3a19a956->m_frame.f_lineno = exception_tb->tb_lineno; goto try_except_handler_3; } branch_end_2:; } goto try_end_7; // Exception handler code: try_except_handler_3:; exception_keeper_type_7 = exception_type; exception_keeper_value_7 = exception_value; exception_keeper_tb_7 = exception_tb; exception_keeper_lineno_7 = exception_lineno; exception_type = NULL; exception_value = NULL; exception_tb = NULL; exception_lineno = 0; { // Restore previous exception. SET_CURRENT_EXCEPTION( exception_preserved_type_2, exception_preserved_value_2, exception_preserved_tb_2 ); } { // Re-raise. exception_type = exception_keeper_type_7; exception_value = exception_keeper_value_7; exception_tb = exception_keeper_tb_7; exception_lineno = exception_keeper_lineno_7; goto frame_exception_exit_1; } // End of try: try_end_7:; } { // Restore previous exception. SET_CURRENT_EXCEPTION( exception_preserved_type_2, exception_preserved_value_2, exception_preserved_tb_2 ); } goto try_end_2; // exception handler codes exits in all cases NUITKA_CANNOT_GET_HERE( urllib3$packages$ssl_match_hostname ); return MOD_RETURN_VALUE( NULL ); // End of try: try_end_2:; } // Restore frame exception if necessary. #if 0 RESTORE_FRAME_EXCEPTION( frame_b35193f8f9ddcca8aba1229d3a19a956 ); #endif popFrameStack(); assertFrameObject( frame_b35193f8f9ddcca8aba1229d3a19a956 ); goto frame_no_exception_1; frame_exception_exit_1:; #if 0 RESTORE_FRAME_EXCEPTION( frame_b35193f8f9ddcca8aba1229d3a19a956 ); #endif if ( exception_tb == NULL ) { exception_tb = MAKE_TRACEBACK( frame_b35193f8f9ddcca8aba1229d3a19a956, exception_lineno ); } else if ( exception_tb->tb_frame != &frame_b35193f8f9ddcca8aba1229d3a19a956->m_frame ) { exception_tb = ADD_TRACEBACK( exception_tb, frame_b35193f8f9ddcca8aba1229d3a19a956, exception_lineno ); } // Put the previous frame back on top. popFrameStack(); // Return the error. goto module_exception_exit; frame_no_exception_1:; { PyObject *tmp_assign_source_15; tmp_assign_source_15 = const_tuple_str_plain_CertificateError_str_plain_match_hostname_tuple; UPDATE_STRING_DICT0( moduledict_urllib3$packages$ssl_match_hostname, (Nuitka_StringObject *)const_str_plain___all__, tmp_assign_source_15 ); } return MOD_RETURN_VALUE( module_urllib3$packages$ssl_match_hostname ); module_exception_exit: RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb ); return MOD_RETURN_VALUE( NULL ); }