summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Patch 550804: Make os.environ.copy() return a copy.Martin v. Löwis2002-05-021-0/+4
|
* Added regression tests for xrange object attributes.Fred Drake2002-05-021-0/+23
| | | | See SF bug #551285.
* Fix attribute access for the xrange objects. The tp_getattr and tp_getattroFred Drake2002-05-021-31/+38
| | | | | | handlers were both set, but were not compatible. This change uses only the tp_getattro handler with a more "modern" approach. This fixes SF bug #551285.
* Correct Moshe's e-mail addressAndrew M. Kuchling2002-05-021-8/+6
| | | | | | Point to PEP 100 for MAL's Unicode proposal Fix URL for XML HOWTO Bump version number
* Note that NameError's message also changed in 2.0Andrew M. Kuchling2002-05-021-8/+10
|
* Message for NameError has changedAndrew M. Kuchling2002-05-021-1/+1
|
* clarify message when raising TypeError to indicate that float() acceptsSkip Montanaro2002-05-021-1/+1
| | | | strings or numbers
* Guard gettext and friends with HAVE_LIBINTL_H. Fixes #549907.Martin v. Löwis2002-05-021-1/+1
|
* Correct information on support for repietition & concatenation for bufferFred Drake2002-05-021-6/+8
| | | | | and xrange objects. This closes SF bug #550555.
* Buffer-object repitition and concatenation has worked all along; add a testFred Drake2002-05-021-0/+6
| | | | to make avoid regression.
* Added some notes on setting up the documentation tools on Cygwin.Fred Drake2002-05-011-0/+40
|
* Added more style for major warnings.Fred Drake2002-05-011-0/+9
|
* Pickler_clear_memo(): convert to METH_NOARGS.Fred Drake2002-05-011-5/+2
|
* Add Pickler.clear_memo() so the pickle and cPickle modules are more similar.Fred Drake2002-05-013-4/+15
|
* list_documented_items(): Basic implementation.Fred Drake2002-05-011-4/+33
| | | | | This still does not work well since ctags does not do a good job with the Python headers, appearantly due to the DL_IMPORT macro. ;-(
* Explain what os.read() returns at end of file.Fred Drake2002-05-011-1/+3
| | | | This closes SF bug #550409. Applying to release21-maint & release22-maint.
* Add missing right-parenthesis.Fred Drake2002-05-011-1/+1
|
* Watch out for older XEmacsen for which requiring info-look doesn'tBarry Warsaw2002-04-301-8/+11
| | | | define info-lookup-maybe-add-help.
* moved from Tools/scripts (was only at rev 1.1 - no changes yet - so I simplySkip Montanaro2002-04-301-0/+128
| | | | removed it from there and added it here)
* moving into the Doc/tools directorySkip Montanaro2002-04-301-128/+0
|
* Add a note about when the "%r" formatting code was added.Fred Drake2002-04-301-0/+1
|
* add enumobject.c to build machineryAndrew MacIntyre2002-04-301-2/+3
|
* Fred's recent changes to support "-u all" resulted in subset resourceAndrew MacIntyre2002-04-301-1/+1
| | | | selections (eg "-u network") being ignored.
* add enumobject.c to build machineryAndrew MacIntyre2002-04-301-0/+4
|
* Added a missing "|" in the grammar productions used in the reference manualFred Drake2002-04-301-7/+9
| | | | | | | (reported by François Pinard). Added some missing "_" characters in the same cluster of productions. Added missing floor division operator in m_expr production, and mention floor division in the relevant portion of the text.
* builtin_zip(): Take a good guess at how big the result list will be,Tim Peters2002-04-292-15/+70
| | | | | | | and allocate it in one gulp. This isn't a bugfix, it's just a minor optimization that may or may not pay off.
* Typo: whcar_t should be wchar_t.Thomas Heller2002-04-291-4/+4
| | | | Bugfix candidate? Don't know how this is handled in the docs.
* Add some items, and remove a note to myselfAndrew M. Kuchling2002-04-291-7/+7
|
* Small markup adjustments for consistency.Fred Drake2002-04-291-2/+2
|
* See discussion at SF bug 547537.Guido van Rossum2002-04-291-1/+1
| | | | | | | | | | | Unicode objects are currently taken as binary data by the write() method. This is not what Unicode users expect, nor what the StringIO.py code does. Until somebody adds a way to specify binary or text mode for cStringIO objects, change the format string to use "t#" instead of "s#", so that it will request the "text buffer" version. This will try the default encoding for Unicode objects. This is *not* a 2.2 bugfix (since it *is* a semantic change).
* Mostly in SequenceMatcher.{__chain_b, find_longest_match}:Tim Peters2002-04-293-34/+84
| | | | | | | | | | | | This now does a dynamic analysis of which elements are so frequently repeated as to constitute noise. The primary benefit is an enormous speedup in find_longest_match, as the innermost loop can have factors of 100s less potential matches to worry about, in cases where the sequences have many duplicate elements. In effect, this zooms in on sequences of non-ubiquitous elements now. While I like what I've seen of the effects so far, I still consider this experimental. Please give it a try!
* Just added comments, and cleared some XXX questions, related to intTim Peters2002-04-281-3/+12
| | | | memory management.
* _PyObject_DebugCheckAddress(): If the leading pad bytes are corrupt,Tim Peters2002-04-281-18/+25
| | | | | display a msg warning that the count of bytes requested may be bogus, and that a segfault may happen next.
* Moving pymalloc along.Tim Peters2002-04-282-112/+131
| | | | | | | | | | 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.
* _PyObject_GC_New: Could call PyObject_INIT with a NULL 1st argument.Tim Peters2002-04-281-2/+6
| | | | | | _PyObject_GC_NewVar: Could call PyObject_INIT_VAR likewise. Bugfix candidate.
* Repair widespread misuse of _PyString_Resize. Since it's clear peopleTim Peters2002-04-2714-90/+54
| | | | | | | | | | | | | | | | | | | | | | don't understand how this function works, also beefed up the docs. The most common usage error is of this form (often spread out across gotos): if (_PyString_Resize(&s, n) < 0) { Py_DECREF(s); s = NULL; goto outtahere; } The error is that if _PyString_Resize runs out of memory, it automatically decrefs the input string object s (which also deallocates it, since its refcount must be 1 upon entry), and sets s to NULL. So if the "if" branch ever triggers, it's an error to call Py_DECREF(s): s is already NULL! A correct way to write the above is the simpler (and intended) if (_PyString_Resize(&s, n) < 0) goto outtahere; Bugfix candidate.
* SF patch 549375: Compromise PyUnicode_EncodeUTF8Tim Peters2002-04-271-108/+70
| | | | | | | | | | | | | | | | | | | | This implements ideas from Marc-Andre, Martin, Guido and me on Python-Dev. "Short" Unicode strings are encoded into a "big enough" stack buffer, then exactly as much string space as they turn out to need is allocated at the end. This should have speed benefits akin to Martin's "measure once, allocate once" strategy, but without needing a distinct measuring pass. "Long" Unicode strings allocate as much heap space as they could possibly need (4 x # Unicode chars), and do a realloc at the end to return the untouched excess. Since the overallocation is likely to be substantial, this shouldn't burden the platform realloc with unusably small excess blocks. Also simplified uses of the PyString_xyz functions. Also added a release- build check that 4*size doesn't overflow a C int. Sooner or later, that's going to happen.
* Teach the Windows build about the new enumobject.c file.Tim Peters2002-04-261-0/+15
|
* Slightly expand and clarify the differences between getegid(), getgid(),Fred Drake2002-04-261-6/+9
| | | | | getpgrp(), and setpgid(). This closes SF bug #547939.
* Be more consistent, both internally and with recommended practice.Fred Drake2002-04-261-4/+2
| | | | This closes SF bug #547953.
* Documentation for the enumerate() function/type.Fred Drake2002-04-262-0/+55
| | | | This closes SF patch #547162.
* Clarify that the strip changes also apply to Unicode.Guido van Rossum2002-04-261-3/+3
|
* - New builtin function enumerate(x), from PEP 279. Example:Guido van Rossum2002-04-267-0/+281
| | | | | enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c"). The argument can be an arbitrary iterable object.
* (py-comint-output-filter-function): Put the pop-to-buffer call insideBarry Warsaw2002-04-261-1/+1
| | | | | the `when' condition so other non-Python shell comint changes won't cause random buffers to pop.
* PyNumber_CoerceEx: this took a shortcut (not doing anything) when theGuido van Rossum2002-04-262-1/+8
| | | | | | | | | | | | | | | | | | | | | left and right type were of the same type and not classic instances. This shortcut is dangerous for proxy types, because it means that coerce(Proxy(1), Proxy(2.1)) leaves Proxy(1) unchanged rather than turning it into Proxy(1.0). In an ever-so-slight change of semantics, I now only take the shortcut when the left and right types are of the same type and don't have the CHECKTYPES feature. It so happens that classic instances have this flag, so the shortcut is still skipped in this case (i.e. nothing changes for classic instances). Proxies also have this flag set (otherwise implementing numeric operations on proxies would become nightmarish) and this means that the shortcut is also skipped there, as desired. It so happens that int, long and float also have this flag set; that means that e.g. coerce(1, 1) will now invoke int_coerce(). This is fine: int_coerce() can deal with this, and I'm not worried about the performance; int_coerce() is only invoked when the user explicitly calls coerce(), which should be rarer than rare.
* Clean up uses of some deprecated features.Fred Drake2002-04-263-17/+20
| | | | Reported by Neal Norwitz on python-dev.
* If Py_OptimizeFlag is false then always evaluate assert conditions, don'tNeil Schemenauer2002-04-262-15/+11
| | | | test __debug__ at runtime. Closes SF patch #548833.
* Make sure that tp_free frees the int the same way as tp_dealloc would.Guido van Rossum2002-04-261-0/+8
| | | | | | | | | This fixes the problem that Barry reported on python-dev: >>> 23000 .__class__ = bool crashes in the deallocator. This was because int inherited tp_free from object, which uses the default allocator. 2.2. Bugfix candidate.
* Fix typo in the setup of interpreter-mode-alist.Barry Warsaw2002-04-251-1/+1
|
* SF patch #510288 by Kevin J. Butler, mod'd by Barry. This providesBarry Warsaw2002-04-251-7/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | better auto-recognition of a Jython file vs. a CPython (or agnostic) file by looking at the #! line more closely, and inspecting the import statements in the first 20000 bytes (configurable). Specifically, (py-import-check-point-max): New variable, controlling how far into the buffer it will search for import statements. (py-jpython-packages): List of package names that are Jython-ish. (py-shell-alist): List of #! line programs and the modes associated with them. (jpython-mode-hook): Extra hook that runs when entering jpython-mode (what about Jython mode? <20k wink>). (py-choose-shell-by-shebang, py-choose-shell-by-import, py-choose-shell): New functions. (python-mode): Use py-choose-shell. (jpython-mode): New command. (py-execute-region): Don't use my previous hacky attempt at doing this, use the new py-choose-shell function. One other thing this file now does: it attempts to add the proper hooks to interpreter-mode-alist and auto-mode-alist if they aren't already there. Might help with Emacs users since that editor doesn't come with python-mode by default.