Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
1df0b35e
Kaydet (Commit)
1df0b35e
authored
Agu 25, 2015
tarafından
Larry Hastings
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #24769: Interpreter now starts properly when dynamic loading
is disabled. Patch by Petr Viktorin.
üst
7250d02b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
26 deletions
+80
-26
_bootstrap.py
Lib/importlib/_bootstrap.py
+1
-1
NEWS
Misc/NEWS
+4
-0
import.c.h
Python/clinic/import.c.h
+28
-1
import.c
Python/import.c
+46
-23
importlib.h
Python/importlib.h
+1
-1
No files found.
Lib/importlib/_bootstrap.py
Dosyayı görüntüle @
1df0b35e
...
...
@@ -745,7 +745,7 @@ class BuiltinImporter:
@classmethod
def
exec_module
(
self
,
module
):
"""Exec a built-in module"""
_call_with_frames_removed
(
_imp
.
exec_
dynamic
,
module
)
_call_with_frames_removed
(
_imp
.
exec_
builtin
,
module
)
@classmethod
@_requires_builtin
...
...
Misc/NEWS
Dosyayı görüntüle @
1df0b35e
...
...
@@ -10,6 +10,9 @@ Release date: 2015-08-23
Core and Builtins
-----------------
- Issue #24769: Interpreter now starts properly when dynamic loading
is disabled. Patch by Petr Viktorin.
- Issue #21167: NAN operations are now handled correctly when python is
compiled with ICC even if -fp-model strict is not specified.
...
...
@@ -20,6 +23,7 @@ Library
- Issue #24839: platform._syscmd_ver raises DeprecationWarning
What'
s
New
in
Python
3.5.0
release
candidate
1
?
===============================================
...
...
Python/clinic/import.c.h
Dosyayı görüntüle @
1df0b35e
...
...
@@ -318,6 +318,33 @@ exit:
#endif
/* defined(HAVE_DYNAMIC_LOADING) */
PyDoc_STRVAR
(
_imp_exec_builtin__doc__
,
"exec_builtin($module, mod, /)
\n
"
"--
\n
"
"
\n
"
"Initialize an extension module."
);
#define _IMP_EXEC_BUILTIN_METHODDEF \
{"exec_builtin", (PyCFunction)_imp_exec_builtin, METH_O, _imp_exec_builtin__doc__},
static
int
_imp_exec_builtin_impl
(
PyModuleDef
*
module
,
PyObject
*
mod
);
static
PyObject
*
_imp_exec_builtin
(
PyModuleDef
*
module
,
PyObject
*
mod
)
{
PyObject
*
return_value
=
NULL
;
int
_return_value
;
_return_value
=
_imp_exec_builtin_impl
(
module
,
mod
);
if
((
_return_value
==
-
1
)
&&
PyErr_Occurred
())
goto
exit
;
return_value
=
PyLong_FromLong
((
long
)
_return_value
);
exit:
return
return_value
;
}
#ifndef _IMP_CREATE_DYNAMIC_METHODDEF
#define _IMP_CREATE_DYNAMIC_METHODDEF
#endif
/* !defined(_IMP_CREATE_DYNAMIC_METHODDEF) */
...
...
@@ -325,4 +352,4 @@ exit:
#ifndef _IMP_EXEC_DYNAMIC_METHODDEF
#define _IMP_EXEC_DYNAMIC_METHODDEF
#endif
/* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */
/*[clinic end generated code: output=
0f1059766dd58f88
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
c38749cebcadbc3b
input=a9049054013a1b77]*/
Python/import.c
Dosyayı görüntüle @
1df0b35e
...
...
@@ -1943,6 +1943,34 @@ _imp_is_frozen_impl(PyModuleDef *module, PyObject *name)
return
PyBool_FromLong
((
long
)
(
p
==
NULL
?
0
:
p
->
size
));
}
/* Common implementation for _imp.exec_dynamic and _imp.exec_builtin */
static
int
exec_builtin_or_dynamic
(
PyObject
*
mod
)
{
PyModuleDef
*
def
;
void
*
state
;
if
(
!
PyModule_Check
(
mod
))
{
return
0
;
}
def
=
PyModule_GetDef
(
mod
);
if
(
def
==
NULL
)
{
if
(
PyErr_Occurred
())
{
return
-
1
;
}
return
0
;
}
state
=
PyModule_GetState
(
mod
);
if
(
PyErr_Occurred
())
{
return
-
1
;
}
if
(
state
)
{
/* Already initialized; skip reload */
return
0
;
}
return
PyModule_ExecDef
(
mod
,
def
);
}
#ifdef HAVE_DYNAMIC_LOADING
/*[clinic input]
...
...
@@ -2014,34 +2042,28 @@ static int
_imp_exec_dynamic_impl
(
PyModuleDef
*
module
,
PyObject
*
mod
)
/*[clinic end generated code: output=4b84f1301b22d4bd input=9fdbfcb250280d3a]*/
{
PyModuleDef
*
def
;
void
*
state
;
if
(
!
PyModule_Check
(
mod
))
{
return
0
;
}
def
=
PyModule_GetDef
(
mod
);
if
(
def
==
NULL
)
{
if
(
PyErr_Occurred
())
{
return
-
1
;
}
return
0
;
}
state
=
PyModule_GetState
(
mod
);
if
(
PyErr_Occurred
())
{
return
-
1
;
}
if
(
state
)
{
/* Already initialized; skip reload */
return
0
;
}
return
PyModule_ExecDef
(
mod
,
def
);
return
exec_builtin_or_dynamic
(
mod
);
}
#endif
/* HAVE_DYNAMIC_LOADING */
/*[clinic input]
_imp.exec_builtin -> int
mod: object
/
Initialize a built-in module.
[clinic start generated code]*/
static
int
_imp_exec_builtin_impl
(
PyModuleDef
*
module
,
PyObject
*
mod
)
/*[clinic end generated code: output=215e99876a27e284 input=77ebec0c2a10ecca]*/
{
return
exec_builtin_or_dynamic
(
mod
);
}
/*[clinic input]
dump buffer
[clinic start generated code]*/
...
...
@@ -2064,6 +2086,7 @@ static PyMethodDef imp_methods[] = {
_IMP_IS_FROZEN_METHODDEF
_IMP_CREATE_DYNAMIC_METHODDEF
_IMP_EXEC_DYNAMIC_METHODDEF
_IMP_EXEC_BUILTIN_METHODDEF
_IMP__FIX_CO_FILENAME_METHODDEF
{
NULL
,
NULL
}
/* sentinel */
};
...
...
Python/importlib.h
Dosyayı görüntüle @
1df0b35e
...
...
@@ -1304,7 +1304,7 @@ const unsigned char _Py_M__importlib[] = {
0
,
1
,
100
,
1
,
0
,
83
,
41
,
2
,
122
,
22
,
69
,
120
,
101
,
99
,
32
,
97
,
32
,
98
,
117
,
105
,
108
,
116
,
45
,
105
,
110
,
32
,
109
,
111
,
100
,
117
,
108
,
101
,
78
,
41
,
3
,
114
,
65
,
0
,
0
,
0
,
114
,
57
,
0
,
0
,
0
,
90
,
12
,
101
,
120
,
101
,
99
,
95
,
100
,
121
,
110
,
97
,
109
,
105
,
99
,
41
,
2
,
114
,
19
,
0
,
120
,
101
,
99
,
95
,
98
,
117
,
105
,
108
,
116
,
105
,
110
,
41
,
2
,
114
,
19
,
0
,
0
,
0
,
114
,
89
,
0
,
0
,
0
,
114
,
10
,
0
,
0
,
0
,
114
,
10
,
0
,
0
,
0
,
114
,
11
,
0
,
0
,
0
,
114
,
139
,
0
,
0
,
0
,
233
,
2
,
0
,
0
,
115
,
2
,
0
,
0
,
0
,
0
,
3
,
122
,
27
,
66
,
117
,
105
,
108
,
116
,
105
,
110
,
73
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment