- 22 Apr, 2002 15 commits
-
-
Walter Dörwald authored
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.
-
Barry Warsaw authored
"help-on-symbol-at-point" feature which uses pydoc to provide help on the symbol under point, if available. Mods include some name changes, a port to Emacs, binding the command to C-c C-h, and providing a more informative error message if the symbol's help can't be found (through use of a nasty bare except). Note also that py-describe-mode has been moved off of C-c C-h m; it's now just available on C-c ? Closes SF patch #545439.
-
Barry Warsaw authored
#! line, use the command on that line as the shell command to use to execute the region. I.e. if the region looks like ---------------- #! /usr/bin/env python1.5 print 'hello world'.startswith('hello') ---------------- you'll get an exception! :) This closes SF bug #232398.
-
Barry Warsaw authored
python-mode file, py-which-shell would have been nil and the command to use would not get set correctly. This changes things so that 1) the temporary file has a .py extension, 2) the temporary file is put into python-mode, and 3) the temporary file's py-which-shell is captured in a local `shell' variable, which is used to calculate the command to use. Closes SF bug #545436. (py-parse-state): Rip out the XEmacs-specific calls to buffer-syntactic-context, which can get quite confused if there's an open paren in column zero say, embedded in a triple quoted string. This was always a performance hack anyway, and computers are fast enough now that we should be able to get away with the slower, more portable, full-parse branch. Closes SF bug #451841. Update the comments at the top of the file.
-
Jack Jansen authored
-
Jack Jansen authored
- islink() now returns true for alias files - walk() no longer follows aliases while traversing - realpath() implemented, returning an alias-free pathname. As this could conceivably break existing code I think it isn't a bugfix candidate.
-
Jack Jansen authored
Bugfix candidate.
-
Jack Jansen authored
Bugfix candidate.
-
Jack Jansen authored
Bugfix candidate.
-
Neil Schemenauer authored
-
Neil Schemenauer authored
-
Tim Peters authored
+ 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.
-
Steven M. Gava authored
Provisional fix for writefile() [SF bug # 541730]
-
Tim Peters authored
-
Steven M. Gava authored
Patch #540583: Open MS Help Docs if available.
-
- 21 Apr, 2002 11 commits
-
-
Neal Norwitz authored
-
Tim Peters authored
-
Tim Peters authored
tried to catch some possible arithmetic overflows in the debug build.
-
Neal Norwitz authored
-
Martin v. Löwis authored
-
Tim Peters authored
-
Tim Peters authored
+ 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.
-
Tim Peters authored
test data: this test fails on WIndows now if universal newlines are enabled (which they aren't yet, by default). I don't know whether the test will also fail on Linux now.
-
Tim Peters authored
displays a recognizable section title (there are extra blanks at the end of it now, due to the nested anchor, but that's fine).
-
Tim Peters authored
pointers is a signed type. Changing "allocated" to a signed int makes undetected overflow more likely, but there was no overflow detection before either.
-
Tim Peters authored
but is documented by others on the web, and the defn of the magic flag needed appears in MS's htmlhelp.h header file.
-
- 20 Apr, 2002 13 commits
-
-
Tim Peters authored
distinct top-level node. Before they were all nested under an artificial top-level node, uselessly chewing up horizontal space, and ensuring that the only thing the user saw in the TOC upon opening the file was a single collapsed top-level folder.
-
Tim Peters authored
HTML (or, at least, proper in its view). The TOC file is now identical to what the HTML compiler itself generates, except for whitespace and a glitch identified below. The pretty-printing done by prechm.py is pretty much destroyed for now; if you need it pretty-printed, just make the Help Compiler save the files (it's got its own idea of pretty- printing anyway). Glitch: The title of Ref Man "2.1.6 Blank lines" shows up as a blank for now. This is because the relevant entry in ref/index.html contains nested anchors, and pychm really has no idea what to do with that. I hacked it for now to avoid any error messages or worse insanity, and filed a bug report against the docs.
-
Neal Norwitz authored
-
Martin v. Löwis authored
allocating the target buffer.
-
Tim Peters authored
methods to squash code duplication. Simplified several overly complex chunks of logic. Built output strings more with string interpolation instead of infix '+'. Added comments. Exploited recent Python features (chiefly bool and augmented assignment).
-
Martin v. Löwis authored
Fixes #494762.
-
Jeremy Hylton authored
Related to SF bug #505315
-
Jeremy Hylton authored
PyFrame_FastToLocals() and PyFrame_LocalsToFast() had a return if f_nlocals was 0. I think this was a holdover from the pre 2.1 days when regular locals were the only kind of local variables. The change makes it possible to use a free variable in eval or exec if it the variable is also used elsewhere in the same block, which is what the documentation says.
-
Tim Peters authored
to reference fields via names instead of meaningless little integers. This turned up one case where the wrong little integer was being used, in informative progress output. Fixed that too.
-
Tim Peters authored
-
Tim Peters authored
-
Tim Peters authored
-
Tim Peters authored
-
- 19 Apr, 2002 1 commit
-
-
Jeremy Hylton authored
SF bug #522264 reported by Evelyn Mitchell. The code included a comment about "STAR STAR" which was translated into the code as the bogus attribute token.STARSTAR. This name never caused an attribute error because it was never retrieved. The code was based on an old version of the grammar that specified kwargs as two tokens ('*' '*'). I checked as far back as 2.1 and didn't find this production. The fix is simple, because token.DOUBLESTAR is the only token allowed. Also update the grammar fragment in com_arglist(). XXX I'll bet lots of other grammar fragments in comments are out of date, probably in this module and in compile.c.
-