summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* _Py_PrintReferences(): Changed to print object address at start of eachTim Peters2003-04-173-3/+26
| | | | | | | | | | | | | | | new line. New pvt API function _Py_PrintReferenceAddresses(): Prints only the addresses and refcnts of the live objects. This is always safe to call, because it has no dependence on Python's C API. Py_Finalize(): If envar PYTHONDUMPREFS is set, call (the new) _Py_PrintReferenceAddresses() right before dumping final pymalloc stats. We can't print the reprs of the objects here because too much of the interpreter has been shut down. You need to correlate the addresses displayed here with the object reprs printed by the earlier PYTHONDUMPREFS call to _Py_PrintReferences().
* SF # 595026: support for masks in getargs.c.Thomas Heller2003-04-177-27/+596
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New functions: unsigned long PyInt_AsUnsignedLongMask(PyObject *); unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *); unsigned long PyLong_AsUnsignedLongMask(PyObject *); unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *); New and changed format codes: b unsigned char 0..UCHAR_MAX B unsigned char none ** h unsigned short 0..USHRT_MAX H unsigned short none ** i int INT_MIN..INT_MAX I * unsigned int 0..UINT_MAX l long LONG_MIN..LONG_MAX k * unsigned long none L long long LLONG_MIN..LLONG_MAX K * unsigned long long none Notes: * New format codes. ** Changed from previous "range-and-a-half" to "none"; the range-and-a-half checking wasn't particularly useful. New test test_getargs2.py, to verify all this.
* - New C API PyGC_Collect(), same as calling gc.collect().Guido van Rossum2003-04-174-2/+37
| | | | | - Call this in Py_Finalize(). - Expand the Misc/NEWS text on PY_LONG_LONG.
* Changes in support of PEP 269.Guido van Rossum2003-04-171-0/+5
|
* A missing piece of the PEP 269 patch: add PyParser_SetError(), aGuido van Rossum2003-04-171-0/+9
| | | | wrapper around err_input().
* Trimmed trailing whitespace.Tim Peters2003-04-171-10/+10
|
* Py_Finalize(): Reverted recent changes that tried to move theTim Peters2003-04-171-8/+11
| | | | | | | | PYTHONDUMPREFS output after most teardown. Attempts to use PYTHONDUMPREFS with the Zope3 test suite died with Py_FatalError(), since _Py_PrintReferences() can end up executing arbitrary Python code (for objects that override __repr__), and that requires an intact interpreter.
* Changes from Jonathan Riehl to allow his pgen extension (PEP 269) toGuido van Rossum2003-04-176-9/+60
| | | | | | work. This includes some more code that used to be part of pgen in the main parser; I'm okay with that. I'll see if the Windows build needs work next.
* Remove extra space in docstringNeal Norwitz2003-04-171-1/+1
|
* - The repr() of a weakref object now shows the __name__ attribute ofGuido van Rossum2003-04-162-6/+18
| | | | | | | the referenced object, if it has one. Also use %p to format pointers consistently, and use <weakproxy ...> in proxy_repr(), to match the type name.
* Support UCS-4 Tcl for UCS-4 Python builds. Fixes #719880.Martin v. Löwis2003-04-161-4/+8
|
* Add 'get' method to Variable and switch it from internal class toGuido van Rossum2003-04-161-1/+7
| | | | | standard class (it is now useful because it doesn't constrain the type of the value).
* - super() no longer ignores data descriptors, except __class__. SeeGuido van Rossum2003-04-161-1/+16
| | | | | the thread started at http://mail.python.org/pipermail/python-dev/2003-April/034338.html
* Sigh. The crucial change was still missing from the previousGuido van Rossum2003-04-161-1/+1
| | | | checkin. :-(
* For StringVar results to strings. Document that boolean things are ofMartin v. Löwis2003-04-162-4/+10
| | | | type bool. Requested in #721171.
* - super() no longer ignores data descriptors, except __class__. SeeGuido van Rossum2003-04-162-4/+14
| | | | | the thread started at http://mail.python.org/pipermail/python-dev/2003-April/034338.html
* Minor source formatting fixes.Raymond Hettinger2003-04-161-2/+2
|
* Mostly reformatting, splitting long lines, whitespace normalizationBarry Warsaw2003-04-161-33/+35
| | | | | | etc. Fixed one typo in the __main__ section.
* As discussed on python-dev, revised docs to note thatRaymond Hettinger2003-04-161-1/+8
| | | | | | | | PyObject_IsTrue() can have an error result. Also, added missing docs for PyObject_Not(). Will backport.
* Add version info for name2codepoint and codepoint2nameNeal Norwitz2003-04-161-2/+2
|
* When on MacOSX, and only in a framework build, addJack Jansen2003-04-161-0/+13
| | | | ~/Library/Python/2.3/site-packages to sys.path, if it exists.
* The identify() description didn't match the code. Fixed.Jack Jansen2003-04-161-1/+1
|
* Refer people to the help pages on failure to load the database.Jack Jansen2003-04-161-1/+3
|
* Added a note on getting 404 Not Found errors when loading the database.Jack Jansen2003-04-161-1/+11
|
* Added support for per-user installs.Jack Jansen2003-04-161-19/+71
| | | | | Don't show psuedo-packages by default, added a button to show them. Cleaned up interface a little (not enough, though).
* Allow switching of install dir after creation of preferences.Jack Jansen2003-04-161-7/+10
| | | | Changed some message to be clearer when presented by Package Manager.
* Add two dictionaries to htmlentitydefs: name2codepoint mapsWalter Dörwald2003-04-163-257/+289
| | | | | HTML entity names to Unicode codepoints (as integers). codepoint2name is the reverse mapping. From SF patch #722017.
* Fix three (!) object leaks in the code for assignment to __bases__.Guido van Rossum2003-04-151-1/+3
|
* Adapted GUI for per-user install. Doesn't do anything yet, thoughJack Jansen2003-04-151-14/+22
|
* Test SystemEvents too.Jack Jansen2003-04-151-1/+4
|
* Use object interface for global vars. Fixes #721171.Martin v. Löwis2003-04-151-127/+94
| | | | Also move complete processing of get/set/delvar calls to target thread.
* Ouch, it's Carlo Verre, not Verre Carlo.Guido van Rossum2003-04-152-6/+6
|
* Add a few errors tests for range().Walter Dörwald2003-04-151-0/+6
|
* Fix copy & paste error in comment.Walter Dörwald2003-04-151-1/+1
|
* Fix the test so that it works even when /etc/group has two entriesWalter Dörwald2003-04-151-1/+12
| | | | for the same gid.
* Fix the test so that it works even when /etc/passwd has two entriesWalter Dörwald2003-04-151-1/+12
| | | | for the same uid.
* - pythunrun.c, Py_Finalize(): move the call to _Py_PrintReferences()Guido van Rossum2003-04-155-17/+28
| | | | | | | | | | | | | | | | | | | 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.
* - Use the tarfile module to unpack tarfiles.Jack Jansen2003-04-151-62/+187
| | | | | | | | | - Allow setting the destination install directory. If this is set then it is used for the modules, other items (header files, etc) are not installed, and warnings are printed if the package would have liked to. Unfortunaltey binary installs seem broken due to a tarfile bug (#721871) or my misunderstanding of how tarfile works.
* test_range(): The C code changed to raise TypeError in one of theseTim Peters2003-04-151-1/+1
| | | | cases, but the test still expected ValueError. Repaired that.
* Move the call to _Py_PrintReferences() a bit further down. ThisGuido van Rossum2003-04-151-7/+12
| | | | | prevents it from showing stuff (like codec state) that is cleared when the interpreter state is cleared.
* Some errors from range() should be TypeError, not ValueError.Guido van Rossum2003-04-151-3/+3
|
* Port test_pwd.py to PyUnit. Check that getpwall() andWalter Dörwald2003-04-154-239/+319
| | | | | | | | | | | | getpwnam()/getpwuid() return consistent data. Change test_grp to check that getgrall() and getgrnam()/getgrgid() return consistent data. Add error checks similar to test_pwd.py. Port test___all__.py to PyUnit. From SF patch #662807.
* Extend SF patch #707257: Improve code generationRaymond Hettinger2003-04-151-8/+20
| | | | | | to cover the case for: "x,y,z=1,2,3". Gives a 30% speed-up. Also, added FOR_ITER to the list of opcodes that can jump.
* The date class is now properly subclassable. (SF bug #720908)Guido van Rossum2003-04-143-5/+16
| | | | | (This is only the tip of the iceberg; the time and datetime classes need the same treatment.)
* Close off the "Verre Carlo hack" as discussed on python-dev.Guido van Rossum2003-04-142-0/+39
|
* super_getattro(): kill some dead code; explain a mystery.Guido van Rossum2003-04-141-18/+4
|
* - list.insert(i, x) now interprets negative i as it would beGuido van Rossum2003-04-144-6/+20
| | | | | | interpreted by slicing, so negative values count from the end of the list. This was the only place where such an interpretation was not placed on a list index.
* Add a nameAndrew M. Kuchling2003-04-141-1/+2
|
* Prompted by Tim's comment, when handle_range_longs() sees anGuido van Rossum2003-04-141-9/+9
| | | | | unexpected type, report the actual type rather than 'float'. (It's hard to even reach this code with a float. :-)
* SF patch #720991 by Gary Herron:Guido van Rossum2003-04-147-4/+89
| | | | | | | A small fix for bug #545855 and Greg Chapman's addition of op code SRE_OP_MIN_REPEAT_ONE for eliminating recursion on simple uses of pattern '*?' on a long string.