- 04 Haz, 2002 1 kayıt (commit)
-
-
Jason Tishler yazdı
This patch complies with the following request found near the top of configure.in: # This is for stuff that absolutely must end up in pyconfig.h. # Please use pyport.h instead, if possible. I tested this patch under Cygwin, Win32, and Red Hat Linux. Python built and ran successfully on each of these platforms.
-
- 29 May, 2002 2 kayıt (commit)
-
-
Neal Norwitz yazdı
that are in the process of deprecation (PendingDeprecationWarning). Docs could be improved.
-
Marc-André Lemburg yazdı
-
- 27 May, 2002 1 kayıt (commit)
-
-
Michael W. Hudson yazdı
-
- 24 May, 2002 3 kayıt (commit)
-
-
Guido van Rossum yazdı
for 'str' and 'unicode', and can be used instead of types.StringTypes, e.g. to test whether something is "a string": isinstance(x, string) is True for Unicode and 8-bit strings. This is an abstract base class and cannot be instantiated directly.
-
Guido van Rossum yazdı
The old syntax suggested that a trailing comma was OK inside backticks, but in fact (due to ideosyncrasies of pgen) it was not. Fix the grammar to avoid the ambiguity. Fred: you may want to update the refman.
-
Guido van Rossum yazdı
are disabled.
-
- 15 May, 2002 2 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
Jason Tishler yazdı
This patch complies with the following request found near the top of configure.in: # This is for stuff that absolutely must end up in pyconfig.h. # Please use pyport.h instead, if possible. I tested this patch under Cygwin, Win32, and Red Hat Linux. Python built and ran successfully on each of these platforms.
-
- 08 May, 2002 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
Avoid checks for negative indices and duplicate checks for support of the sequence protocol.
-
- 04 May, 2002 1 kayıt (commit)
-
-
Neil Schemenauer yazdı
-
- 02 May, 2002 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 28 Nis, 2002 1 kayıt (commit)
-
-
Tim Peters yazdı
As threatened, PyMem_{Free, FREE} also invoke the object deallocator now when pymalloc is enabled (well, it does when pymalloc isn't enabled too, but in that case "the object deallocator" is plain free()). This is maximally backward-compatible, but it leaves a bitter aftertaste. Also massive reworking of comments.
-
- 26 Nis, 2002 1 kayıt (commit)
-
-
Guido van Rossum yazdı
enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c"). The argument can be an arbitrary iterable object.
-
- 22 Nis, 2002 2 kayıt (commit)
-
-
Walter Dörwald yazdı
http://www.python.org/sf/444708 This adds the optional argument for str.strip to unicode.strip too and makes it possible to call str.strip with a unicode argument and unicode.strip with a str argument.
-
Tim Peters yazdı
+ Redirect PyMem_{Del, DEL} to the object allocator's free() when pymalloc is enabled. Needed so old extensions can continue to mix PyObject_New with PyMem_DEL. + This implies that pgen needs to be able to see the PyObject_XYZ declarations too. pgenheaders.h now includes Python.h. An implication is that I expect obmalloc.o needs to get linked into pgen on non-Windows boxes. + When PYMALLOC_DEBUG is defined, *all* Py memory API functions now funnel through the debug allocator wrapper around pymalloc. This is the default in a debug build. + That caused compile.c to fail: it indirectly mixed PyMem_Malloc with raw platform free() in one place. This is verbotten.
-
- 21 Nis, 2002 1 kayıt (commit)
-
-
Tim Peters yazdı
+ Continued looping until n bytes in the buffer have been filled, not just when n bytes have been read from the file. This repairs the bug that f.readlines() only sucked up the first 8192 bytes of the file on Windows when universal newlines was enabled and f was opened in U mode (see Python-Dev -- this was the ultimate cause of the test_inspect.py failure). + Changed prototye to take a char* buffer (void* doesn't make much sense). + Squashed size_t vs int mismatches (in particular, besides the unsigned vs signed distinction, size_t may be larger than int). + Gets out under all error conditions now (it's possible for fread() to suffer an error even if it returns a number larger than 0 -- any "short read" is an error or EOF condition). + Rearranged and simplified declarations.
-
- 14 Nis, 2002 1 kayıt (commit)
-
-
Jack Jansen yazdı
Highlights: import and friends will understand any of \r, \n and \r\n as end of line. Python file input will do the same if you use mode 'U'. Everything can be disabled by configuring with --without-universal-newlines. See PEP278 for details.
-
- 13 Nis, 2002 1 kayıt (commit)
-
-
Tim Peters yazdı
Added code to call this when PYMALLOC_DEBUG is enabled, and envar PYTHONMALLOCSTATS is set, whenever a new arena is obtained and once late in the Python shutdown process.
-
- 12 Nis, 2002 6 kayıt (commit)
-
-
Tim Peters yazdı
PyMem_{Del, DEL} doesn't work yet (compilation problems). pyport.h: _PyMem_EXTRA is gone. pmem.h: Repaired comments. PyMem_{Malloc, MALLOC} and PyMem_{Realloc, REALLOC} now make the same x-platform guarantees when asking for 0 bytes, and when passing a NULL pointer to the latter. object.c: PyMem_{Malloc, Realloc} just call their macro versions now, since the latter take care of the x-platform 0 and NULL stuff by themselves now. pypcre.c, grow_stack(): So sue me. On two lines, this called PyMem_RESIZE to grow a "const" area. It's not legit to realloc a const area, so the compiler warned given the new expansion of PyMem_RESIZE. It would have gotten the same warning before if it had used PyMem_Resize() instead; the older macro version, but not the function version, silently cast away the constness. IMO that was a wrong thing to do, and the docs say the macro versions of PyMem_xyz are deprecated anyway. If somebody else is resizing const areas with the macro spelling, they'll get a warning when they recompile now too.
-
Tim Peters yazdı
all the same within the #ifdef WITH_PYMALLOC block.
-
Neil Schemenauer yazdı
it's enabled.
-
Neil Schemenauer yazdı
it's enabled. Allow PyObject_Del, PyObject_Free, and PyObject_GC_Del to be used as function designators. Provide source compatibility macros. Make PyObject_GC_Track and PyObject_GC_UnTrack functions instead of trivial macros wrapping functions.
-
Neil Schemenauer yazdı
-
Tim Peters yazdı
-
- 11 Nis, 2002 2 kayıt (commit)
-
-
Jack Jansen yazdı
-
Jack Jansen yazdı
-
- 06 Nis, 2002 1 kayıt (commit)
-
-
Mark Hammond yazdı
Add standard header preamble and footer, a-la intobject.h. Main purpose is extern "C" for C++ programs.
-
- 04 Nis, 2002 1 kayıt (commit)
-
-
Guido van Rossum yazdı
permission from Paul Everitt). Also removed a few other references to Digital Creations and changed the remaining ones to Zope Corporation.
-
- 03 Nis, 2002 2 kayıt (commit)
-
-
Guido van Rossum yazdı
-
Guido van Rossum yazdı
PEP 285. Everything described in the PEP is here, and there is even some documentation. I had to fix 12 unit tests; all but one of these were printing Boolean outcomes that changed from 0/1 to False/True. (The exception is test_unicode.py, which did a type(x) == type(y) style comparison. I could've fixed that with a single line using issubtype(x, type(y)), but instead chose to be explicit about those places where a bool is expected. Still to do: perhaps more documentation; change standard library modules to return False/True from predicates.
-
- 01 Nis, 2002 1 kayıt (commit)
-
-
Tim Peters yazdı
This displays stats about the # of arenas, pools, blocks and bytes, to stderr, both used and reserved but unused. CAUTION: Because PYMALLOC_DEBUG is on, the debug malloc routine adds 16 bytes to each request. This makes each block appear two size classes higher than it would be if PYMALLOC_DEBUG weren't on. So far, playing with this confirms the obvious: there's a lot of activity in the "small dict" size class, but nothing in the core makes any use of the 8-byte or 16-byte classes.
-
- 30 Mar, 2002 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 29 Mar, 2002 1 kayıt (commit)
-
-
Tim Peters yazdı
-
- 28 Mar, 2002 3 kayıt (commit)
-
-
Neil Schemenauer yazdı
-
Tim Peters yazdı
fast, and just cluttered the code. Get rid of it for now. If a compelling case can be made for it, easy to restore it later.
-
Fred Drake yazdı
descriptor, as used for the tp_methods slot of a type. These new flag bits are both optional, and mutually exclusive. Most methods will not use either. These flags are used to create special method types which exist in the same namespace as normal methods without having to use tedious construction code to insert the new special method objects in the type's tp_dict after PyType_Ready() has been called. If METH_CLASS is specified, the method will represent a class method like that returned by the classmethod() built-in. If METH_STATIC is specified, the method will represent a static method like that returned by the staticmethod() built-in. These flags may not be used in the PyMethodDef table for modules since these special method types are not meaningful in that case; a ValueError will be raised if these flags are found in that context.
-
- 25 Mar, 2002 2 kayıt (commit)
-
-
Neal Norwitz yazdı
-
Neal Norwitz yazdı
-
- 23 Mar, 2002 1 kayıt (commit)
-
-
Tim Peters yazdı
When WITH_PYMALLOC is defined, define PYMALLOC_DEBUG to enable the debug allocator. This can be done independent of build type (release or debug). A debug build automatically defines PYMALLOC_DEBUG when pymalloc is enabled. It's a detected error to define PYMALLOC_DEBUG when pymalloc isn't enabled. Two debugging entry points defined only under PYMALLOC_DEBUG: + _PyMalloc_DebugCheckAddress(const void *p) can be used (e.g., from gdb) to sanity-check a memory block obtained from pymalloc. It sprays info to stderr (see next) and dies via Py_FatalError if the block is detectably damaged. + _PyMalloc_DebugDumpAddress(const void *p) can be used to spray info about a debug memory block to stderr. A tiny start at implementing "API family" checks isn't good for anything yet. _PyMalloc_DebugRealloc() has been optimized to do little when the new size is <= old size. However, if the new size is larger, it really can't call the underlying realloc() routine without either violating its contract, or knowing something non-trivial about how the underlying realloc() works. A memcpy is always done in this case. This was a disaster for (and only) one of the std tests: test_bufio creates single text file lines up to a million characters long. On Windows, fileobject.c's get_line() uses the horridly funky getline_via_fgets(), which keeps growing and growing a string object hoping to find a newline. It grew the string object 1000 bytes each time, so for a million-character string it took approximately forever (I gave up after a few minutes). So, also: fileobject.c, getline_via_fgets(): When a single line is outrageously long, grow the string object at a mildly exponential rate, instead of just 1000 bytes at a time. That's enough so that a debug-build test_bufio finishes in about 5 seconds on my Win98SE box. I'm curious to try this on Win2K, because it has very different memory behavior than Win9X, and test_bufio always took a factor of 10 longer to complete on Win2K. It *could* be that the endless reallocs were simply killing it on Win2K even in the release build.
-