summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* work around name clash with OS/2 TCPIP routine sock_init()Andrew MacIntyre2002-06-131-2/+2
|
* Whitespace nit.Guido van Rossum2002-06-131-1/+1
|
* Add documentation for PyObject_RichCompare() and PyObject_RichCompareBool(),Fred Drake2002-06-131-0/+42
| | | | | constributed by David Abrahams. This closes SF patch #568081.
* Changed the extended slice example to show that you can reverse aGuido van Rossum2002-06-131-2/+2
| | | | string with a [::-1] slice.
* Add version annotations for some older changes to the calendar module.Fred Drake2002-06-131-0/+7
| | | | Closes SF patch #567867.
* Remove some overly complicated ways to concatenate and repeat stringsGuido van Rossum2002-06-121-6/+7
| | | | using "".join(). Fold a long line.
* Don't test for Java, test for sys.getrefcount.Guido van Rossum2002-06-121-2/+2
|
* Some provisional changes to get more tests to run on Windows (I hope).Guido van Rossum2002-06-121-6/+8
|
* Argh. Typo. :-(Guido van Rossum2002-06-121-1/+1
|
* Allow absent fromfd(), for Windows.Guido van Rossum2002-06-121-0/+2
|
* testSetSockOpt() should not require the reuse flag to be 1 -- anyGuido van Rossum2002-06-121-2/+2
| | | | | nonzero value is OK. Also fixed the error message for this and for testGetSockOpt().
* Lose the message on assertEqual calls -- they actually hideGuido van Rossum2002-06-121-18/+15
| | | | information on what went wrong.
* Docstring, layout and style tweaking. Increase fuzz to 1 second.Guido van Rossum2002-06-121-90/+87
|
* Add a new definition to Extension objects: depends.Jeremy Hylton2002-06-122-1/+6
| | | | | depends is a list of files that the target depends, but aren't direct sources of the target. think .h files.
* Add some more basic tests to validate the argument checking ofGuido van Rossum2002-06-121-1/+51
| | | | | settimeout(), test settimeout(None), and the interaction between settimeout() and setblocking().
* New test suite for the socket module by Michael Gilfix.Guido van Rossum2002-06-123-180/+486
| | | | Changed test_timeout.py to conform to the guidelines in Lib/test/README.
* SF bug 567826. Document new opcodes:Guido van Rossum2002-06-121-6/+50
| | | | | | ['BINARY_FLOOR_DIVIDE', 'BINARY_TRUE_DIVIDE', 'INPLACE_FLOOR_DIVIDE', 'INPLACE_TRUE_DIVIDE', 'GET_ITER', 'YIELD_VALUE', 'FOR_ITER', 'CONTINUE_LOOP']
* Add a testcase to ensure that cycles going through the __class__ linkGuido van Rossum2002-06-121-0/+6
| | | | of a new-style instance are detected by the garbage collector.
* SF bug 567538: Generator can crash the interpreter (Finn Bock).Guido van Rossum2002-06-123-2/+25
| | | | | | | | | | This was a simple typo. Strange that the compiler didn't catch it! Instead of WHY_CONTINUE, two tests used CONTINUE_LOOP, which isn't a why_code at all, but an opcode; but even though 'why' is declared as an enum, comparing it to an int is apparently not even worth a warning -- not in gcc, and not in VC++. :-( Will fix in 2.2 too.