summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Track removal of doc string from Module().nodes[0]Jeremy Hylton2001-08-182-14/+4
|
* Add Yield() nodeJeremy Hylton2001-08-182-0/+24
|
* Remove the horrid generators hack from doctest.py. This relies on aTim Peters2001-08-181-75/+37
| | | | | | | | | | | | | | | | | somewhat less horrid hack <wink>: if a module does from __future__ import X then the module dict D is left in a state such that (viewing X as a string) D[X] is getattr(__future__, X) So by examining D for all the names of future features, and making that test for each, we can make a darned good guess as to which future-features were imported by the module. The appropriate flags are then sucked out of the __future__ module, and passed on to compile()'s new optional arguments (PEP 264). Also gave doctest a meaningful __all__, removed the history of changes (CVS serves that purpose now), and removed the __version__ vrbl (similarly; before CVS, it was a reasonable clue, but not anymore).
* Add Yield() statement handlerJeremy Hylton2001-08-182-2/+22
| | | | Fix Module() handler to avoid including the doc string in the AST
* Fix for bug [#452230] future division isn't propagated.Tim Peters2001-08-172-1/+9
| | | | | | | builtin_eval wasn't merging in the compiler flags from the current frame; I suppose we never noticed this before because future division is the first future-feature that can affect expressions (nested_scopes and generators had only statement-level effects).
* The OSX framework Headers symlink pointed the wrong way. Fixed.Jack Jansen2001-08-171-1/+1
| | | | Bill Fancher found this one.
* A fiddled version of the rest of Michael Hudson's SF patchTim Peters2001-08-174-47/+157
| | | | | #449043 supporting __future__ in simulated shells which implements PEP 264.
* Use raw-unicode-escape for the tests that require it.Martin v. Löwis2001-08-172-3/+3
|
* Address SF bug #442813. The sequence getitem wrappers should doGuido van Rossum2001-08-171-8/+50
| | | | | | interpretation of negative indices, since neither the sq_*item slots nor the slot_ wrappers do this. (Slices are a different story, there the size wrapping is done too early.)
* Add test for weak references.Guido van Rossum2001-08-171-3/+33
|
* Add note on type/class unification.Guido van Rossum2001-08-171-0/+6
|
* ceval, PyEval_MergeCompilerFlags: wasn't merging in theTim Peters2001-08-172-6/+5
| | | | | | | | | | | | | | CO_FUTURE_DIVISION flag. Redid this to use Jeremy's PyCF_MASK #define instead, so we dont have to remember to fiddle individual feature names here again. pythonrun.h: Also #define a PyCF_MASK_OBSOLETE mask. This isn't used yet, but will be as part of the PEP 264 implementation (compile() mustn't raise an error just because old code uses a flag name that's become obsolete; a warning may be appropriate, but not an error; so compile() has to know about obsolete flags too, but nobody is going to remember to update compile() with individual obsolete flag names across releases either -- i.e., this is the flip side of PyEval_MergeCompilerFlags's oversight).
* Weak reference support, closing SF bug #451773.Guido van Rossum2001-08-171-21/+51
| | | | | | | | | | | Classes that don't use __slots__ have a __weakref__ member added in the same way as __dict__ is added (i.e. only if the base didn't already have one). Classes using __slots__ can enable weak referenceability by adding '__weakref__' to the __slots__ list. Renamed the __weaklistoffset__ class member to __weakrefoffset__ -- it's not always a list, it seems. (Is tp_weaklistoffset a historical misnomer, or do I misunderstand this?)
* Document that uu.decode() will always raise a uu.Error if out_fileBarry Warsaw2001-08-171-9/+18
| | | | | isn't given, and the file in the uu header already exists. Also add a description of the uu.Error exception class.
* Test that uu.py will not override an existing file if out_file isn'tBarry Warsaw2001-08-171-0/+34
| | | | given and the path is gleaned from the uu header.
* decode(): Raise a uu.Error if no out_file is given but the fileBarry Warsaw2001-08-171-9/+13
| | | | | | | | | specified in the uu header already exists. No additional workaround is provided since out_file=pathname is a deprecated interface, so it is better to simply pass a file-like object into out_file anyway. This closes SF bug #438083. Use isinstance() tests instead of type comparisons.
* A self-contained piece of Michael Hudson's patchTim Peters2001-08-172-8/+46
| | | | | | | | | | | | | | #449043 supporting __future__ in simulated shells in support of PEP 264. Much has changed from the patch version: + Repaired bad hex constant for nested_scopes. + Defined symbolic CO_xxx names so global search will find these uses. + Made the exported list of feature names explicit, instead of abusing __all__ for this purpose (and redefined __all__ accordingly). + Added gross .compiler_flag verification to test___future__.py, and reworked it a little to make use of the newly exported explicit list of feature names.
* Address SF #451547. The approach is a bit draconian: any object thatGuido van Rossum2001-08-171-0/+14
| | | | | | | | | | is pickled as a global must now exist by the name under which it is pickled, otherwise the pickling fails. Previously, such things would fail on unpickling, or unpickle as the wrong global object. I'm hoping that this won't break existing code that is playing tricks with this. I need a volunteer to do this for cPickle too.
* Patch #445762: Support --disable-unicodeMartin v. Löwis2001-08-1742-185/+465
| | | | | | | | - Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled - check for Py_USING_UNICODE in all places that use Unicode functions - disables unicode literals, and the builtin functions - add the types.StringTypes list - remove Unicode literals from most tests.
* Another contributor's patch got accepted.Guido van Rossum2001-08-171-0/+1
|
* Change the 227 response parser to use a more liberal regularGuido van Rossum2001-08-171-7/+9
| | | | | | | | expression. This is needed for certain servers that (in violation of the standard) don't return the parentheses in the response. This fixes SF bug #441712 by Henrik Weber (not exactly using his patch).
* Make sure that ampersand escaping is still performed on the contents ofFred Drake2001-08-171-0/+2
| | | | | | | | | local module tables (the lists of modules documented within a chapter, inserted at the beginning of the chapter). If this is not done here, the text is not part of the resulting documents when latex2html does the processing normally. This fixes a little bit more of SF bug #451556.
* type_new(): look for __dynamic__ at the module level (after looking inGuido van Rossum2001-08-171-14/+54
| | | | | | | | | | | | | the class dict). Anything but a nonnegative int in either place is *ignored* (before, a non-Boolean was an error). The default is still static -- in a comparative test, Jeremy's Tools/compiler package ran twice as slow (compiling itself) using dynamic as the default. (The static version, which requires a few tweaks to avoid modifying class variables, runs at about the same speed as the classic version.) slot_tp_descr_get(): this also needed fallback behavior. slot_tp_getattro(): remove a debug fprintf() call.
* Strip trailing whitespace, including two lines containing only one orGuido van Rossum2001-08-171-11/+11
| | | | more tabs that XEmacs Makefile mode found suspicious.
* - Get rid of obsolete #define PATCHLEVEL.Guido van Rossum2001-08-171-4/+1
| | | | - Change PY_VERSION (but not the numeric versions) to "2.2a1+".
* Fix core dump in repr() of instancemethod whose class==NULL.Guido van Rossum2001-08-171-7/+11
|
* classic(),metods(): add tests to verify that a bound method without aGuido van Rossum2001-08-171-0/+2
| | | | class has a correct repr().
* instance_getattr2(): rewritten to remove unnecessary stuff andGuido van Rossum2001-08-171-24/+13
| | | | | | | streamlined a bit. instancemethod_descr_get(): don't bind an unbound method of a class that's not a base class of the argument class.
* classic(), methods(): add another test relating to unbound methods:Guido van Rossum2001-08-171-0/+6
| | | | | | when an unbound method of class A is stored as a class variable of class B, and class B is *not* a subclass of class A, that method should *not* get bound to B instances.
* Instance methods: allow a NULL value for im_class.Guido van Rossum2001-08-171-2/+2
|
* Add early binding of methods to the 2nd metaclass example.Guido van Rossum2001-08-171-1/+6
|
* metaclass(): add tests for metaclasses written in Python: one thatGuido van Rossum2001-08-171-0/+33
| | | | | subclasses type, one that doesn't (the latter isn't fully functional yet).
* type_new(): only defer to the winning metatype if it's different fromGuido van Rossum2001-08-171-8/+12
| | | | | | | | the metatype passed in as an argument. This prevents infinite recursion when a metatype written in Python calls type.__new__() as a "super" call. Also tweaked some comments.
* Stop adding 3 to FD_SETSIZE -- it makes no sense. If it turns out itTim Peters2001-08-161-15/+11
| | | | | actually does <wink>, perhaps an Insure run will catch it. Also removed senseless Windows comment.
* fix_font(): Instead of using a long if/elsif cluster, use a bloodyFred Drake2001-08-161-23/+16
| | | | | dictionary. Added some entries to the dictionary to fix part of SF bug #451556.
* Fix typo reported by Joonas Paalasmaa: dada-->dataFred Drake2001-08-161-1/+1
|
* Re-write the description of the os.spawn*() functions, and cover theFred Drake2001-08-161-17/+51
| | | | | | | whole family instead of just two. This closes SF bug #451630.
* Added a test for module repr truncation when the package name isBarry Warsaw2001-08-161-0/+35
| | | | really long. Closes SF bug #437984.
* classobject.c:instancemethod_descr_get(): when a bound method isGuido van Rossum2001-08-162-1/+6
| | | | | | | assigned to a class variable and then accessed via an instance, it should not be rebound. test_descr.py:methods(): test for the condition above.
* module_repr(): Instead of fixing the maximum buf size to 400,Barry Warsaw2001-08-161-6/+18
| | | | | | | | calculate it on the fly. This way even modules with long package names get an accurate repr instead of a truncated one. The extra malloc/free cost shouldn't be a problem in a repr function. Closes SF bug #437984
* If genpluginprojects is called from fullbuild we set the Python source ↵Jack Jansen2001-08-162-1/+5
| | | | directory to be the same as fullbuild uses (in stead of using the default sys.prefix). This fixes an issue Mark Day raised that you can't use fullbuild with one Python installation to build another one.
* init_sre(): Plug a little leak reported by Insure.Barry Warsaw2001-08-161-2/+5
|
* Link readline module with ncurses in preference to termcap. [Bug ##441580]Andrew M. Kuchling2001-08-161-3/+5
| | | | Remove pointless comment
* [Patch #441691] preprocess() method for Borland C compiler.Andrew M. Kuchling2001-08-161-1/+35
| | | | I have no way of testing this.
* test_descr started breaking in yet another way in the same place.Tim Peters2001-08-161-2/+6
|
* Fix object_repr() to include the module (using the same rules asGuido van Rossum2001-08-161-2/+23
| | | | type_repr() for when to show or not to show it).
* New unit test for the mimetypes module, to avoid future regressions.Fred Drake2001-08-161-0/+42
|
* Another egregious error that copied the encodings info over the suffixFred Drake2001-08-161-1/+1
| | | | info. Caught by the tests that I'm writing now.
* Use (c)StringIO for collecting bytes. Fixes bug #451622.Martin v. Löwis2001-08-161-8/+12
|
* Repair some accidents causing Windows failures:Tim Peters2001-08-162-5/+5
| | | | | | | + test_compare. While None compares less than anything else, it's not always the case that None has the smallest id(). + test_descr. The output of %p (pointer) formats varies across platforms. In particular, on Windows it doesn't produce a leading "0x".