Commit Graph

191 Commits

Author SHA1 Message Date
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
Jeroen Ruigrok van der Werven 140d9d673e Reformat file prior to editing. 2009-04-25 13:58:58 +00:00
Jeroen Ruigrok van der Werven 2dcf46ee2c Rewrite a sentence to be more in line with the rest of the documentation with
regard to person and audience.
2009-04-25 13:07:40 +00:00
Jeroen Ruigrok van der Werven 162641a24c First attempt to document PyObject_HEAD_INIT and PyVarObject_HEAD_INIT. 2009-04-25 11:59:09 +00:00
Jeroen Ruigrok van der Werven bc25bf9d3e Reformat prior to expanding. 2009-04-25 11:15:06 +00:00
Georg Brandl 6cb1ff32c2 Remove redundant backtick. 2009-04-08 16:36:39 +00:00
Georg Brandl 1ede0d670f #5298: clarify docs about GIL by using more consistent wording. 2009-04-05 17:17:42 +00:00
Andrew M. Kuchling a178a69819 Fix 'the the' duplication 2009-04-03 21:45:29 +00:00
Andrew M. Kuchling aa34f5a2ac Fix 'the the'; grammar fix 2009-04-03 21:44:49 +00:00
Antoine Pitrou 789be0c0a0 Issue #2396: backport the memoryview object. 2009-04-02 21:18:34 +00:00
Brett Cannon c4f90ebea7 PyImport_AppendInittab() took a char * as a first argument even though that
string was stored beyond the life of the call. Changed the signature to be
const char * to help make this point.

Closes issue #1419652.
2009-04-02 03:17:39 +00:00
Benjamin Peterson 02ee8888cd fix markup 2009-04-02 00:11:52 +00:00
Georg Brandl bdaa6a7043 #5618: fix typo. 2009-03-31 19:30:56 +00:00
Georg Brandl a9efe6f65c #5227: note that Py_Main doesnt return on SystemExit. 2009-03-31 18:33:10 +00:00
Georg Brandl 9e0b363629 #5245: note that PyRun_SimpleString doesnt return on SystemExit. 2009-03-31 18:30:37 +00:00
Georg Brandl aa118103d7 #970783: document PyObject_Generic[GS]etAttr. 2009-03-31 17:13:06 +00:00
Georg Brandl 74c018a981 #5566: fix versionadded from PyLong ssize_t functions. 2009-03-31 15:46:30 +00:00
Georg Brandl 44e5cd3e51 #5488: add missing struct member. 2009-03-15 21:46:00 +00:00
Georg Brandl e83a4adba7 #5486: typos. 2009-03-13 19:03:58 +00:00
Georg Brandl a12a86e956 #5338, #5339: two types in the API manual. 2009-02-21 19:09:40 +00:00
Benjamin Peterson afb5a48be2 note functions that are not aliased to PyBytes_ #5280 2009-02-16 14:54:34 +00:00
Mark Dickinson 4015f62e39 Issue #5175: PyLong_AsUnsignedLongLong now raises OverflowError for
negative arguments.  Previously, it raised TypeError.

Thanks Lisandro Dalcin.
2009-02-10 15:46:50 +00:00
Georg Brandl 4400d84bf7 #5015: document PythonHome API functions. 2009-02-05 11:32:18 +00:00
Georg Brandl 3ceebd2ca7 PyErr_PrintEx is also in 2.x... 2009-02-05 11:23:47 +00:00
Georg Brandl acc802b171 #5144: document that PySys_SetArgv prepends the script directory (or the empty string) to sys.path. 2009-02-05 10:37:07 +00:00
Benjamin Peterson 0ef803ff0f PyErr_BadInternalCall() raises a SystemError, not TypeError #5112 2009-01-31 16:52:03 +00:00
Georg Brandl dd958e0d28 Fix call signature and markup. 2009-01-13 08:11:07 +00:00
Benjamin Peterson 35b80e0442 tp_iter only exists with Py_TPFLAGS_HAVE_ITER #4901 2009-01-10 17:36:44 +00:00
Kristján Valur Jónsson 0e2d8c36e3 Issue 4293: Make Py_AddPendingCall() thread safe
Add test cases and documentation
2009-01-09 21:35:16 +00:00
Georg Brandl c63785db86 Grammar fix. 2009-01-03 21:52:16 +00:00
Georg Brandl c62ef8b4d9 Remove trailing whitespace. 2009-01-03 20:55:06 +00:00
Georg Brandl e92818f58c Fix uses of the default role. 2009-01-03 20:47:01 +00:00
Martin v. Löwis 0fa10b3cd5 Issue #4817: Remove unused function PyOS_GetLastModificationTime. 2009-01-03 17:19:26 +00:00
Georg Brandl fc29f27c16 #4811: fix markup glitches (mostly remains of the conversion),
found by Gabriel Genellina.
2009-01-02 20:25:14 +00:00
Benjamin Peterson 0132ee34ac document PyMemberDef 2009-01-02 18:26:23 +00:00
Benjamin Peterson 80b59054c6 #4763 PyErr_ExceptionMatches won't blow up with NULL arguments 2008-12-28 21:16:07 +00:00
Alexandre Vassalotti e7d1e7e5d4 Document Py_VaBuildValue. 2008-12-28 02:58:22 +00:00
Georg Brandl 50ae9e7e75 #4682: 'b' is actually unsigned char. 2008-12-27 19:02:59 +00:00
Benjamin Peterson 1c39785256 less attitude 2008-12-22 20:44:58 +00:00
Christian Heimes c70e5f9975 w# requires Py_ssize_t 2008-11-30 21:16:28 +00:00
Gregory P. Smith b07bd10c91 Document PY_SSIZE_T_CLEAN for PyArg_ParseTuple. 2008-11-24 00:41:43 +00:00
Benjamin Peterson 9d1e2cdad6 PyGILState_Acquire -> PyGILState_Ensure 2008-10-10 22:23:41 +00:00
Andrew M. Kuchling 17ff29d061 Markup fix 2008-09-30 13:00:34 +00:00
Benjamin Peterson 14cb6bcf2b sort of backport 66038 by aliasing PyObject_Bytes to PyObject_Str 2008-08-26 17:08:40 +00:00
Nick Coghlan 8e439a16b2 Fix typo 2008-08-18 13:32:19 +00:00
Nick Coghlan 6e8fef07e5 Issue 2235: document PyObject_HashNotImplemented 2008-08-18 13:14:22 +00:00
Benjamin Peterson 4eb993939d fix markup 2008-08-16 03:02:41 +00:00
Martin v. Löwis f91d46a17d Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple,
by denying s# to parse objects that have a releasebuffer procedure,
and introducing s*.

More module might need to get converted to use s*.
2008-08-12 14:49:50 +00:00
Gregory P. Smith 0470bab697 Issue #2620: Overflow checking when allocating or reallocating memory
was not always being done properly in some python types and extension
modules.  PyMem_MALLOC, PyMem_REALLOC, PyMem_NEW and PyMem_RESIZE have
all been updated to perform better checks and places in the code that
would previously leak memory on the error path when such an allocation
failed have been fixed.
2008-07-22 04:46:32 +00:00
Benjamin Peterson 90f36730e2 fix various doc typos #3320 2008-07-12 20:16:19 +00:00
Raymond Hettinger 8dbbb96929 Add cautionary note on the use of PySequence_Fast_ITEMS. 2008-07-11 12:00:21 +00:00
Gregory P. Smith 2fe77060eb - Issue #2862: Make int and float freelist management consistent with other
freelists.  Changes their CompactFreeList apis into ClearFreeList apis and
  calls them via gc.collect().
2008-07-06 03:35:58 +00:00
Martin v. Löwis 99815892f6 New environment variable PYTHONIOENCODING. 2008-06-01 07:20:46 +00:00
Benjamin Peterson 31694ae4a5 fix grammar 2008-05-30 20:44:39 +00:00
Georg Brandl 457501bf20 Two fixes in bytearray docs. 2008-05-29 07:18:17 +00:00
Georg Brandl 74a1deaab3 #2989: add PyType_Modified(). 2008-05-28 11:21:39 +00:00
Benjamin Peterson 2b4b5acf18 add PyByteArray docs 2008-05-26 15:54:26 +00:00
Benjamin Peterson 438e9ac4d4 fix a minor typo 2008-05-26 14:29:09 +00:00
Benjamin Peterson 404d182bba note that PyString and has been aliased to PyBytes 2008-05-26 14:02:09 +00:00
Georg Brandl d23f1f2896 Mention version in which the new marshal version was introduced. 2008-05-12 17:48:56 +00:00
Georg Brandl 70dce223d4 Marshal is at version 2. 2008-05-12 17:47:53 +00:00
Georg Brandl 63b0a2eb21 #2727: clarify tp_iternext docs. 2008-04-30 20:02:37 +00:00
Benjamin Peterson fe4948bcef #2700 Document PyNumber_ToBase 2008-04-27 18:14:39 +00:00
Benjamin Peterson a692c4df63 Added PyErr_WarnPy3k function. (issue 2671) I will be converting current Py3k warnings to the use of this function soon. 2008-04-27 02:28:02 +00:00
Georg Brandl 78b3ee8c7b #2691: document PyLong (s)size_t APIs, patch by Alexander Belopolsky. 2008-04-26 18:31:07 +00:00
Gregory P. Smith aa63d0d4af Make file objects as thread safe as the underlying libc FILE* implementation.
close() will now raise an IOError if any operations on the file object
are currently in progress in other threads.

Most code was written by Antoine Pitrou (pitrou).  Additional testing,
documentation and test suite cleanup done by me (gregory.p.smith).

Fixes issue 815646 and 595601 (as well as many other bugs and
references to this problem dating back to the dawn of Python).
2008-04-06 23:11:17 +00:00
Georg Brandl 8ca6c84b6f Phase out has_key usage in the tutorial; correct docs for PyMapping_HasKey*. 2008-03-28 12:22:12 +00:00
Mark Dickinson 0cb3e86c47 Typo: "objects reference count" -> "object's reference count" 2008-03-26 21:41:36 +00:00
Georg Brandl 4ab9febdde #2160: document PyImport_GetImporter. 2008-03-21 20:55:20 +00:00
Georg Brandl 372d55e3e6 #1533486: fix types in refcount intro. 2008-03-08 10:05:24 +00:00