summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add a NEWS item about function attributes.Barry Warsaw2001-01-151-0/+6
|
* Committing PEP 232, function attribute feature, approved by Guido.Barry Warsaw2001-01-153-15/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes SF patch #103123. funcobject.h: PyFunctionObject: add the func_dict slot. funcobject.c: PyFunction_New(): Initialize the func_dict slot to NULL. func_getattr(): Rename to func_getattro() and change the signature. It's more efficient to use attro methods and dig the C string out than it is to re-convert a C string to a PyString. Also, add support for getting the __dict__ (a.k.a. func_dict) attribute, and for getting an arbitrary function attribute. func_setattr(): Rename to func_setattro() and change the signature for the same reason. Also add support for setting __dict__ (a.k.a. func_dict) and any arbitrary function attribute. func_dealloc(): Be sure to DECREF the func_dict slot. func_traverse(): Be sure to traverse func_dict too. PyFunction_Type: make the necessary func_?etattro() changes. classobject.c: instancemethod_memberlist: Add __dict__ instancemethod_setattro(): New method to set arbitrary attributes on methods (really the underlying im_func). Raise TypeError when the instance is bound or when you're trying to set one of the reserved im_* attributes. instancemethod_getattr(): Renamed to instancemethod_getattro() since that's what it really is. Also, added support fo getting arbitrary attributes through the im_func. PyMethod_Type: Do the ?etattr{,o} dance.
* Committing PEP 232, function attribute feature, approved by Guido.Barry Warsaw2001-01-152-0/+103
| | | | | | Closes SF patch #103123. Regression test for function attributes, with output file.
* Document function attributes for both the function type and the methodBarry Warsaw2001-01-151-0/+38
| | | | | | type. The method documentation also includes a new brief discussion of `bound' vs. `unbound' and why setting an attr on a bound method is a TypeError. Includes Skip's suggested text.
* Add note about new and improved xrange().Guido van Rossum2001-01-151-0/+8
|
* SF patch #103158 by Greg Ball: Don't do unsafe arithmetic in xrangeGuido van Rossum2001-01-151-10/+80
| | | | | | | | | | | | | | | object. This fixes potential overflows in xrange()'s internal calculations on 64-bit platforms. The fix is complicated because the sq_length slot function can only return an int; we want to support xrange(sys.maxint), which is a 64-bit quantity on most 64-bit platforms (except Win64). The solution is hacky but the best possible: when the range is that long, we can use it in a for loop but we can't ask for its length (nor can we actually iterate beyond 2**31-1, because the sq_item slot function has the same restrictions on its arguments. Fixing those restrictions is a project for another day...
* - Make sure to quote the username and password (SF patch #103236 byGuido van Rossum2001-01-151-3/+3
| | | | | | | dogfort). - Don't drop the data argument when calling open_https() from the authentication error handler.
* from the really-stupid-bug department: uppercase literals should matchFredrik Lundh2001-01-152-6/+19
| | | | | | | uppercase strings also when the IGNORECASE flag is set (bug #128899) (also added test cases for recently fixed bugs to the regression suite -- or in other words, check in re_tests.py too...)
* mwh@sourceforge found that UnicodeError can be raised by compiling.Guido van Rossum2001-01-151-1/+1
| | | | Its base class ValueError can be raised too, so catch that.
* Fixing author's email address.Barry Warsaw2001-01-151-2/+2
|
* Committing patch #103216, autodetect of dbmmodule support and buildingBarry Warsaw2001-01-155-341/+484
| | | | | | of dbmmodule dynamically by default (otherwise it can pull in dependencies with libdb that croak pybsddb3). This change moves the Setup line for dbmmodule to Setup.config.in.
* Geoffrey Gerrietts discovered that a KeyError was caught that probablyGuido van Rossum2001-01-151-1/+1
| | | | | | should have been a NameError. I'm checking in a change that catches both, just to be sure -- I can't be bothered trying to understand this code any more. :-)
* Document changed default to passive mode.Guido van Rossum2001-01-151-1/+2
|
* Add note about ftplib defaulting to passive mode.Guido van Rossum2001-01-151-0/+7
|
* Default to passive mode. See SF bug #126851.Guido van Rossum2001-01-151-1/+1
| | | | | | This is slightly controversial, but after reading the argumentation in the bug tracker for and against, I believe this is the right solution. Let me know if it breaks for you, and how.
* Fix from Jack Jansen for the Mac and the Metrowerks compiler, postedAndrew M. Kuchling2001-01-153-6/+216
| | | | | to the Distutils-SIG and archived at http://mail.python.org/pipermail/distutils-sig/2000-November/001755.html
* Added a separate extension (.carbon.slb) for Carbon dynamic modules.Jack Jansen2001-01-151-0/+4
|
* Revert a change I accidentally checked in together with Ping'sGuido van Rossum2001-01-151-4/+1
| | | | "smallest patch ever".
* added "magic" number to the _sre module, to avoid weird errors causedFredrik Lundh2001-01-154-1/+21
| | | | by compiler/engine mismatches
* Speed getline_via_fgets(), by supplying two "fast paths", although one isTim Peters2001-01-151-54/+81
| | | | | | | | faster than the other. Should be faster for Mark Favas's 254-character mail log lines, and *is* 3-4% quicker for my test case with much shorter lines (but they're typical of *my* text files, and I'm tired of optimizing for everyone else at my expense <wink> -- in fact, the only one who loses here is Guido ...).
* Use the "MS" getline hack (fgets()) by default on non-get_unlockedTim Peters2001-01-152-35/+64
| | | | platforms. See NEWS for details.
* Whitespace normalization. Top level of Lib now fixed-point for reindent.py!Tim Peters2001-01-1512-432/+432
|
* Whitespace normalization.Tim Peters2001-01-159-515/+512
|
* Whitespace normalization.Tim Peters2001-01-1514-743/+743
|
* Whitespace normalization.Tim Peters2001-01-157-504/+504
|
* Whitespace normalization.Tim Peters2001-01-1517-3199/+3197
|
* -- don't use recursion for unbounded non-greedy repeatFredrik Lundh2001-01-142-3/+14
| | | | | | | | (bugs #115903, #115696) This is based on a patch by Darrel Gallion. I'm not 100% sure about this fix, but I haven't managed to come up with any test case it cannot handle...
* Whitespace normalization.Tim Peters2001-01-1418-1994/+1991
|
* Whitespace normalization.Tim Peters2001-01-1416-1235/+1233
|
* - Don't hardcode Unix filename syntax when opening ~/.pdbrc.Guido van Rossum2001-01-141-4/+4
| | | | - Conform to standard coding style in a few more places.
* - Use mimetypes.types_map to initialize extensions_map.Guido van Rossum2001-01-141-9/+9
| | | | | | - Change the default file type to application/octet-stream. - Add support to recognize .py, .c, .h files as text/plain (this is what I use most :-).
* SF Patch #103211.Guido van Rossum2001-01-141-4/+4
| | | | | | | | | Ping apparently doesn't check in Accepted patches, so I'm doing this for him. According to Ping: The name of the controller class should be "Konqueror", not "Konquerer". (See the website http://www.konqueror.org/.)
* Make the copyright message the same as for the "real" interpreter.Guido van Rossum2001-01-141-1/+2
|
* Config file for shared carbon Python.Jack Jansen2001-01-141-0/+52
|
* Added PythonCoreCarbon and PythonInterpreterCarbon targets.Jack Jansen2001-01-142-0/+0
|
* Whitespace normalization.Tim Peters2001-01-143-98/+98
|
* SF Patch #103232 by dougfort: Preserve Nonstandard Port Number in HostGuido van Rossum2001-01-141-1/+6
| | | | | | | | | | Header Dougfort's comments: httplib does not include ':port ' in the HTTP 1.1 'Host:' header. This causes problems if the server is not listening on Port 80. The test case I use is the login to /manage under Zope, with Zope listening on port 8080. Zope returns a <frameset> with the <frame> source URLs lacking the :8080.
* SRE: stricter pattern syntax checking (covers parts of bug #115900)Fredrik Lundh2001-01-141-7/+17
|
* Whitespace standardization.Tim Peters2001-01-146-535/+534
|
* reapplied Fred's "recommended style" patch...Fredrik Lundh2001-01-141-8/+8
|
* SRE fixes for 2.1 alpha:Fredrik Lundh2001-01-147-66/+104
| | | | | | | | | | -- added some more docstrings -- fixed typo in scanner class (#125531) -- the multiline flag (?m) should't affect the \Z operator (#127259) -- fixed non-greedy backtracking bug (#123769, #127259) -- added sre.DEBUG flag (currently dumps the parsed pattern structure) -- fixed a couple of glitches in groupdict (the #126587 memory leak had already been fixed by AMK)
* Document filterwarnings(..., append=<bool>).Guido van Rossum2001-01-141-2/+4
|
* - Added keyword argument 'append' to filterwarnings(); if true, thisGuido van Rossum2001-01-141-5/+10
| | | | | | | appends to list of filters instead of inserting at the front. This is useful to add a filter with a lower priority than -W options. - Cosmetic improvements to a docstring and an error message.
* Reverting a dumb experimental version I checked in by mistake.Tim Peters2001-01-141-9/+2
|
* SF bug 128713: type(mmap_object) blew up on Linux.Tim Peters2001-01-144-5/+16
|
* Added Jeffery Collins.Tim Peters2001-01-141-0/+1
|
* Fix a variety of minor nits and typos caught by Chris RylandFred Drake2001-01-141-7/+7
| | | | <cpr@emsoftware.com>.
* mwh: [ Patch #103228 ] traceback.py nit.Guido van Rossum2001-01-131-1/+5
| | | | | When the exception has no message, don't insert a colon after the exception name.
* SF Patch #103227 by mwh: make code.py appreciate softspaceGuido van Rossum2001-01-131-0/+14
|
* Neil discovered a bad DECREF on warnoptions, that caused repeatedGuido van Rossum2001-01-131-2/+1
| | | | | | 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.)