Thomas Heller
d5bb9215c9
Revert revisions 63943 and 63942 (Issue #1798 : Add ctypes calling
...
convention that allows safe access to errno)
This code does not yet work on OS X (__thread storage specifier not
available), so i needs a configure check plus a more portable
solution.
2008-06-04 20:22:05 +00:00
Thomas Heller
e70c3378c0
Issue #1798 : Add ctypes calling convention that allows safe access to
...
errno (and LastError, on Windows).
ctypes maintains a module-global, but thread-local, variable that
contains an error number; called 'ctypes_errno' for this discussion.
This variable is a private copy of the systems 'errno' value; the copy
is swapped with the 'errno' variable on several occasions.
Foreign functions created with CDLL(..., use_errno=True), when called,
swap the values just before the actual function call, and swapped
again immediately afterwards. The 'use_errno' parameter defaults to
False, in this case 'ctypes_errno' is not touched.
The values are also swapped immeditately before and after ctypes
callback functions are called, if the callbacks are constructed using
the new optional use_errno parameter set to True: CFUNCTYPE(..., use_errno=TRUE)
or WINFUNCTYPE(..., use_errno=True).
Two new ctypes functions are provided to access the 'ctypes_errno'
value from Python:
- ctypes.set_errno(value) sets ctypes_errno to 'value', the previous
ctypes_errno value is returned.
- ctypes.get_errno() returns the current ctypes_errno value.
---
On Windows, the same scheme is implemented for the error value which
is managed by the GetLastError() and SetLastError() windows api calls.
The ctypes functions are 'ctypes.set_last_error(value)' and
'ctypes.get_last_error()', the CDLL and WinDLL optional parameter is
named 'use_last_error', defaults to False.
---
On Windows, TlsSetValue and TlsGetValue calls are used to provide
thread local storage for the variables; ctypes compiled with __GNUC__
uses __thread variables.
2008-06-04 18:59:03 +00:00
Martin v. Löwis
ffe62ed46d
Patch #2125 : Add GetInteger and GetString methods for
...
msilib.Record objects.
2008-06-02 08:40:06 +00:00
Gregory P. Smith
137d824148
Fix issue 2782: be less strict about the format string type in strftime.
...
Accept unicode and anything else ParseTuple "s#" can deal with. This
matches the time.strftime behavior.
2008-06-02 04:05:52 +00:00
Gregory P. Smith
8856ddae25
Adds a Thread.getIdent() method to provide the _get_ident() value for
...
any given threading.Thread object. feature request issue 2871.
2008-06-01 23:48:47 +00:00
Georg Brandl
ac19d85e04
Deprecate htmllib and sgmllib for 3.0.
2008-06-01 21:19:14 +00:00
Robert Schuppenies
51df064767
Issue #2898 : Added sys.getsizeof() to retrieve size of objects in bytes.
2008-06-01 16:16:17 +00:00
Martin v. Löwis
99815892f6
New environment variable PYTHONIOENCODING.
2008-06-01 07:20:46 +00:00
Raymond Hettinger
6d7702ecd1
Implement heapq in terms of less-than (to match list.sort()).
2008-05-31 03:24:31 +00:00
Marc-André Lemburg
adff65bc3e
Update the locale module alias table.
...
Closes #3011 .
2008-05-30 20:52:18 +00:00
Thomas Heller
9287acf83d
ctypes NULL function pointers have a boolean False value now.
2008-05-29 19:42:34 +00:00
Georg Brandl
d0b592f8e8
#2985 : allow i8 in XMLRPC responses.
2008-05-29 07:45:26 +00:00
Brett Cannon
abb34fe9f3
UserString.MutableString has been removed in Python 3.0.
...
Works on issue #2877 . Thanks Quentin Gallet-Gilles for the patch.
2008-05-29 05:08:50 +00:00
Georg Brandl
74a1deaab3
#2989 : add PyType_Modified().
2008-05-28 11:21:39 +00:00
Lars Gustäbel
b1a54a3530
Do not close external file objects passed to tarfile.open(mode='w:bz2')
...
when the TarFile is closed.
2008-05-27 12:39:23 +00:00
Benjamin Peterson
dacde0d6ae
turn PyErr_WarnPy3k into a macro
2008-05-26 17:43:53 +00:00
Christian Heimes
7a9906162b
Updated NEWS
2008-05-26 13:15:11 +00:00
Gregory P. Smith
5d7d6c37c2
note about r63617
2008-05-25 08:32:04 +00:00
Georg Brandl
e08e3d0686
#2959 : allow multiple close() calls for GzipFile.
2008-05-25 08:07:37 +00:00
Georg Brandl
392c6fc02d
ConfigParser renaming reversal part 3: move module into place and adapt imports.
2008-05-25 07:25:25 +00:00
Georg Brandl
e152a77d96
socketserver renaming reversal part 3: move the module into the right
...
place and fix all references to it. Closes #2926 .
2008-05-24 18:31:28 +00:00
Martin v. Löwis
27e4a179f2
Issue #1390 : Raise ValueError in toxml when an invalid comment would
...
otherwise be produced.
2008-05-23 15:18:28 +00:00
Martin v. Löwis
8c255e4173
Patch #1722225 : Support QNX 6.
2008-05-23 15:06:50 +00:00
Brett Cannon
2ee0e8eaec
Revert the renaming of repr to reprlib.
2008-05-23 05:03:59 +00:00
Mark Dickinson
99dfe92759
Issue #2819 : Add math.sum, a function that sums a sequence of floats
...
efficiently but with no intermediate loss of precision. Based on
Raymond Hettinger's ASPN recipe. Thanks Jean Brouwers for the patch.
2008-05-23 01:35:30 +00:00
Jesus Cea
ca3939cd52
bsddb module updated to version 4.7.0
2008-05-22 15:27:38 +00:00
Vinay Sajip
c01288387c
Updated with fixes for #2914 and #2929 .
2008-05-20 15:37:22 +00:00
Georg Brandl
88659b0ab2
#2592 : delegate nb_index and the floor/truediv slots in weakref.proxy.
2008-05-20 08:40:43 +00:00
Georg Brandl
112aa50329
Patch #1775025 : allow opening zipfile members via ZipInfo instances.
...
Patch by Graham Horler.
2008-05-20 08:25:48 +00:00
Martin v. Löwis
4dd019fde3
Patch #2488 : Add sys.maxsize.
2008-05-20 08:11:19 +00:00
Georg Brandl
6634bf2919
Tkinter rename reversal: remove tkinter package, adapt imports and docs.
2008-05-20 07:13:37 +00:00
Fred Drake
d995e1150c
revert creation of the html.entities and html.parser modules
...
(http://bugs.python.org/issue2882 )
2008-05-20 06:08:38 +00:00
Georg Brandl
a9916b55de
#2353 : raise Py3k warning in file.xreadlines().
2008-05-17 22:11:54 +00:00
Fred Drake
91ae250273
rename HTMLParser to html.parser, htmlentitydefs to html.entities
...
(http://bugs.python.org/issue2882 )
2008-05-17 20:30:04 +00:00
Georg Brandl
3ee81df3bb
Rewrap consistently to 70 chars, and standardize the way of referring to issues.
2008-05-17 18:14:43 +00:00
Georg Brandl
28fdfa9839
#961805 : fix Edit.text_modified().
2008-05-17 17:57:01 +00:00
Gregory P. Smith
664782e1c8
issue2858: Fix potential memory corruption when bsddb.db.DBEnv.lock_get
...
and other bsddb.db object constructors raised an exception.
Debugging & patch by Neal Norowitz.
2008-05-17 06:12:02 +00:00
Thomas Heller
95ba13fa85
Issue 1793: Add ctypes.util.find_msvcrt() function (on Windows).
2008-05-16 20:06:31 +00:00
Georg Brandl
5e7b1c07bc
NEWS entry for Tkinter rename.
2008-05-16 17:40:23 +00:00
Georg Brandl
5049a858ba
#2890 : support os.O_ASYNC and fcntl.FASYNC.
2008-05-16 13:10:15 +00:00
Christian Heimes
0bd23c0a98
Fixed #2870 : cmathmodule.c compile error
2008-05-16 10:23:31 +00:00
Alexandre Vassalotti
95d97c7390
Renamed the repr module to reprlib.
...
Added stub module for repr.
2008-05-16 06:37:57 +00:00
Brett Cannon
fa40bbf625
Deprecated statvfs for removal in 3.0.
2008-05-16 00:50:02 +00:00
Brett Cannon
2224817cdf
Deprecate sunaudiodev/SUNAUDIODEV for removal in 3.0.
2008-05-16 00:10:24 +00:00
Georg Brandl
c91210c06b
#2863 : add gen.__name__ and add this name to generator repr().
2008-05-15 15:08:32 +00:00
Brett Cannon
74a596c068
Deprecate WAIT for removal in 3.0.
2008-05-15 04:17:35 +00:00
Brett Cannon
f56b6aeb06
Deprecated torgb for removal in 3.0.
2008-05-15 04:15:25 +00:00
Brett Cannon
518c5da219
Deprecate SV for removal in 3.0.
2008-05-15 04:13:19 +00:00
Brett Cannon
cd2de08257
Deprecate readcd for removal in 3.0.
2008-05-15 03:51:21 +00:00
Brett Cannon
11ae6e7151
Deprecated panelparser for removal in 3.0.
2008-05-15 03:49:00 +00:00