Commit Graph

287 Commits

Author SHA1 Message Date
Fred Drake b93b3e790e Error noted in email to python-docs: PyObject corresponds to
PyObject_HEAD, not PyObject_VAR_HEAD.
2003-07-07 17:20:40 +00:00
Skip Montanaro eec26f982a Correct documentation of check interval - it's 100 by default, not 10 any
longer.  Pointed out by Alex Martelli.
2003-07-02 21:38:34 +00:00
Fred Drake 6595e15331 Document PyThreadState_SetAsyncExc(). 2003-06-29 02:14:31 +00:00
Neal Norwitz 847207acff SF bug #719367, string exceptions are deprecated
Remove references to string based exceptions in the doc.
2003-05-29 02:17:23 +00:00
Greg Ward 2748a4aa7e Typo fix. 2003-05-29 01:41:51 +00:00
Martin v. Löwis 5467d4c0e3 Patch #612627: Add encoding attribute to file objects, and determine
the terminal encoding on Windows and Unix.
2003-05-10 07:10:12 +00:00
Fred Drake c22b2999f6 fix some markup errors 2003-04-23 20:38:41 +00:00
Thomas Heller 34d7f0927b Document the new functions PyInt_AsUnsignedLongMask(), PyInt_AsUnsignedLongLongMask(),
PyLong_AsUnsignedLongMask(), PyLong_AsUnsignedLongLongMask().
2003-04-23 19:51:05 +00:00
Thomas Heller 42a1172cf4 Document the new format codes B, H, I, k, K. 2003-04-23 19:27:35 +00:00
Raymond Hettinger 2ed6dff796 As discussed on python-dev, revised docs to note that
PyObject_IsTrue() can have an error result.

Also, added missing docs for PyObject_Not().

Will backport.
2003-04-16 17:28:12 +00:00
Guido van Rossum 0fc8f00252 - pythunrun.c, Py_Finalize(): move the call to _Py_PrintReferences()
even farther down, to just before the call to
  _PyObject_DebugMallocStats().  This required the following changes:

- pystate.c, PyThreadState_GetDict(): changed not to raise an
  exception or issue a fatal error when no current thread state is
  available, but simply return NULL without raising an exception
  (ever).

- object.c, Py_ReprEnter(): when PyThreadState_GetDict() returns NULL,
  don't raise an exception but return 0.  This means that when
  printing a container that's recursive, printing will go on and on
  and on.  But that shouldn't happen in the case we care about (see
  first bullet).

- Updated Misc/NEWS and Doc/api/init.tex to reflect changes to
  PyThreadState_GetDict() definition.
2003-04-15 15:12:39 +00:00
Fred Drake 12dd7b12c6 Minor markup adjustments. 2003-04-09 18:15:57 +00:00
Guido van Rossum 6db771871e Try to discourage use of PyObject_Type(). 2003-04-09 18:02:23 +00:00
Martin v. Löwis 24b8881f61 Patch #701395: Correct documentation of PyUnicode_Splitlines. 2003-03-30 16:40:42 +00:00
Martin v. Löwis b9a0f91218 Rename LONG_LONG to PY_LONG_LONG. Fixes #710285. 2003-03-29 10:06:18 +00:00
Ka-Ping Yee bd379e9627 PyWeakref_GetObject returns None (not NULL) when the referent is gone. 2003-03-28 18:07:16 +00:00
Fred Drake 9e1595e6e4 Minor clarification about the ob_size field. 2003-03-07 15:02:03 +00:00
Neal Norwitz 1930949a8a Fix SF bug #697256, PyMarshal_WriteShortToFile() documented, but not implemented
Remove prototype and doc.  Backport candidate.
2003-03-06 22:04:24 +00:00
Guido van Rossum 41bcbe3050 Commit MvL's doc patch for SF bug #221327. This adds an example of
calling into Python from a C thread.
2003-03-02 13:17:20 +00:00
Michael W. Hudson 1e71b04258 Update advice about __module__ and __name__ and tp_name wrt. new types.
Add \refs to GC section that were XXXed out.
2003-02-10 19:18:21 +00:00
Michael W. Hudson bbe17f50eb A typo, and desist from inaccurately describing some things as lists. 2003-02-10 19:12:42 +00:00
Michael W. Hudson 847f37543f Correct lie about METH_NOARGS functions.
Backport candidate.
2003-02-06 18:37:11 +00:00
Skip Montanaro 1ff49a7734 * Add description of PyInt_FromString.
* Correct description of PyFloat_FromString.  While ignored, the pend
  argument still has to be given.
* Typo in PyLong_FromString.
2003-02-03 05:13:24 +00:00
Skip Montanaro ae31e9b8c7 Add PyFloat_FromString. Left the char **pend argument out of the
description since while there, it is useless and ignored, according to Tim's
commen.  (PyInt_FromString is also not described, but PyLong_FromString is.
Is the former deprecated?)
2003-02-03 03:56:36 +00:00
Raymond Hettinger 89fc4f3e56 Fix typo 2003-01-31 05:44:25 +00:00
Fred Drake f536827c65 Include version annotation for PyObject_Call(). 2003-01-25 07:48:13 +00:00
Walter Dörwald d9a6ad3beb Enhance issubclass() and PyObject_IsSubclass() so that a tuple is
supported as the second argument. This has the same meaning as
for isinstance(), i.e. issubclass(X, (A, B)) is equivalent
to issubclass(X, A) or issubclass(X, B). Compared to isinstance(),
this patch does not search the tuple recursively for classes, i.e.
any entry in the tuple that is not a class, will result in a
TypeError.

This closes SF patch #649608.
2002-12-12 16:41:44 +00:00
Thomas Heller ead60e5d1c Typo: propogate -> propagate
Bugfix candidate.
2002-12-06 22:42:13 +00:00
Walter Dörwald 6d5f30eaed Document that the second argument to PyObject_IsInstance
may be a tuple. This closes SF patch
http://www.python.org/sf/649095

Backport to release22-maint will follow.
2002-12-06 10:09:16 +00:00
Walter Dörwald f171540ab8 Change int() so that passing a string, unicode, float or long argument
that is outside the integer range no longer raises OverflowError, but
returns a long object instead.

This fixes SF bug http://www.python.org/sf/635115
2002-11-19 20:49:15 +00:00
Fred Drake 674dae245a Clarify that PyImport_AddModule() and PyImport_ExecCodeModule() don't
add any package support structure even if a dotted-name is passed for
the module.
Closes SF bug #424106.
2002-11-13 15:13:38 +00:00
Fred Drake 71f5acdd1e Minor cleanups, markup. 2002-11-05 22:19:45 +00:00
Neal Norwitz 1aca2d0cb3 Fix SF # 518775, buffer object API description truncated 2002-11-03 02:56:27 +00:00
Fred Drake 5e96f1ff1d Correct the description of PyErr_Restore().
Closes SF bug #577000.
2002-10-24 20:54:18 +00:00
Fred Drake 4b2472647a Clarified the error cases and Unicode handling of PyString_AsString(),
PyString_AsStringAndSize(), and PyString_AS_STRING().
Closes SF bug #606463.
2002-10-22 20:20:20 +00:00
Martin v. Löwis 36a4d8c20e Remove mentionings of DOS. 2002-10-10 18:24:54 +00:00
Fred Drake b915a38b6f Added refcount information for PyObject_GetIter(). 2002-10-04 18:58:58 +00:00
Fred Drake 111ee3208f Ok, read the source this time: PyErr_SetObject() does not steal a reference. 2002-09-25 02:34:27 +00:00
Fred Drake 2f93644c1d Clarify documentation for PyErr_SetObject() to describe the reference
count behavior.
2002-09-24 16:45:16 +00:00
Raymond Hettinger d3e0265373 Document type and semantics of the tp_print return value. Closes SF 606464. 2002-09-10 13:48:01 +00:00
Raymond Hettinger 513069028f Fix API typo. The write buffer is not const. Closes SF 606216. 2002-09-08 04:39:28 +00:00
Fred Drake 794643c314 Py_InitModule() and friends now accept NULL for the 'methods'
argument.  This makes sense now that extension types can support
__init__ directly rather than requiring function constructors.
2002-08-14 20:59:38 +00:00
Barry Warsaw 29ce2d7d1e Document PyExc_FutureWarning 2002-08-14 16:06:28 +00:00
Guido van Rossum 43af5b5852 Add some fine points: METH_KEYWORDS implies METH_VARARGS, and ob_size
is no longer unused in type objects.
2002-08-06 17:18:56 +00:00
Thomas Heller 085358a3e2 New functions for extension writers on Windows:
PyErr_SetExcFromWindowsErr(), PyErr_SetExcFromWindowsErrWithFilename().

Similar to PyErr_SetFromWindowsErrWithFilename() and
PyErr_SetFromWindowsErr(), but they allow to specify
the exception type to raise. Available on Windows.

See SF patch #576458.
2002-07-29 14:27:41 +00:00
Neal Norwitz 4ddfd50d85 Fix SF bug 587012, doc mentions inexistent builtin unistr 2002-07-28 13:55:20 +00:00
Tim Peters 7c321a80f9 The Py_REF_DEBUG/COUNT_ALLOCS/Py_TRACE_REFS macro minefield: added
more trivial lexical helper macros so that uses of these guys expand
to nothing at all when they're not enabled.  This should help sub-
standard compilers that can't do a good job of optimizing away the
previous "(void)0" expressions.

Py_DECREF:  There's only one definition of this now.  Yay!  That
was that last one in the family defined multiple times in an #ifdef
maze.

Py_FatalError():  Changed the char* signature to const char*.

_Py_NegativeRefcount():  New helper function for the Py_REF_DEBUG
expansion of Py_DECREF.  Calling an external function cuts down on
the volume of generated code.  The previous inline expansion of abort()
didn't work as intended on Windows (the program often kept going, and
the error msg scrolled off the screen unseen).  _Py_NegativeRefcount
calls Py_FatalError instead, which captures our best knowledge of
how to abort effectively across platforms.
2002-07-09 02:57:01 +00:00
Fred Drake abe7c1a4af Minor markup adjustments, consistency changes, and shorten a long
line.
2002-07-02 16:17:58 +00:00
Fred Drake 7c1bb9c528 Add refcount info for PyErr_SetFromWindowsErr() and
PyErr_SetFromWindowsErrWithFilename().
2002-07-02 16:16:18 +00:00
Thomas Heller 4f2722ac9b Docs for PyErr_SetFromWindowsErrWithFilename() and
PyErr_SetFromWindowsErr().
Fixes SF# 576016, with additional markup.
2002-07-02 15:47:03 +00:00