summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Moved a print statement outside the jython platform test. OtherwiseFinn Bock2001-12-091-1/+1
| | | | | the output fails to compare correctly for jython. This change was part of the original patch #403666.
* The initial patch #468662 was not applied quite verbatim. This should oneFinn Bock2001-12-091-1/+2
| | | | | | will fix the remaining Jython issues. This closes patch "[ #490411 ] Jython and test_grammar.py".
* Refcounting isn't available in Jython. Putting the jython test around it.Finn Bock2001-12-091-8/+9
| | | | This closes patch "[ #490414 ] Jython and test_socket".
* Patch supplied by Burton Radons for his own SF bug #487390: ModifyingGuido van Rossum2001-12-081-1/+1
| | | | | | | | | | | | | type.__module__ behavior. This adds the module name and a dot in front of the type name in every type object initializer, except for built-in types (and those that already had this). Note that it touches lots of Mac modules -- I have no way to test these but the changes look right. Apologies if they're not. This also touches the weakref docs, which contains a sample type object initializer. It also touches the mmap test output, because the mmap type's repr is included in that output. It touches object.h to put the correct description in a comment.
* SF patch #490515 (Joe A) urllib.open_https() protocol issueGuido van Rossum2001-12-081-1/+1
| | | | | | | | | | open_http(): In urllib.py library module, URLopener.open_https() returns a class instance of addinfourl() with its self.url property missing the protocol. Instead of "https://www.someurl.com", it becomes "://www.someurl.com".
* Enable support for jython:Finn Bock2001-12-081-4/+11
| | | | | | | | | 1. Acknowledge the welknown difference that jython allows continue in the finally clause. 2. Avoid using _testcapi when running with jython. This closes patch "[ #490417 ] Jython and test_exceptions"
* Remove erroneous and confusing comment -- sre patterns *can* beGuido van Rossum2001-12-081-2/+2
| | | | | pickled and we do *not* expect exceptions from either pickle or cPickle.
* Honor the mode argument to dumbdbm.open(); there is not good reason not to,Fred Drake2001-12-071-6/+7
| | | | | especially since the documentation described it in detail. This partially closes SF bug #490098.
* SF patch 490393: test___all__ and Jython; from Finn Bock.Tim Peters2001-12-071-3/+4
| | | | Don't even try to import _socket when running under Jython.
* I found that when run as a script, this test suite ran its testsGuido van Rossum2001-12-071-6/+6
| | | | | | twice! Fixed this by avoiding the import of test_email, which loads the module a second time in that situation, and fiddled the __main__ section to resemble other test suites using unittest.
* Align the number of %s with the number of format arguments.Finn Bock2001-12-071-2/+2
| | | | This closes patch "[ #490330 ] String format bug in test_b2."
* Move import dbhash out of test_sundry and into test_bsddb,Guido van Rossum2001-12-072-1/+1
| | | | so that test_sundry won't fail if the bsddb module is absent.
* In unconditional except clauses, don't catch KeyboardInterrupt -- it'sGuido van Rossum2001-12-071-0/+6
| | | | | | | annoying that often you have to hit ^C numerous times before it works. The solution: before the "except:" clause, insert "except KeyboardInterrupt: raise". This propagates KeyboardInterrupt out, stopping the test in its tracks.
* Visious hackery to solve a build-control problem related to our use ofFred Drake2001-12-061-0/+11
| | | | | | | distutils for the library modules built as shared objects. A better solution appears possible, but with the threat that the distutils becomes more magical ("complex"). This closes SF bug #458343.
* [Bug #475009] Tighten the pattern for the first line, so we don'tAndrew M. Kuchling2001-12-061-1/+1
| | | | adjust it when a versioned interpreter is supplied (#!.../python2 ...)
* Whitespace normalization.Fred Drake2001-12-0611-48/+48
|
* Whitespace normalization.Fred Drake2001-12-0621-216/+210
|
* 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
|