Commit Graph

160 Commits

Author SHA1 Message Date
Mark Dickinson 82864d1ab1 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
PyFormat_FromStringV and PyErr_Format.
2009-11-15 16:18:58 +00:00
Mark Dickinson 09823a2e21 Deprecate PyOS_ascii_strtod and PyOS_ascii_atof, and document the replacement function PyOS_string_to_double. 2009-10-31 09:42:39 +00:00
Eric Smith c12781abcb Issue #7169: Document PyFloat_AsString and PyFloat_AsReprString, and note that they are unsafe and deprecated. 2009-10-19 14:38:14 +00:00
Ezio Melotti 4b017bbac0 #6881 - fixed wrong return type; improved the formatting 2009-09-20 07:10:39 +00:00
Georg Brandl 579a358e61 #6930: clarify description about byteorder handling in UTF decoder routines. 2009-09-18 21:35:59 +00:00
Thomas Wouters c4dcb3801e Fix issue #1590864, multiple threads and fork() can cause deadlocks, by
acquiring the import lock around fork() calls. This prevents other threads
from having that lock while the fork happens, and is the recommended way of
dealing with such issues. There are two other locks we care about, the GIL
and the Thread Local Storage lock. The GIL is obviously held when calling
Python functions like os.fork(), and the TLS lock is explicitly reallocated
instead, while also deleting now-orphaned TLS data.

This only fixes calls to os.fork(), not extension modules or embedding
programs calling C's fork() directly. Solving that requires a new set of API
functions, and possibly a rewrite of the Python/thread_*.c mess. Add a
warning explaining the problem to the documentation in the mean time.

This also changes behaviour a little on AIX. Before, AIX (but only AIX) was
getting the import lock reallocated, seemingly to avoid this very same
problem. This is not the right approach, because the import lock is a
re-entrant one, and reallocating would do the wrong thing when forking while
holding the import lock.

Will backport to 2.6, minus the tiny AIX behaviour change.
2009-09-16 19:55:54 +00:00
Benjamin Peterson ea7120c7c1 Py_SetPythonHome uses static storage #6913 2009-09-15 03:36:26 +00:00
Georg Brandl eb4781c279 #6821: fix signature of PyBuffer_Release(). 2009-09-02 20:37:16 +00:00
Georg Brandl 4a46e1c4b3 #6658: fix two typos. 2009-08-06 17:43:55 +00:00
Georg Brandl 019e8dd7fc #6336: Add nb_divide. 2009-07-29 16:32:30 +00:00
Georg Brandl d7d4fd7336 builtin -> built-in. 2009-07-26 14:37:28 +00:00
Georg Brandl 36b30b5a4b Dont put "void" in signature for nullary functions. 2009-07-24 16:46:38 +00:00
Georg Brandl f0b1733574 Fix arg types of et#. 2009-07-24 16:28:38 +00:00
Georg Brandl 3405cbcf06 Fix style. 2009-07-11 10:12:36 +00:00
Georg Brandl 476849c185 #6255: document PyInt_FromSize_t. 2009-06-17 09:43:31 +00:00
Georg Brandl 3a5971c237 #5967: note that the C slicing APIs do not support negative indices. 2009-06-04 10:15:57 +00:00
Benjamin Peterson d7ead0c23f fix signature 2009-05-31 00:42:42 +00:00
Georg Brandl 6a4689887c Fix some more small markup problems. 2009-05-30 10:33:23 +00:00
Jeffrey Yasskin f7f858d141 Issue 5954, PyFrame_GetLineNumber:
Most uses of PyCode_Addr2Line
(http://www.google.com/codesearch?q=PyCode_Addr2Line) are just trying to get
the line number of a specified frame, but there's no way to do that directly.
Forcing people to go through the code object makes them know more about the
guts of the interpreter than they should need.

The remaining uses of PyCode_Addr2Line seem to be getting the line from a
traceback (for example,
http://www.google.com/codesearch/p?hl=en#u_9_nDrchrw/pygame-1.7.1release/src/base.c&q=PyCode_Addr2Line),
which is replaced by the tb_lineno field.  So we may be able to deprecate
PyCode_Addr2Line entirely for external use.
2009-05-08 22:23:21 +00:00
Jeffrey Yasskin 1aa4700234 PyCode_NewEmpty:
Most uses of PyCode_New found by http://www.google.com/codesearch?q=PyCode_New
are trying to build an empty code object, usually to put it in a dummy frame
object. This patch adds a PyCode_NewEmpty wrapper which lets the user specify
just the filename, function name, and first line number, instead of also
requiring lots of code internals.
2009-05-08 21:51:06 +00:00
Eric Smith a985a3aee4 Issue #5920: Changed format.__float__ and complex.__float__ to use a precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson. 2009-05-05 18:26:08 +00:00
Georg Brandl 2622b549d7 #5840: dont claim we dont support TLS. 2009-04-27 17:09:53 +00:00
Georg Brandl 16a57f6a34 Demote warnings to notices where appropriate, following the goal that as few "red box" warnings
should clutter the docs as possible.  Part 1: stuff that gets merged to Py3k.
2009-04-27 15:29:09 +00:00
Eric Smith f254aab098 Note that the caller is resposible for freeing the result of PyOS_double_to_string. 2009-04-26 10:05:11 +00:00
Georg Brandl afb0d6ef39 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags. 2009-04-26 06:01:04 +00:00
Eric Smith 068f06568b Issue #5835, deprecate PyOS_ascii_formatd.
If anyone wants to clean up the documentation, feel free. It's my first documentation foray, and it's not that great.

Will port to py3k with a different strategy.
2009-04-25 21:40:15 +00:00
Jeroen Ruigrok van der Werven dfcffd4044 Issue #4129: document int -> Py_ssize_t changes. 2009-04-25 21:16:05 +00:00
Jeroen Ruigrok van der Werven 436f1a2e0d Issue #4129: field changed from int to Py_ssize_t. 2009-04-25 21:02:34 +00:00
Jeroen Ruigrok van der Werven acc73b74b8 Issue #4129: more int -> Py_ssize_t documentation. 2009-04-25 20:58:35 +00:00
Jeroen Ruigrok van der Werven 7b3750c8d8 Issue #4129: more int -> Py_ssize_t documentation. 2009-04-25 20:55:39 +00:00
Jeroen Ruigrok van der Werven 36378711b7 Issue #4129: int -> Py_ssize_t documentation. 2009-04-25 20:50:27 +00:00
Jeroen Ruigrok van der Werven 9594c2c5aa Issue #4129: int -> Py_ssize_t documentation. 2009-04-25 20:44:58 +00:00
Jeroen Ruigrok van der Werven 27d51f1a51 Reformat prior to editing. 2009-04-25 20:43:30 +00:00
Jeroen Ruigrok van der Werven be82d2f16f Issue #4129: int -> Py_ssize_t documentation. 2009-04-25 20:41:40 +00:00
Jeroen Ruigrok van der Werven a4c03abb9e Reformat prior to editing. 2009-04-25 20:40:10 +00:00
Jeroen Ruigrok van der Werven 9e03cee97c Since it's a macro, actually refer to it as such instead of function. 2009-04-25 20:37:39 +00:00
Jeroen Ruigrok van der Werven af15b41547 Issue #4129: Add a versionchanged notice for a few forgotten entries. 2009-04-25 19:54:34 +00:00
Jeroen Ruigrok van der Werven de0fed10c8 Reformat, since I've been busy here anyway. 2009-04-25 19:49:05 +00:00
Jeroen Ruigrok van der Werven 2aa7840f54 Issue #4129: Documentation notes for int -> Py_ssize_t changes. 2009-04-25 19:46:19 +00:00
Jeroen Ruigrok van der Werven 691f5f17ee Issue #4129: More documentation pointers about int -> Py_ssize_t.
Also fix up the documentation for PyObject_GC_Resize(). It seems that since
it first got documented, the documentation was actually for
_PyObject_GC_Resize().
2009-04-25 19:44:55 +00:00
Jeroen Ruigrok van der Werven 3537124058 Reformat prior to editing. 2009-04-25 19:10:52 +00:00
Jeroen Ruigrok van der Werven 1ae8c88030 Since I edited this file, reformat for future edits. 2009-04-25 19:04:15 +00:00
Jeroen Ruigrok van der Werven c2aa7b8a0a Reference to an int type, whereas it's a Py_ssize_t as the synopsis states. 2009-04-25 18:57:32 +00:00
Jeroen Ruigrok van der Werven 28c81e0bb5 Reformat prior to editing. 2009-04-25 18:53:48 +00:00
Jeroen Ruigrok van der Werven 2391918f3e Issue #4129: Document more int -> Py_ssize_t changes. 2009-04-25 18:46:03 +00:00
Jeroen Ruigrok van der Werven 84441cc3d5 Reformat prior to editing. 2009-04-25 18:31:20 +00:00
Jeroen Ruigrok van der Werven 089c5cdd09 Issue #4129: Belatedly document which C API functions had their argument(s) or
return type changed from int or int * to Py_ssize_t or Py_ssize_t * as this
might cause problems on 64-bit platforms.
2009-04-25 17:59:03 +00:00
Jeroen Ruigrok van der Werven 6f1d543133 Reformat paragraph. 2009-04-25 14:28:02 +00:00
Jeroen Ruigrok van der Werven 325a997efb The type for ppos has been Py_ssize_t since 2.5, reflect this in the
documentation.
2009-04-25 14:27:00 +00:00
Jeroen Ruigrok van der Werven c42c099436 Reformat prior to editing. 2009-04-25 14:24:30 +00:00