Victor Stinner
5422e3cfb7
bpo-36722: Debug build loads libraries built in release mode (GH-12952)
In debug build, import now also looks for C extensions compiled in
release mode and for C extensions compiled in the stable ABI.
7 years ago
Stefano Rivera
338d54f0a5
bpo-28401: prevent Py_DEBUG builds from trying to import limited ABI modules (GH-1766)
[Issue 28401](https://bugs.python.org/issue28401 ): Don't attempt to import the stable API extensions, they are not supported in PyDEBUG builds (which don't implement that ABI).
https://bugs.python.org/issue28401
7 years ago
Victor Stinner
621cebe81b
bpo-35081: Rename internal headers (GH-10275)
Rename Include/internal/ headers:
* pycore_hash.h -> pycore_pyhash.h
* pycore_lifecycle.h -> pycore_pylifecycle.h
* pycore_mem.h -> pycore_pymem.h
* pycore_state.h -> pycore_pystate.h
Add missing headers to Makefile.pre.in and PCbuild:
* pycore_condvar.h.
* pycore_hamt.h
* pycore_pyhash.h
7 years ago
Victor Stinner
27e2d1f219
bpo-35081: Add pycore_ prefix to internal header files (GH-10263)
* Rename Include/internal/ header files:
* pyatomic.h -> pycore_atomic.h
* ceval.h -> pycore_ceval.h
* condvar.h -> pycore_condvar.h
* context.h -> pycore_context.h
* pygetopt.h -> pycore_getopt.h
* gil.h -> pycore_gil.h
* hamt.h -> pycore_hamt.h
* hash.h -> pycore_hash.h
* mem.h -> pycore_mem.h
* pystate.h -> pycore_state.h
* warnings.h -> pycore_warnings.h
* PCbuild project, Makefile.pre.in, Modules/Setup: add the
Include/internal/ directory to the search paths of header files.
* Update includes. For example, replace #include "internal/mem.h"
with #include "pycore_mem.h".
7 years ago
Victor Stinner
caba55b3b7
bpo-34301: Add _PyInterpreterState_Get() helper function (GH-8592)
sys_setcheckinterval() now uses a local variable to parse arguments,
before writing into interp->check_interval.
8 years ago
Eric Snow
2ebc5ce42a
bpo-30860: Consolidate stateful runtime globals. ( #3397 )
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals
Other globals are excluded (see globals.txt and check-c-globals.py).
8 years ago
Nick Coghlan
d5cacbb1d9
PEP 489: Multi-phase extension module initialization
Known limitations of the current implementation:
- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet
The leak is most visible by running:
./python -m test -R3:3 test_importlib
However, you can also see it by running:
./python -X showrefcount
Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.
11 years ago
Victor Stinner
e134a7fe36
Issue #23752 : _Py_fstat() is now responsible to raise the Python exception
Add _Py_fstat_noraise() function when a Python exception is not welcome.
11 years ago
Steve Dower
f2f373f593
Issue #23152 : Implement _Py_fstat() to support files larger than 2 GB on Windows.
fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
11 years ago
Christian Heimes
af01f66817
Issue #16136 : Remove VMS support and VMS-related code
12 years ago
Benjamin Peterson
7d28b6b379
return NULL here
13 years ago
Christian Heimes
27c4c3ec79
Check return value of fstat() in _PyImport_GetDynLoadFunc()
CID 486250
13 years ago
Jesus Cea
b48925a406
#16135 : Removal of OS/2 support (I)
13 years ago
Victor Stinner
3b635cd447
Close #15766 : Catch exceptions while raising the ImportError in imp.load_dynamic()
13 years ago
Victor Stinner
ad54c6d82e
Issue #15766 : Fix a crash in imp.load_dynamic() on PyUnicode_FromString() failure
14 years ago
Brett Cannon
2657df4744
Issue #13959 : Re-implement imp.get_suffixes() in Lib/imp.py.
This introduces a new function, imp.extension_suffixes(), which is
currently undocumented. That is forthcoming once issue #14657 is
resolved and how to expose file suffixes is decided.
14 years ago
Brett Cannon
f0434e647a
Issue #14599 : Generalize a test for ImportError.path and add support
in Python/dynload_shlibs.c.
This should fix the remaining importlib test failure on Windows.
Support in AIX and HP-UX will be in a separate checkin.
14 years ago
Brett Cannon
fd0741555b
Issue #2377 : Make importlib the implementation of __import__().
importlib._bootstrap is now frozen into Python/importlib.h and stored
as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen
code along with sys and imp and then uses _frozen_importlib._install()
to set builtins.__import__() w/ _frozen_importlib.__import__().
14 years ago
Antoine Pitrou
c229e6e8ff
Issue #14040 : Remove rarely used file name suffixes for C extensions (under POSIX mainly).
This will improve import performance a bit (especially under importlib).
14 years ago
Victor Stinner
42040fb665
Issue #3080 : Remove unused argument of _PyImport_GetDynLoadFunc()
The first argument, fqname, was not used.
15 years ago
Martin v. Löwis
4d0d471a80
Merge branches/pep-0384.
15 years ago
Matthias Klose
f69af1e959
PEP 3149: Try to load the extension with the SOABI before trying
to load the one without the SOABI in the name.
16 years ago
Barry Warsaw
35f3a2cbeb
PEP 3149 is accepted.
http://mail.python.org/pipermail/python-dev/2010-September/103408.html
16 years ago
Antoine Pitrou
7f14f0d8a0
Recorded merge of revisions 81032 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
................
16 years ago
Antoine Pitrou
f95a1b3c53
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
16 years ago
Antoine Pitrou
c7c96a90bc
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
16 years ago
Antoine Pitrou
c83ea137d7
Untabify C files. Will watch buildbots.
16 years ago
Martin v. Löwis
1a21451b1d
Implement PEP 3121: new module initialization and finalization API.
18 years ago
Hye-Shik Chang
23f391c6a1
Fix a warning from gcc by adding a missed const qualifier.
20 years ago
Neal Norwitz
67715f0420
- SF Bug #1350188 , "setdlopenflags" leads to crash upon "import"
It was possible dlerror() returns a NULL pointer, use a default error
message in this case.
20 years ago
Martin v. Löwis
507a485984
Print verbose messages to stderr. Fixes #1036752 .
22 years ago
Nicholas Bastin
2786d90617
A few more PyThreadState_Get to PyThreadState_GET conversions
22 years ago
Martin v. Löwis
c16f3bd8a3
Patch #708495 : Port more stuff to OpenVMS.
23 years ago
Andrew MacIntyre
d940054ad4
OS/2 EMX port changes (Python part of patch #450267 ):
Python/
dynload_shlib.c // EMX port emulates dlopen() etc. for DL extensions
import.c // changes to support 8.3 DLL name limit (VACPP+EMX)
// and case sensitive import semantics
importdl.h
thread_os2.h
24 years ago
Jeremy Hylton
518ab1c02a
Use PyOS_snprintf instead of sprintf.
24 years ago
Martin v. Löwis
8a57f00081
Move dlfcn.h block out of NetBSD block, assuming that NetBSD before
199712 didn't have dlfcn.h, or that it wouldn't conflict with the other
stuff defined.
25 years ago
Martin v. Löwis
0eb1ed556b
Patch to bug #472202 : Correctly recognize NetBSD before 199712.
25 years ago
Martin v. Löwis
36546db750
Patch #455231 : Support ELF properly on OpenBSD.
25 years ago
Martin v. Löwis
f0473d511b
Patch #412229 : Add functions sys.getdlopenflags and sys.setdlopenflags.
Add dlopenflags to PyInterpreterState, and use it in dlopen calls.
25 years ago
Guido van Rossum
fef124346e
Oops, one more part of the cygwin patch (SF patch #102409 by jlt63:
Cygwin Python DLL and Shared Extension Patch). Add module.dll as a
valid extension.
jlt63 writes: Note that his change essentially backs out the fix for
bug #115973 . Should ".pyd" be retained instead for posterity?
25 years ago
Guido van Rossum
c8fcdcba36
Patch 102114, Bug 11725. On OpenBSD (but apparently not on the other
BSDs) you need a leading underscore in the dlsym() lookup name.
26 years ago
Tim Peters
98dc065c1b
SF "bug" 115973: patches from Norman Vine so that shared libraries and
Tkinter work under Cygwin. Accepted on faith & reasonableness.
26 years ago
Guido van Rossum
8586991099
REMOVED all CWI, CNRI and BeOpen copyright markings.
This should match the situation in the 1.6b1 tree.
26 years ago
Guido van Rossum
ffcc3813d8
Change copyright notice - 2nd try.
26 years ago
Guido van Rossum
fd71b9e9d4
Change copyright notice.
26 years ago
Guido van Rossum
96a8fb7e99
Cleanup patches from Greg Stein:
* in import.c, #ifdef out references to dynamic loading based on
HAVE_DYNAMIC_LOADING
* clean out the platform-specific crud from importdl.c.
[ maybe fold this function into import.c and drop the importdl.c file? Greg.]
* change GetDynLoadFunc's "funcname" parameter to "shortname". change
"name" to "fqname" for clarification.
* each GetDynLoadFunc now creates its own funcname value.
WARNING: as I mentioned previously, we may run into an issue with a
missing "_" on some platforms. Testing will show this pretty quickly,
however.
* move pathname munging into dynload_shlib.c
26 years ago
Guido van Rossum
22a1d3671b
The old platform-specific contents of importdl.c, broken down into one
file per platform (really: per style of Dl API; e.g. all platforms
using dlopen() are grouped together in dynload_shlib.c.).
This is part of a set of patches by Greg Stein.
26 years ago
Guido van Rossum
55db515a51
Great renaming.
Also got rid of the dummy variable, which was last needed in IRIX 4.x.
29 years ago
Guido van Rossum
cd165cc092
Make dummy int public (with _Py_ prefix), to keep gcc -Wall happy.
29 years ago
Guido van Rossum
d266eb460e
New permission notice, includes CNRI.
30 years ago