| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
|
| |
|
|
|
|
|
|
|
| |
fault in sys.displayhook.
Please check this in on the 2.2a1 branch (or whatever is necessary
to get it working next release)
|
|
|
|
| |
Add dlopenflags to PyInterpreterState, and use it in dlopen calls.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python interpreter.
This change adds two new C-level APIs: PyEval_SetProfile() and
PyEval_SetTrace(). These can be used to install profile and trace
functions implemented in C, which can operate at much higher speeds
than Python-based functions. The overhead for calling a C-based
profile function is a very small fraction of a percent of the overhead
involved in calling a Python-based function.
The machinery required to call a Python-based profile or trace
function been moved to sysmodule.c, where sys.setprofile() and
sys.setprofile() simply become users of the new interface.
As a side effect, SF bug #436058 is fixed; there is no longer a
_PyTrace_Init() function to declare.
|
|
|
|
|
|
|
| |
Implement sys.maxunicode.
Explicitly wrap around upper/lower computations for wide Py_UNICODE.
When decoding large characters with UTF-8, represent expected test
results using the \U notation.
|
|
|
|
|
|
|
| |
and trace functions lazily, which incurs extra argument pushing and checks
in the C overhead for profiling/tracing, create the strings semi-lazily
when the Python code first registers a profile or trace function. This
simplifies the trampoline into the profile/trace functions.
|
| |
|
|
|
|
|
|
|
|
| |
Update docstring and library reference section on 'sys' module.
New API PyErr_Display, just for displaying errors, called by excepthook.
Uncaught exceptions now call sys.excepthook; if that fails, we fall back
to calling PyErr_Display directly.
Also comes with sys.__excepthook__ and sys.__displayhook__.
|
|
|
|
|
|
| |
re-initializing Python (Py_Finalize() followed by Py_Initialize()) to
blow up quickly. With the DECREF removed I can't get it to fail any
more. (Except it still leaks, but that's probably a separate issue.)
|
|
|
|
| |
Submitted by: Mark Favas <m.favas@per.dem.csiro.au>
|
|
|
|
| |
This closes the PEP, and patch 103170
|
|
|
|
| |
PySys_AddWarnOption().
|
|
|
|
|
| |
Implements and closes SF patch #102106, with Guido's suggested
documentation changes.
|
|
|
|
| |
This should match the situation in the 1.6b1 tree.
|
|
|
|
|
|
|
|
|
|
|
| |
ceval.c:
define recurion_limit (static), default value is 2500
define Py_GetRecursionLimit and Py_SetRecursionLimit
raise RuntimeError if limit is exceeded
PC/config.h:
remove plat-specific definition
sysmodule.c:
add sys.(get|set)recursionlimit
|
|
|
|
|
| |
instead of four #if/#endif blocks. This shortens the
code and improves readability.
|
|
|
|
| |
created from the "big"/"little" constant needs to be decref'd.
|
| |
|
|
|
|
|
|
| |
string literals has not been tested on an MS_WIN16 platform; the trailing
";" was inside the #ifndef MS_WIN16, which should cause an error (missing
semi-colon) when compiled with that symbol #defined.
|
|
|
|
| |
big-endian machines and "little" for little-endian machines.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for systems that are missing those declarations from system include files.
Start by moving a pointy-haired ones from their previous locations to the
new section.
(The gethostname() one, for instance, breaks on several systems, because
some define it as (char *, size_t) and some as (char *, int).)
I purposely decided not to include the summary of used #defines like Tim did
in the first section of pyport.h. In my opinion, the number of #defines
likedly to be used by this section would make such an overview unwieldy. I
would suggest documenting the non-obvious ones, though.
|
|
|
|
| |
declarations yet, those come later.
|
| |
|
| |
|
| |
|
|
|
|
| |
tests.
|
|
|
|
|
|
| |
number of references on all Python objects. This is only enabled when Py_TRACE_REFS is defined (which includes default debug builds under Windows).
Also removed a redundant cast from sys.getrefcount(), as discussed on the patches list.
|
|
|
|
|
|
| |
Changed the API names for setting the default encoding.
These are now in line with the other hooks API names
(no underscores).
|
|
|
|
|
|
| |
Added APIs to allow setting and querying the system's
current string encoding: sys.set_string_encoding()
and sys.get_string_encoding().
|
|
|
|
| |
suggestion from Greg Stein.
|
|
|
|
|
|
| |
major, minor, micro, level, serial
Values are now monotonically increasing with each new release.
|
|
|
|
|
|
| |
is a string "a2", "b1", "c1", or '' for a final release.
Added version_info and hexversion to the module docstring.
|
|
|
|
| |
(Mostly.)
|
|
|
|
| |
PyArg_ParseTuple() format string arguments as possible.
|
|
|
|
|
|
| |
NULL. In that case, return NULL rather than dumping core.
This fixes PR#91, submitted by Lele Gaifax.
|
|
|
|
| |
sys.version was missing a Py_XDECREF().
|
|
|
|
| |
1.5. Omit the second part.
|
|
|
|
|
|
| |
In other words, hex(sys.hexversion) == 0x010502b2 for Python 1.5.2b2.
This is derived from the new variable PY_VERSION_HEX defined in patchlevel.h.
(Cute, eh?)
|
|
|
|
| |
reliably; check return value of vsprintf().
|
|
|
|
|
| |
However two string literals concatenated are fine!
Hope this doesn't break other platforms.
|
|
|
|
| |
long, but it sure helps!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adapted from code submitted by Just van Rossum.
PySys_WriteStdout(format, ...)
PySys_WriteStderr(format, ...)
The first function writes to sys.stdout; the second to sys.stderr. When
there is a problem, they write to the real (C level) stdout or stderr;
no exceptions are raised (but a pending exception may be cleared when a
new exception is caught).
Both take a printf-style format string as their first argument followed
by a variable length argument list determined by the format string.
*** WARNING ***
The format should limit the total size of the formatted output string to
1000 bytes. In particular, this means that no unrestricted "%s" formats
should occur; these should be limited using "%.<N>s where <N> is a
decimal number calculated so that <N> plus the maximum size of other
formatted text does not exceed 1000 bytes. Also watch out for "%f",
which can print hundreds of digits for very large numbers.
|
|
|
|
| |
__stderr__. These will be used by the import cleanup.
|
|
|
|
|
| |
that should be PyImport_Inittab (a new pointer initialized to point to
the array).
|
| |
|
| |
|
|
|
|
|
|
|
| |
Everything should now work again.
See the comments for the .h files mass checkin (e.g. pystate.h) for
more detail.
|
|
|
|
| |
properly declared in Python.h.
|
| |
|