summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Use a version number of 0.0.0 instead of ???. The latter leads toThomas Heller2001-12-061-1/+1
| | | | | | | | | | invalid filenames on Windows when building without specifying a version number in the setup script. See also http://mail.python.org/pipermail/distutils-sig/2001-November/002656.html Bugfix candidate.
* Attribute nodes did not always get their ownerDocument and ownerElementFred Drake2001-12-063-4/+41
| | | | properly set. This fixes that.
* Be more careful about accessing attributes of the parent: if Tk has not beenFred Drake2001-12-061-4/+20
| | | | | | | | | | | | | | initialized, this will be None, but the functions will still work (there will simply be a bogus parent on the screen). Allowing the parent to be None is useful when testing the functions from an interactive interpreter. Add an optional keyword paramter "show" to the _QueryString class; when given it is used to set the -show option to the entry widget. This allows passing show="*" or the like to askstring(), making it useful for requesting passwords/passphrases from the user. This closes SF bug #438517. Changed a docstring to be less font-lock-hostile.
* [Bug #459270] Fix incorrect docstringAndrew M. Kuchling2001-12-061-8/+5
|
* SF bug #488514: -Qnew needs workTim Peters2001-12-063-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Big Hammer to implement -Qnew as PEP 238 says it should work (a global option affecting all instances of "/"). pydebug.h, main.c, pythonrun.c: define a private _Py_QnewFlag flag, true iff -Qnew is passed on the command line. This should go away (as the comments say) when true division becomes The Rule. This is deliberately not exposed to runtime inspection or modification: it's a one-way one-shot switch to pretend you're using Python 3. ceval.c: when _Py_QnewFlag is set, treat BINARY_DIVIDE as BINARY_TRUE_DIVIDE. test_{descr, generators, zipfile}.py: fiddle so these pass under -Qnew too. This was just a matter of s!/!//! in test_generators and test_zipfile. test_descr was trickier, as testbinop() is passed assumptions that "/" is the same as calling a "__div__" method; put a temporary hack there to call "__truediv__" instead when the method name is "__div__" and 1/2 evaluates to 0.5. Three standard tests still fail under -Qnew (on Windows; somebody please try the Linux tests with -Qnew too! Linux runs a whole bunch of tests Windows doesn't): test_augassign test_class test_coercion I can't stay awake longer to stare at this (be my guest). Offhand cures weren't obvious, nor was it even obvious that cures are possible without major hackery. Question: when -Qnew is in effect, should calls to __div__ magically change into calls to __truediv__? See "major hackery" at tail end of last paragraph <wink>.
* Fix appendChild() and insertBefore() (and replaceChild() indirectly) whenFred Drake2001-12-063-2/+57
| | | | | the node being added is a fragment node. This closes SF bug #487929.
* sys.platform on Mac OS X is now "darwin", without any version number appended.Jack Jansen2001-12-052-2/+2
| | | | This should probably go into NEWS (who's responsible for that?).
* Fix SF bug #489581: __slots__ leak.Guido van Rossum2001-12-051-0/+34
| | | | | | It was easier than I thought, assuming that no other things contribute to the instance size besides slots -- a pretty good bet. With a test suite, no less!
* Re-enabled debugging prints in poplib & documented the set_debuglevel()Fred Drake2001-12-051-5/+5
| | | | | method. This closes SF patch #486079.
* Added a missing period at the end of an error message.Fred Drake2001-12-051-2/+2
|
* At the PythonLabs meeting someone mentioned it would make Jim reallyGuido van Rossum2001-12-051-6/+1
| | | | | | | | | happy if one could delete the __dict__ attribute of an instance. I love to make Jim happy, so here goes... - New-style objects now support deleting their __dict__. This is for all intents and purposes equivalent to assigning a brand new empty dictionary, but saves space if the object is not used further.
* Separate the script portion from the library portion; everything thatFred Drake2001-12-051-17/+17
| | | | | pertains to the script is now in the if __name__ == "__main__" block. This is in response to a commenton python-dev from Neal Norwitz.
* changes to use new tabpages classesSteven M. Gava2001-12-051-67/+14
|
* remove cruft from other projectSteven M. Gava2001-12-051-28/+1
|
* cleaner tabbed-page mini implementation through classesSteven M. Gava2001-12-051-0/+137
|
* Change new tests to use integer division (// instead of /).Tim Peters2001-12-051-3/+3
|
* SF bug #488480: integer multiply to return -max_int-1.Tim Peters2001-12-041-0/+26
| | | | | | | int_mul(): new and vastly simpler overflow checking. Whether it's faster or slower will likely vary across platforms, favoring boxes with fast floating point. OTOH, we no longer have to worry about people shipping broken LONG_BIT definitions <0.9 wink>.
* Add "file" argument to Hook constructor.Ka-Ping Yee2001-12-041-10/+15
| | | | | By default, save sys.stdout in self.file when a Hook instance is created (e.g. when cgitb.enable() is called).
* Address SF patch #485789 (Stefan Schwarzer).Guido van Rossum2001-12-041-1/+1
| | | | $BROWSER should be split on os.pathsep, not on ":".
* Fix SF bug #486144: Uninitialized __slot__ vrbl is None.Guido van Rossum2001-12-041-5/+7
| | | | | | | There's now a new structmember code, T_OBJECT_EX, which is used for all __slot__ variables (except __weakref__, which has special behavior anyway). This new code raises AttributeError when the variable is NULL rather than converting NULL to None.
* unpack_iterable(): Add a missing DECREF in an error case. Reported byGuido van Rossum2001-12-031-0/+23
| | | | | Armin Rigo (SF bug #488477). Added a testcase to test_unpack_iter() in test_iter.py.
* decode(), encode(): Accepting the minor optimizations from SF patchBarry Warsaw2001-12-031-6/+7
| | | | | #486375, but not the rest of it, since that changes the documented semantics of encode().
* Convert to using string methods instead of the string module.Fred Drake2001-12-031-29/+25
| | | | | | In goahead(), use a bound version of rawdata.startswith() since we use the same method all the time and never change the value of rawdata. This can save a lot of bound method creation.
* Add a test that makes sure unclosed entity references are handled consitently.Fred Drake2001-12-031-0/+6
|
* Fix of SF bug #475877 (Mutable subtype instances are hashable).Guido van Rossum2001-12-031-0/+24
| | | | | | | | | | | | | | | | | Rather than tweaking the inheritance of type object slots (which turns out to be too messy to try), this fix adds a __hash__ to the list and dict types (the only mutable types I'm aware of) that explicitly raises an error. This has the advantage that list.__hash__([]) also raises an error (previously, this would invoke object.__hash__([]), returning the argument's address); ditto for dict.__hash__. The disadvantage for this fix is that 3rd party mutable types aren't automatically fixed. This should be added to the rules for creating subclassable extension types: if you don't want your object to be hashable, add a tp_hash function that raises an exception. Also, it's possible that I've forgotten about other mutable types for which this should be done.
* _tryorder should always be a list, then the problem Jack had to fix inGuido van Rossum2001-12-031-5/+4
| | | | | | 1.24 wouldn't have occurred in the first place. Remove a debug print command accidentally inserted by Martin in 1.23.
* Missing comma in tuple initializer caused webbrowser.open() not to work atJack Jansen2001-12-031-1/+1
| | | | all in MacPython. (why did noone ever notice this?)
* Address SF patch #480716 as well as related issues.Guido van Rossum2001-12-031-1/+51
| | | | | | | | | | | | | | | | | | | SF patch #480716 by Greg Chapman fixes the problem that super's __get__ method always returns an instance of super, even when the instance whose __get__ method is called is an instance of a subclass of super. Other issues fixed: - super(C, C()).__class__ would return the __class__ attribute of C() rather than the __class__ attribute of the super object. This is confusing. To fix this, I decided to change the semantics of super so that it only applies to code attributes, not to data attributes. After all, overriding data attributes is not supported anyway. - While super(C, x) carefully checked that x is an instance of C, super(C).__get__(x) made no such check, allowing for a loophole. This is now fixed.
* further work on new configuration system, specifically,Steven M. Gava2001-12-033-66/+110
| | | | on keybinding configuration
* Added tests expected to be skipped on Mac OS X.Jack Jansen2001-12-021-0/+21
|
* Patch #487784: Support Unicode commands in popen3/4 handling on UNIX.Martin v. Löwis2001-12-021-1/+2
|
* Patch #487275: Add windows-1251 charset alias.Martin v. Löwis2001-12-021-0/+1
|
* Patch #487455: make types.StringTypes a tuple.Martin v. Löwis2001-12-021-2/+2
|
* Whitespace normalization.Tim Peters2001-12-011-1/+0
|
* Synchronize with pulldom from PyXML (revision 1.18).Fred Drake2001-11-301-2/+24
|
* Synchronize with minidom from PyXML (revision 1.35).Fred Drake2001-11-301-5/+5
|
* Added the convenience constants that are present in PyXML to make theseFred Drake2001-11-301-0/+6
| | | | more similar.
* Merged changes made on r22b2-branch between r22b2 and r22b2-mac (theJack Jansen2001-11-301-0/+1
| | | | changes from start of branch upto r22b2 were already merged, of course).
* canonic(): don't use abspath() for filenames looking like <...>; thisGuido van Rossum2001-11-291-0/+2
| | | | | fixes the problem reported in SF bug #477023 (Jonathan Mark): "pdb: unexpected path confuses Emacs".
* SF bug 486480: zipfile __del__ is brokenTim Peters2001-11-281-3/+3
| | | | | | ZipFile.__del__(): call ZipFile.close(), like its docstring says it does. ZipFile.close(): allow calling more than once (as all file-like objects in Python should support).
* Adding test for Unicode repr()-output.Marc-André Lemburg2001-11-281-0/+15
|
* __format(): Applied SF patch #482003 by Skip to fix multiline dictBarry Warsaw2001-11-282-1/+20
| | | | | | | | output. Patch includes additional test case test_basic_line_wrap(). This patch is a candidate for Python 2.1.2.
* Fix [ #484645 ] little bug in pycodegen.pyJeremy Hylton2001-11-271-1/+1
|
* test_formatdate(): Integrating Jack's 22b2 branch fix for Mac epoch:Barry Warsaw2001-11-271-3/+4
| | | | | | | | More changes to the formatdate epoch test: the Mac epoch is in localtime, so east of GMT it falls in 1903:-( Changed the test to obtain the epoch in both local time and GMT, and do the right thing in the comparisons. As a sanity measure also check that day/month is Jan 1.
* SF patch 483059: Avoid use of eval() in random.py, from Finn Bock.Tim Peters2001-11-251-6/+5
| | | | | | _verify(): Pass in the values of globals insted of eval()ing their names. The use of eval() was obscure and unnecessary, and the patch claimed random.py couldn't be used in Jython applets because of it.
* Properly set static options for tixBalloon and tixResizeHandle.Martin v. Löwis2001-11-251-2/+19
| | | | | Expose Tix.ResizeHandle.{detach_widget,hide,show}. Update Tix demos.
* Patch #484847: Default to netscape.exe on OS/2.Martin v. Löwis2001-11-251-0/+10
|
* - Change all remaining assertions into verify() and vereq() calls.Guido van Rossum2001-11-241-14/+42
| | | | | | - Add tests for the recent fixes to copy_reg.py: __getstate__/__setstate__ and mixed inheritance from new+classic classes.
* _reduce():Guido van Rossum2001-11-241-3/+8
| | | | | | | | | | | | - Fix for SF bug #482752: __getstate__ & __setstate__ ignored (by Anon.) In fact, only __getstate__ isn't recognized. This fixes that. - Separately, the test for base.__flags__ & _HEAPTYPE raised an AttributeError exception when a classic class was amongst the bases. Fixed this with a hasattr() bandaid (classic classes never qualify as the "hard" base class anyway, which is what the code is trying to find).
* More typo fixes.Barry Warsaw2001-11-241-2/+2
|