summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Keep tabnanny happy.Guido van Rossum2001-09-191-1/+1
|
* Fixed search function error reporting in the encodings packageMarc-André Lemburg2001-09-191-7/+11
| | | | | | | | __init__.py module to raise errors which can be catched as LookupErrors as well as SystemErrors. Modified the error messages to include more information about the failing module.
* Docs and News item for the codecs.py additions.Marc-André Lemburg2001-09-192-0/+36
|
* Added new helpers for easy access to codecs. Docs will follow.Marc-André Lemburg2001-09-191-0/+42
|
* Fix for bug #462737.Marc-André Lemburg2001-09-191-3/+3
|
* Include ctype.h after Python.h.Martin v. Löwis2001-09-191-1/+1
|
* Patch to bug #461753: Allow None in ExternalEntityParserCreate.Martin v. Löwis2001-09-191-1/+1
|
* Patch to bug #461754: CDATA should not undergo entity subst.Martin v. Löwis2001-09-191-1/+1
|
* Add additional coercion support for "self subtypes" to int, long,Guido van Rossum2001-09-194-1/+50
| | | | float (compare the recent checkin to complex). Added tests for these.
* Enable two checks for comparing a complex to a complex subtypeGuido van Rossum2001-09-191-3/+4
| | | | | | | | | instance. Split a string comparison test in two halves, replacing "a==b==a" with separate tests for a==b and b==a. (Reason: while experimenting, this test failed, and I wanted to know if it was the first or the second == operator that failed.)
* complex_coerce(): add explicit PyComplex_Check() test. Previously,Guido van Rossum2001-09-191-0/+5
| | | | | | | | complex_coerce() would never be called with a complex argument, because PyNumber_Coerce[Ex] doesn't bother calling the type's coercion method if the values already have the same type. But now, of course, it's possible to pass an instance of a complex *subtype*, and those must be accepted.
* Enable some comparison tests that failed before. Still having problemsTim Peters2001-09-181-3/+3
| | | | with subsclasses of complex and string.
* Add a similar test for rich comparisons.Guido van Rossum2001-09-181-1/+67
|
* fixed #449964: sre.sub raises an exception if the template contains aFredrik Lundh2001-09-184-21/+30
| | | | | | \g<x> group reference followed by a character escape (also restructured a few things on the way to fixing #449000)
* Hopefully fix 3-way comparisons. This unfortunately adds yet anotherGuido van Rossum2001-09-184-6/+53
| | | | | | | | hack, and it's even more disgusting than a PyInstance_Check() call. If the tp_compare slot is the slot used for overrides in Python, it's always called. Add some tests that show what should work too.
* Get rid of a superfluous space after "--" in the message printed for aGuido van Rossum2001-09-181-2/+1
| | | | skipped test -- the print command already supplies a space.
* [Patch #462258] On Cygwin, don't build Tkinter unless the X header filesAndrew M. Kuchling2001-09-181-0/+7
| | | | can be found.
* Fix typo in commentAndrew M. Kuchling2001-09-181-1/+1
|
* Properly repr classes without module names.Martin v. Löwis2001-09-181-1/+1
|
* Test for the safety check in wrap_cmpfunc().Guido van Rossum2001-09-181-0/+15
|
* wrap_cmpfunc(): added a safety check for the __cmp__ wrapper. We canGuido van Rossum2001-09-181-0/+9
| | | | | | only safely call a type's tp_compare slot if the second argument is also an instance of the same type. I hate to think what e.g. int_compare() would do with a second argument that's a float!
* an SRE bugfix a day keeps Guido away...Fredrik Lundh2001-09-183-13/+25
| | | | | | | #462270: sub-tle difference between pre.sub and sre.sub. PRE ignored an empty match at the previous location, SRE didn't. also synced with Secret Labs "sreopen" codebase.
* Fix minor usage and consistency nits.Fred Drake2001-09-181-4/+5
|
* All the news that fits, we print.Guido van Rossum2001-09-181-4/+58
| | | | (Went through the logs looking for nuggets. This is what I found.)
* SF bug #417176 (Martijn Pieters): MultiFile.read() includes CRLFGuido van Rossum2001-09-181-1/+13
| | | | | | | | | boundary. Fixed by keeping a readahead buffer containing the next line. XXX We have no test suite for this. Maybe the new email package will help?
* softspace(): be prepared to catch AttributeError as well as TypeErrorGuido van Rossum2001-09-181-1/+2
| | | | upon attempted attribute assignment. Caught by MWH, SF bug #462522.
* This module didn't work at all anymore -- blew up with AttributeErrorTim Peters2001-09-181-2/+6
| | | | | | | on file.__methods__. Since the docs say "This module will become obsolete in a future release", this is just a quick hack to stop it from blowing up. If you care about this module, test it! It doesn't make much sense on Windows.
* Undo some (but not all) of the more lenient acceptance ofGuido van Rossum2001-09-181-9/+9
| | | | (AttributeError, TypeError) -- the leniency wasn't needed everywhere.
* Redo the PyMethod attributes using a dir()-friendly approach, creatingGuido van Rossum2001-09-181-37/+69
| | | | | | | | | | | | | | | | | descriptors for each attribute. The getattr() implementation is similar to PyObject_GenericGetAttr(), but delegates to im_self instead of looking in __dict__; I couldn't do this as a wrapper around PyObject_GenericGetAttr(). XXX A problem here is that this is a case of *delegation*. dir() doesn't see exactly the same attributes that are actually defined; e.g. if the delegate is a Python function object, it supports attributes like func_code etc., but these are not visible to dir(); on the other hand, dynamic function attributes (stored in the function's __dict__) *are* visible to dir(). Maybe we need a mechanism to tell dir() about the delegation mechanism? I vaguely recall seeing a request in the newsgroup for a more formal definition of attribute delegation too. Sigh, time for a new PEP.
* - Some tests that check that assignments are not allowed expect thisGuido van Rossum2001-09-181-85/+95
| | | | | | | | | | | | | | | | to raise TypeError. In practice, a disallowed attribute assignment can raise either TypeError or AttributeError (and it's unclear which is better). So allow either. (Yes, this is in anticipation of a code change that switches the exception raised. :-) - Add a utility function, cantset(), which verifies that setting a particular attribute to a given value is disallowed, and also that deleting that same attribute is disallowed. Use this in the test_func_*() tests. - Add a new set of tests that test conformance of various instance method attributes. (Also in anticipation of code that changes their implementation.)
* Sort the headers in PYTHON_HEADERS alphabetically. AddGuido van Rossum2001-09-181-31/+32
| | | | | | structmember.h, which was missing (and caused me a snide comment by Tim when he fixed something I missed because of the missed dependency :-).
* Whitespace normalization.Tim Peters2001-09-188-21/+18
|
* Make test_socketserver require the network resource.Tim Peters2001-09-182-0/+3
| | | | Add it back to the list of tests we expect to skip on Windows.
* I don't expect test_socketserver to get skipped on Windows anymore.Tim Peters2001-09-181-1/+0
|
* type_new(): Didn't compile anymore, due to change in struct memberlistTim Peters2001-09-181-1/+1
| | | | definition. Guido, what else did you forget to check in <wink>?
* Rework akin to test_threaded_import, so that this can run under regrtest.Tim Peters2001-09-171-7/+8
| | | | | Also raise TestSkipped (intead of appearing to fail) if the import lock is held.
* Rewrite function attributes to use the generic routines properly.Guido van Rossum2001-09-172-73/+276
| | | | | This uses the new "restricted" feature of structmember, and getset descriptors for some of the type checks.
* Track changes to compiler APIJeremy Hylton2001-09-172-9/+15
|
* API change:Jeremy Hylton2001-09-176-20/+218
| | | | | | | | | | | | | | | | | | compile() becomes replacement for builtin compile() compileFile() generates a .pyc from a .py both are exported in __init__ compiler.parse() gets optional second argument to specify compilation mode, e.g. single, eval, exec Add AbstractCompileMode as parent class and Module, Expression, and Interactive as concrete subclasses. Each corresponds to a compilation mode. THe AbstractCompileMode instances in turn delegate to CodeGeneration subclasses specialized for their particular functions -- ModuleCodeGenerator, ExpressionCodeGeneration, InteractiveCodeGenerator.
* Re-created after change to astgen to calculate hardest_arg correctlyJeremy Hylton2001-09-172-1154/+1206
|
* Fix calculation of hardest_arg.Jeremy Hylton2001-09-172-6/+6
| | | | | | | | | The argument properties are ordered from easiest to hardest. The harder the arg, the more complicated that code that must be generated to return it from getChildren() and/or getChildNodes(). The old calculation routine was bogus, because it always set hardest_arg to the hardness of the last argument. Now use max() to always set it to the hardness of the hardest argument.
* Last set of change to get regression tests to passJeremy Hylton2001-09-176-10/+20
| | | | | | | | | | | Remove the only test in the syntax module. It ends up that the transformer must handle this error case. In the transformer, check for a list compression in com_assign_list() by looking for a list_for node where a comma is expected. In pycodegen.compile() re-raise the SyntaxError rather than catching it and exiting
* Add support for restricting access based on restricted execution mode.Guido van Rossum2001-09-172-7/+22
| | | | | | Renamed the 'readonly' field to 'flags' and defined some new flag bits: READ_RESTRICTED and WRITE_RESTRICTED, as well as a shortcut RESTRICTED that means both.
* Add -p option to invoke Python profilerJeremy Hylton2001-09-171-5/+11
|
* Only print attributes that start with co_.Jeremy Hylton2001-09-171-1/+6
| | | | | If passed a .py file as an argument, try to find its accompanying .pyc.
* Handle more syntax errors.Jeremy Hylton2001-09-174-58/+154
| | | | | | | | Invoke compiler.syntax.check() after building AST. If a SyntaxError occurs, print the error and exit without generating a .pyc file. Refactor code to use compiler.misc.set_filename() rather than passing filename argument around to each CodeGenerator instance.
* Add utility to set filename attribute on all nodesJeremy Hylton2001-09-172-0/+18
|
* Brian Quinlan's XML-RPC server framework.Fredrik Lundh2001-09-171-0/+254
|
* support true divisionJeremy Hylton2001-09-172-2/+6
|
* [Patch #462255, from Jason Tishler] Re-enables building the resouceAndrew M. Kuchling2001-09-172-3/+3
| | | | module on the Cygwin platform.