- 15 Jan, 2001 27 commits
-
-
Barry Warsaw authored
-
Barry Warsaw authored
-
Barry Warsaw authored
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.
-
Barry Warsaw authored
Closes SF patch #103123. Regression test for function attributes, with output file.
-
Barry Warsaw authored
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.
-
Guido van Rossum authored
-
Guido van Rossum authored
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...
-
Guido van Rossum authored
dogfort). - Don't drop the data argument when calling open_https() from the authentication error handler.
-
Fredrik Lundh authored
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...)
-
Guido van Rossum authored
Its base class ValueError can be raised too, so catch that.
-
Barry Warsaw authored
-
Barry Warsaw authored
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.
-
Guido van Rossum authored
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. :-)
-
Guido van Rossum authored
-
Guido van Rossum authored
-
Guido van Rossum authored
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.
-
Andrew M. Kuchling authored
to the Distutils-SIG and archived at http://mail.python.org/pipermail/distutils-sig/2000-November/001755.html
-
Jack Jansen authored
-
Guido van Rossum authored
"smallest patch ever".
-
Fredrik Lundh authored
by compiler/engine mismatches
-
Tim Peters authored
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 ...).
-
Tim Peters authored
platforms. See NEWS for details.
-
Tim Peters authored
-
Tim Peters authored
-
Tim Peters authored
-
Tim Peters authored
-
Tim Peters authored
-
- 14 Jan, 2001 13 commits
-
-
Fredrik Lundh authored
(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...
-
Tim Peters authored
-
Tim Peters authored
-
Guido van Rossum authored
- Conform to standard coding style in a few more places.
-
Guido van Rossum authored
- 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 :-).
-
Guido van Rossum authored
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/.)
-
Guido van Rossum authored
-
Jack Jansen authored
-
Jack Jansen authored
-
Tim Peters authored
-
Guido van Rossum authored
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.
-
Fredrik Lundh authored
-
Tim Peters authored
-