summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Pickler.save(): Fix for SF bug #494904: Cannot pickle a class with aGuido van Rossum2001-12-191-0/+4
| | | | | | | | | | | metaclass, reported by Dan Parisien. Objects that are instances of custom metaclasses, i.e. whose class is a subclass of 'type', should be pickled the same as new-style classes (objects whose class is 'type'). This can't be done through a dispatch table entry, and the __reduce__ trick doesn't work for these, since it finds the unbound __reduce__ for instances of the class (inherited from 'object'). So check explicitly using issubclass().
* Add some additional tests that check more proxy behaviors.Fred Drake2001-12-191-0/+18
|
* Fix the test control support for the pickle & cPickle tests so the tests runFred Drake2001-12-192-8/+22
| | | | under regrtest.
* The test using class initarg failed, because it was lacking aGuido van Rossum2001-12-191-0/+3
| | | | __safe_for_unpickling__ attribute.
* Make the module docstring agree with reality: the module prvides theFred Drake2001-12-191-1/+1
| | | | "handler()" function, not the "handle()" function.
* TemporaryFileWrapper: fixed typo in new comment.Tim Peters2001-12-181-1/+1
|
* TemporaryFileWrapper: cache the value of os.unlink for use by __del__,Tim Peters2001-12-181-1/+8
| | | | | to prevent mysterious errors at shutdown due to "os.unlink" turning into "None.unlink".
* Move the helper class _closedsocket *into* the _socketobject class.Guido van Rossum2001-12-181-7/+6
| | | | | | This way, when a socket object is deleted after the socket module has already been zapped by module shutdown, we don't get annoying warnings about exceptions in __del__ methods.
* Recreated after source changes.Thomas Heller2001-12-181-284/+284
|
* Second part of fix for bug [#483982] Python 2.2b2 bdist_wininstThomas Heller2001-12-181-3/+6
| | | | | | | | | | | | crashes. If no external zip-utility is found, the archive is created by the zipfile module, which behaves different now than in 2.1: if the zip-file is created in the root directory if the distribution, it will contain an (empty) version of itself. This triggered the above bug - so it's better to create the zip-file far away in the TMP directory.
* Don't use Latex \code{...} in docstrings.Guido van Rossum2001-12-171-1/+1
|
* Get rid of the stupid backslash in front of the column zero openBarry Warsaw2001-12-171-1/+1
| | | | | | | | | paren. This was there to worm around a stupid XEmacs bug, but since I can't tickle the bug in newer XEmacsen (just tried w/21.4.5) it's possible the problem has been fixed. We shouldn't have to be working around editor bugs anyway. If it crops up again, I'll report it (again) to the XEmacs crowd.
* Synch with pyunit CVS:Steve Purcell2001-12-171-4/+4
| | | | | | - Adds Fred's patch 487662: "Better error message for assertEqual" - Removed small portion of code unused after Guido's patch 490119: "Don't treat ^C as error"
* SF patch 493739 2 Bugfixes for 2.2c1 (RISC OS specific), fromTim Peters2001-12-151-4/+2
| | | | | | | | | | | | | | | | | | Dietmar Schwertberger. Bugfix candidate. """ RISCOS/Modules/getpath_riscos.c: Include trailing '\0' when using strncpy [copy strlen(...)+1 characters]. Lib/plat-riscos/riscospath.py: Use riscosmodule.expand for os.path.abspath. [fixes problems with site.py where abspath("<Python$Dir>") returned join(os.getcwd(), "<Python$Dir>") as e.g. "SCSI::SCSI4.$.<Python$Dir>" because "<Python$Dir>" wasn't recognised as an absolute path.] """
* Don't call resetwarnings(). Be more restrictive in what we filter outGuido van Rossum2001-12-151-3/+1
| | | | instead.
* Added test_socketserver and test_unicode_file to tests expected to beJack Jansen2001-12-141-0/+2
| | | | | skipped on Mac OS X. Not sure yet about test_locale.py: this may be due to my copy of Mac OS X (although it talks english fine enough).
* send(), ehlo(): Integrate patch #487310 by Fazal Majid. ConsistentlyBarry Warsaw2001-12-141-0/+2
| | | | | | | call self.close() just before raising SMTPServerDisconnected. This allows you to, e.g. reconnect after a server timeout. Merged from the 2.2c1 branch.
* Partial fix for problem in SF buf #487458Jeremy Hylton2001-12-141-1/+7
| | | | | | | | | | | | | | | | | | Rev 1.20 introduced a call to getpeername() in the dispatcher constructor. This only works for a connected socket. Apparently earlier versions of the code worked with un-connected sockets, e.g. a listening socket. It's not clear that the code is supposed to accept these sockets, because it sets self.connected = 1 when passed a socket. But it's also not clear that it should be a fatal error to pass a listening socket. The solution, for now, is to put a try/except around the getpeername() call and continue if it fails. The self.addr attribute is used primarily (only?) to produce a nice repr for the object, so it hardly matters. If there is a real error on a connected socket, it's likely that subsequent calls will fail too.
* (Merge into trunk.)Guido van Rossum2001-12-141-0/+10
| | | | | | | | | | | | | | | | | Fix for SF bug #492345. (I could've sworn I checked this in, but apparently I didn't!) This code: class Classic: pass class New(Classic): __metaclass__ = type attempts to create a new-style class with only classic bases -- but it doesn't work right. Attempts to fix it so it works caused problems elsewhere, so I'm now raising a TypeError in this case.
* Undo inadvertent change to test_scope in previous checkinJeremy Hylton2001-12-131-2/+1
|
* Add a comment explaining what these tests are for, and where to look forFred Drake2001-12-131-0/+3
| | | | tests of complex().
* Ensure that complex() only accepts a string argument as the first arg,Fred Drake2001-12-131-0/+8
| | | | | and only if there is no second arg. This closes SF patch #479551.
* Update output generated by test_scopeJeremy Hylton2001-12-131-1/+1
|
* Add test for SF bug [ #492403 ] exec() segfaults on closure's func_codeJeremy Hylton2001-12-131-2/+10
|
* Make tix_configure() work the same way configure() works for the basicFred Drake2001-12-131-86/+92
| | | | | | | Tkinter classes. Adjust a lot of docstrings. Convert a few type checks to use isinstance() instead of type(). This is part of SF patch #485959.
* Fix for SF #491953 (Andrew Dalke): ScrolledText.py has TabErrorGuido van Rossum2001-12-121-3/+3
| | | | Untabified.
* Wrapped a long line.Fred Drake2001-12-121-3/+4
| | | | Converted to use "".startswith() to avoid slicing (& temp string creation).
* Very small test suite for the calendar module, mostly to check a constraintFred Drake2001-12-121-0/+34
| | | | | on the return values from isleap(). Also checks firstweekday() and setfirstweekday().
* Joe VanAndel wrote:Marc-André Lemburg2001-12-111-1/+1
| | | | | | | | | | | > > When using 'distutils' (shipped with Python 2.1) I've found that my > Python scripts installed with a first line of: > > #!/usr/bin/python2.1None > > This is caused by distutils trying to patch the first line of the python > script to use the current interpreter.
* Fiddle test_class so it passes with -Qnew.Tim Peters2001-12-111-5/+20
|
* Fiddle test_augassign so it passes under -Qnew.Tim Peters2001-12-111-3/+10
|
* Ignore SIGXFSZ. Fixes #490453.Martin v. Löwis2001-12-111-0/+9
|
* When using GCC, use the right option to add a directory to the list of dirsFred Drake2001-12-111-1/+18
| | | | | searched for a dependency for runtime linking. This closes SF bug #445902.
* Additional coverage tests by Neil Norwitz.Guido van Rossum2001-12-113-0/+87
| | | | (SF patch #491418, #491420, #491421.)
* Regression test for SF bug #478534 -- exceptions could "leak" into a weakrefFred Drake2001-12-101-0/+25
| | | | callback.
* Skipping some tests by adding the usual jython conditional test around:Finn Bock2001-12-101-24/+27
| | | | | | | | | - the repr of unicode. Jython only add the u'' if the string contains char values > 255. - A unicode arg to unicode() is perfectly valid in jython. - A test buffer() test. No buffer() on Jython This closes patch "[ #490920 ] Jython and test_unicode".
* SF patch #491183 (Jeff Epler): ScrolledText.grid() doesn't workGuido van Rossum2001-12-101-2/+6
| | | | | | | | | | | | | | | | | | | | | | | Using grid methods on ScrolledText widgets does not work as expected. It either fails to pack a widget, or can even cause Tk to lock up. The problem is that the .grid method is being called on the text widget, not the frame widget. This can lead to the well-known lockup in Tk when a frame's children are managed by both the pack and grid managers. Even if it doesn't lock up, the frame is never placed within the intended widget. Program fragment: >>> import ScrolledText >>> s = ScrolledText.ScrolledText() >>> s.grid(row=0, column=0, rowspan=2) The following patch uses the same hack to copy the 'grid' and 'place' geometry manager methods to the ScrolledText instance as is already used for the 'pack' manager.
* Fix forMichael W. Hudson2001-12-101-2/+11
| | | | [ #409430 ] pydoc install broken
* Fix forMichael W. Hudson2001-12-101-1/+2
| | | | | | | | [ #477371 ] build_scripts can use wrong #! line scripts now get "built" into a directory build/scripts-$(PYTHON_VERSION)/
* A workaround for the missing buffer() builtin in jython.Finn Bock2001-12-091-0/+6
| | | | This closes patch "[ #490850 ] Jython and test_StringIO".
* bug #133283, #477728, #483789, #490573Fredrik Lundh2001-12-093-5/+11
| | | | | | | backed out of broken minimal repeat patch from July also fixed a couple of minor potential resource leaks in pattern_subx (Guido had already fixed the big one)
* test(): Avoid a UnboundLocalError when a method is missing from both the stringFinn Bock2001-12-091-0/+1
| | | | | | module and from string methods. This closes patch "[ #490811 ] Jython and test_string".
* 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.