summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* SF patch 568629 by Oren Tirosh: types made callable.Guido van Rossum2002-06-1417-130/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These built-in functions are replaced by their (now callable) type: slice() buffer() and these types can also be called (but have no built-in named function named after them) classobj (type name used to be "class") code function instance instancemethod (type name used to be "instance method") The module "new" has been replaced with a small backward compatibility placeholder in Python. A large portion of the patch simply removes the new module from various platform-specific build recipes. The following binary Mac project files still have references to it: Mac/Build/PythonCore.mcp Mac/Build/PythonStandSmall.mcp Mac/Build/PythonStandalone.mcp [I've tweaked the code layout and the doc strings here and there, and added a comment to types.py about StringTypes vs. basestring. --Guido]
* This introduces stricter library/header file checking for the Berkeley DBSkip Montanaro2002-06-147-60/+162
| | | | | | | | | library. Since multiple versions can be installed simultaneously, it's crucial that you only select libraries and header files which are compatible with each other. Version checking is done from highest version to lowest. Building using version 1 of Berkeley DB is disabled by default because of the hash file bugs people keep rediscovering. It can be enabled by uncommenting a few lines in setup.py. Closes patch 553108.
* Clean up descriptions of PyObject_RichCompare() and PyObject_RichCompareBool()Fred Drake2002-06-142-8/+18
| | | | | based on comments from David Abrahams. Added refcount information for these functions.
* Use code.interact(), which is even simpler, *and* imports readlineGuido van Rossum2002-06-141-3/+3
| | | | when it can.
* Now FOR_LOOP is gone, loop_subscript can go too.Michael W. Hudson2002-06-141-19/+0
| | | | make -s rules :-)
* Don't poorly emulate the interactive interpreter, useGuido van Rossum2002-06-141-19/+9
| | | | code.InteractiveConsole to do a much better job.
* Anchors ("a" elements) used only for the name attribute should notFred Drake2002-06-141-1/+1
| | | | | change color on hover, only those that are link sources (href attributes).
* Make a start at describing the results of class/type unificationSteve Holden2002-06-141-121/+86
| | | | in the type documentation.
* Test for the bug in recurse_down_subclasses() that I just fixed.Guido van Rossum2002-06-141-0/+10
|
* Inexplicably, recurse_down_subclasses() was comparing the objectGuido van Rossum2002-06-141-1/+2
| | | | | | gotten from a weak reference to NULL instead of to None. This caused the following assert() to fail (but only in 2.2 in the debug build -- I have to find a better test case). Will backport.
* Missed one use of new PyDoc_STRVAR macroNeal Norwitz2002-06-141-2/+2
|
* Refer the reader to the correct module for constant definitions.Fred Drake2002-06-141-1/+1
| | | | This closes SF bug #550777.
* Fix SF bug # 561858 Assertion with very long listsNeal Norwitz2002-06-141-7/+7
| | | | | | | Write 4 bytes for co_stacksize, etc. to prevent writing out bad .pyc files which can cause a crash when read back in. (I forgot that frozen needs to be updated too for the test.)
* Fix SF bug # 561858 Assertion with very long listsNeal Norwitz2002-06-143-12/+43
| | | | | Write 4 bytes for co_stacksize, etc. to prevent writing out bad .pyc files which can cause a crash when read back in.
* SF bug # 493951 string.{starts,ends}with vs slicesNeal Norwitz2002-06-144-45/+70
| | | | Handle negative indices similar to slices.
* Document the Binary.data attribute.Fred Drake2002-06-141-5/+13
| | | | This closes SF bug #562878.
* Use \code{True} (or False) instead of true/false.Neal Norwitz2002-06-141-4/+4
| | | | | Not sure if code is correct, but that is what's in this file. I've seen \constant{True} in other places.
* Test exceptional condition in select()Neal Norwitz2002-06-131-0/+7
|
* Test exceptional conditions in list.sort()Neal Norwitz2002-06-131-0/+15
|
* Cleanup a littleNeal Norwitz2002-06-131-6/+7
|
* SF # 533070 Silence AIX C Compiler WarningsNeal Norwitz2002-06-132-2/+2
| | | | Warning caused by using &func. & is not necessary.
* Major cleanup operation: whenever there's a call that looks for anGuido van Rossum2002-06-131-10/+59
| | | | | | | | | | | | | optional attribute, only clear the exception when the internal getattr operation raised AttributeError. Many places in this file already had that policy; but just as many didn't, and there didn't seem to be any rhyme or reason to it. Be consistently cautious. Question: should I backport this? On the one hand it's a bugfix. On the other hand it's a change in behavior. Certain forms of buggy or just weird code would work in the past but raise an exception under the new rules; e.g. if you define a __getattr__ method that raises a non-AttributeError exception.
* Fix for SF bug 532646. This is a little simpler than what NealGuido van Rossum2002-06-132-1/+31
| | | | | suggested there, based upon a better analysis (__getattr__ is a red herring). Will backport to 2.2.
* SF # 561244 Micro optimizationsNeal Norwitz2002-06-131-5/+3
| | | | Cleanup code a bit and return as early as possible.
* Fix typo in exception messageNeal Norwitz2002-06-131-1/+1
|
* Use new PyDoc_STRVAR macroNeal Norwitz2002-06-131-2/+2
|
* Add "version added" for getpgidNeal Norwitz2002-06-131-0/+1
|
* SF #561244 Micro optimizationsNeal Norwitz2002-06-133-14/+7
| | | | Convert loops to memset()s.
* Patch #568235: Add posix.setpgid.Martin v. Löwis2002-06-138-3/+41
|
* Patch #568124: Add doc string macros.Martin v. Löwis2002-06-1363-1625/+1509
|
* Temporarily disable the timeout and socket tests.Guido van Rossum2002-06-132-14/+14
| | | | | | They still run as standalone scripts, but when used as part of the regression test suite, they are effectively no-ops. (This is done by renaming test_main to main.)
* Hopefully this addresses the remaining issues of SF bugs 459235 andGuido van Rossum2002-06-132-24/+85
| | | | | | 473985. Through a subtle rearrangement of some members in the etype struct (!), mapping methods are now preferred over sequence methods, which is necessary to support str.__getitem__("hello", slice(4)) etc.
* The opcode FOR_LOOP no longer exists.Guido van Rossum2002-06-134-40/+3
|
* Do not claim that getlocale() returns a tulpe; that is not always true.Fred Drake2002-06-131-3/+3
| | | | Closes SF bug #568577.
* Munge depends files to have absolute paths.Jeremy Hylton2002-06-131-2/+7
| | | | Look in both moddirlist and incdirlist, since a .h could be in either.
* Extend dependency tracking so that .o files are rebuilt.Jeremy Hylton2002-06-131-4/+2
| | | | | | | | | | Two new tests are needed: Don't skip building an extension if any of the depends files are newer than the target. Pass ext.depends to compiler.compile() so that it can track individual files.
* Refactor compile() method implementations.Jeremy Hylton2002-06-135-272/+178
| | | | | | | | Always use _setup_compile() to do the grunt work of processing arguments, figuring out which files to compile, and emitting debug messages for files that are up-to-date. Use _get_cc_args() when possible.
* Add depends=None to the arglist for compile().Jeremy Hylton2002-06-131-1/+2
|
* Extend compiler() method with optional depends argument.Jeremy Hylton2002-06-131-74/+168
| | | | | | | | | | | | This change is not backwards compatible. If a compiler subclass exists outside the distutils package, it may get called with the unexpected keyword arg. It's easy to extend that compiler by having it ignore the argument, and not much harder to do the right thing. If this ends up being burdensome, we can change it before 2.3 final to work harder at compatibility. Also add _setup_compile() and _get_cc_args() helper functions that factor out much of the boilerplate for each concrete compiler class.
* Rearrange the #ifndef WITHOUT_COMPLEX so it can be picked up fromGuido van Rossum2002-06-131-2/+2
| | | | pyconfig.h.
* Comment out testHostnameRes() -- it depends on a correctly workingGuido van Rossum2002-06-131-10/+10
| | | | DNS, and we can't assume that.
* Fix non-blocking connect() for Windows. Refactored the codeGuido van Rossum2002-06-132-39/+42
| | | | | | | | | | | that retries the connect() call in timeout mode so it can be shared between connect() and connect_ex(), and needs only a single #ifdef. The test for this was doing funky stuff I don't approve of, so I removed it in favor of a simpler test. This allowed me to implement a simpler, "purer" form of the timeout retry code. Hopefully that's enough (if you want to be fancy, use non-blocking mode and decode the errors yourself, like before).
* More style changes and little cleanups.Jeremy Hylton2002-06-131-63/+33
| | | | | | | | Remove __init__ that just called base class __init__ with same args. Fold long argument lists into fewer, shorter lines. Remove parens in tuple unpacks. Don't put multiple statements on one line with a semicolon. In find_library_file() compute the library_filename() upfront.
* Get rid of accidentally checked-in reference to "bits".Guido van Rossum2002-06-131-2/+0
|
* Major overhaul of timeout sockets:Guido van Rossum2002-06-135-247/+89
| | | | | | | | | | | | | | | | | | | | - setblocking(0) and settimeout(0) are now equivalent, and ditto for setblocking(1) and settimeout(None). - Don't raise an exception from internal_select(); let the final call report the error (this means you will get an EAGAIN error instead of an ETIMEDOUT error -- I don't care). - Move the select to inside the Py_{BEGIN,END}_ALLOW_THREADS brackets, so other theads can run (this was a bug in the original code). - Redid the retry logic in connect() and connect_ex() to avoid masking errors. This probably doesn't work for Windows yet; I'll fix that next. It may also fail on other platforms, depending on what retrying a connect does; I need help with this. - Get rid of the retry logic in accept(). I don't think it was needed at all. But I may be wrong.
* Fix a typo.Guido van Rossum2002-06-131-1/+2
| | | | Add a sleep (yuck!) to _testRecvFrom() so the server can set up first.
* Some more style improvementsJeremy Hylton2002-06-131-25/+4
|
* Python style conformance: Delete spaces between name of function and arglist.Jeremy Hylton2002-06-131-41/+41
| | | | Making the world better a little bit at a time <wink>.
* Add dependencies on socketmodule.h.Guido van Rossum2002-06-131-2/+6
|
* _Py prefix is verboten for static entry pointsAndrew MacIntyre2002-06-131-4/+4
|