summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* added "getcode" and "getname" methods to the ucnhash module (they'reFredrik Lundh2001-01-192-13/+75
| | | | | probably more useful for the test code than for any applications, but one never knows...)
* Color all word instances of "as" after "import", & on the same line, as ifTim Peters2001-01-191-0/+13
| | | | keywords. Cheap approximation to the truth.
* refactored the unicodeobject/ucnhash interface, to hide theFredrik Lundh2001-01-194-210/+146
| | | | | | | implementation details inside the ucnhash module. also cleaned up the unicode copyright blurb a little; Secret Labs' internal revision history isn't that interesting...
* Update the example DLL instructions for 2.1. Add example.def to theTim Peters2001-01-192-11/+16
| | | | MSVC project file (as the instructions always recommended doing).
* urllib.py very recently changed to produce uppercase escapes, but noTim Peters2001-01-191-3/+8
| | | | corresponding changes were made to its std test.
* Whitespace normalization.Tim Peters2001-01-191-1/+1
|
* test_urllib is failing on Windows. I don't know why, but I can at leastTim Peters2001-01-191-5/+5
| | | | change the test to give a clue about *where* it's failing.
* Use constructor form of "raise"; normalize <wink> docstrings.Tim Peters2001-01-191-9/+5
|
* Jeremy's patch #103323: trivial tests of all untested modules.Tim Peters2001-01-192-0/+94
|
* This still mentioned IdlePrefs.py as the place to edit colorGuido van Rossum2001-01-191-1/+2
| | | | preferences. It is now in config.txt or ~/.idle.
* make the output of _test() suitable for use in the regression testJeremy Hylton2001-01-191-1/+1
|
* Anonymous SF bug 129288: "The python 2.0 urllib has %%%x as a formatGuido van Rossum2001-01-191-2/+2
| | | | | | | when quoting forbidden characters. There are scripts out there that break with lower case, therefore I guess %%%X should be used." I agree, so am fixing this.
* make error msg more informative when test of exec failsJeremy Hylton2001-01-191-1/+1
|
* add test for SyntaxError onJeremy Hylton2001-01-191-1/+7
| | | | | def f(a): global a
* clearer error messages for apply() and "no locals"Jeremy Hylton2001-01-192-11/+18
|
* add test of bastion and rexec to std regression test suiteJeremy Hylton2001-01-192-0/+13
|
* This patch introduces an extra pass to the compiler that generates aJeremy Hylton2001-01-191-284/+1036
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | symbol table for each top-level compilation unit. The information in the symbol table allows the elimination of the later optimize() pass; the bytecode generation emits the correct opcodes. The current version passes the complete regression test, but may still contain some bugs. It's a fairly substantial revision. The current code adds an assert() and a test that may lead to a Py_FatalError(). I expect to remove these before 2.1 beta 1. The symbol table (struct symtable) is described in comments in the code. The changes affects the several com_XXX() functions that were used to emit LOAD_NAME and its ilk. The primary interface for this bytecode is now com_addop_varname() which takes a kind and a name, where kind is one of VAR_LOAD, VAR_STORE, or VAR_DELETE. There are many other smaller changes: - The name mangling code is no longer contained in ifdefs. There are two functions that expose the mangling logical: com_mangle() and symtable_mangle(). - The com_error() function can accept NULL for its first argument; this is useful with is_constant_false() is called during symbol table generation. - The loop index names used by list comprehensions have been changed from __1__ to [1], so that they can not be accessed by Python code. - in com_funcdef(), com_argdefs() is now called before the body of the function is compiled. This provides consistency with com_lambdef() and symtable_funcdef(). - Helpers do_pad(), dump(), and DUMP() are added to aid in debugging the compiler.
* Derivative of patch #102549, "simpler, faster(!) implementation of string.join".Tim Peters2001-01-191-38/+52
| | | | | | | | Also fixes two long-standing bugs (present in 2.0): 1. .join() didn't check that the result size fit in an int. 2. string.join(s) when len(s)==1 returned s[0] regardless of s[0]'s type; e.g., "".join([3]) returned 3 (overly optimistic optimization). I resisted a keen temptation to make .join() apply str() automagically.
* Revert a single line of my large change earlier today; this broke the abilityAndrew M. Kuchling2001-01-191-0/+1
| | | | | | to build in a subdirectory. The additional directory is unfortunately redundant when *not* building in a subdirectory, which is why I took it out.
* Checking in a slight variation of Barry's patch 103303.Guido van Rossum2001-01-191-10/+9
|
* Fix for the bug in complex() just reported by Ping.Guido van Rossum2001-01-191-1/+7
|
* SF Patch #102980, by Luke Kenneth Casson Leighton: BaseServer classGuido van Rossum2001-01-191-51/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | for SocketServer.py (inherited by TCPServer) Luke wrote: The socketserver code, with a little bit of tweaking, can be made sufficiently general to service "requests" of any kind, not just by sockets. The BaseServer class was created, for example, to poll a table in a MYSQL database every 2 seconds. each entry in the table can be allocated a Handler which deals with the entry. With this patch, using BaseServer and ThreadedServer classes, the creation of the server that reads and handles MySQL table entries instead of a socket was utterly trivial: about 50 lines of python code. You may consider this code to be utterly useless [why would anyone else want to do anything like this???] - you are entitled to your opinion. if you think so, then think of this: have you considered how to cleanly add SSL to the TCPSocketServer? What about using shared memory as the communications mechanism for a server, instead of sockets? What about communication using files? The SocketServer code is extremely good every useful. it's just that as it stands, it is tied to sockets, which is not as useful. I heartily approve of this idea.
* SF Patch #103188, by Donn Cave: BeOS/ar-fake support for extraGuido van Rossum2001-01-191-2/+11
| | | | | | libraries. (I have no way to test this, I just trust Donn.)
* SF Patch #103185, by jlt63: Some more standard modules cleanup for CygwinGuido van Rossum2001-01-191-1/+2
| | | | Support building this as a DLL under Cygwin.
* Support building this as a DLL under Cygwin.Guido van Rossum2001-01-191-2/+5
|
* SF Patch #103250, by pj99: Optimize a strspn() out of startup.Guido van Rossum2001-01-191-4/+21
| | | | Minor startup speedup: avoid a call to strspn().
* Add test that ensures hash() of objects defining __cmp__ or __eq__ butGuido van Rossum2001-01-181-0/+23
| | | | not __hash__ raises TypeError.
* Rich comparisons fallout: instance_hash() should check for bothGuido van Rossum2001-01-181-7/+14
| | | | | __cmp__ and __eq__ absent before deciding to do a quickie based on the object address. (Tim Peters discovered this.)
* Add test that ensures hash([]) and hash({}) raise TypeError.Guido van Rossum2001-01-181-0/+6
|
* Rich comparisons fallout: PyObject_Hash() should check for bothGuido van Rossum2001-01-181-1/+1
| | | | | tp_compare and tp_richcompare NULL before deciding to do a quickie based on the object address. (Tim Peters discovered this.)
* Changes to recursive-object comparisons, having to do with a test caseGuido van Rossum2001-01-181-107/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found where rich comparison of unequal recursive objects gave unintuituve results. In a discussion with Tim, where we discovered that our intuition on when a<=b should be true was failing, we decided to outlaw ordering comparisons on recursive objects. (Once we have fixed our intuition and designed a matching algorithm that's practical and reasonable to implement, we can allow such orderings again.) - Refactored the recursive-object comparison framework; more is now done in the support routines so less needs to be done in the calling routines (even at the expense of slowing it down a bit -- this should normally never be invoked, it's mostly just there to avoid blowing up the interpreter). - Changed the framework so that the comparison operator used is also stored. (The dictionary now stores triples (v, w, op) instead of pairs (v, w).) - Changed the nesting limit to a more reasonable small 20; this only slows down comparisons of very deeply nested objects (unlikely to occur in practice), while speeding up comparisons of recursive objects (previously, this would first waste time and space on 500 nested comparisons before it would start detecting recursion). - Changed rich comparisons for recursive objects to raise a ValueError exception when recursion is detected for ordering oprators (<, <=, >, >=). Unrelated change: - Moved PyObject_Unicode() to just under PyObject_Str(), where it belongs. MAL's patch must've inserted in a random spot between two functions in the file -- between two helpers for rich comparison...
* Since I'm about to check in a change to the recursion-detection codeGuido van Rossum2001-01-181-17/+10
| | | | | for comparisons that outlaws requets for ordering on recursive data structures, remove the tests for ordering recursive data structures.
* Patch #103313: Fixes "make test" by adding a little file namedAndrew M. Kuchling2001-01-181-4/+7
| | | | | "platform", running the Python binary to create it, and then using it to set PYTHONPATH.
* Patch from Barry: gets rid of two unused imports,Andrew M. Kuchling2001-01-181-14/+28
| | | | | | | wraps to 80chars, and adds some really hacky setting of compiler options when CC and LDSHARED are given on the make command line. (The Distutils should probably provide a utility function to automatically handle a number of common environment variables)
* Clarifications.Tim Peters2001-01-181-7/+7
|
* Sizable reorganization of how header and library files are foundAndrew M. Kuchling2001-01-181-105/+166
| | | | | | | | Check additional include directories for SSL Don't build modules that are linked into the Python binary statically Factored out the detection of Tkinter out into a method, since it's the most complicated module to set up Simplify the logic for detecting Tkinter
* Minor markup cleaning, and one required fix in the unistr() description.Fred Drake2001-01-181-7/+7
|
* Use openssl/*.h to include the OpenSSL header filesAndrew M. Kuchling2001-01-181-6/+6
|
* A dumb test for the dumdbm module.Guido van Rossum2001-01-182-0/+40
|
* Add test for comparing recursive data types.Guido van Rossum2001-01-181-1/+42
|
* Make the original, makesetup-based, targets for building shared modulesAndrew M. Kuchling2001-01-181-14/+16
| | | | | | available as "oldsharedmods" and "oldsharedinstall". You'll need to get a copy of the full Setup.dist out of the CVS for them to actually do much.
* Bite the bullet: use rich comparisons here, too.Guido van Rossum2001-01-181-4/+10
|
* Add test for misbehaving rich comparisons (always returning 0) --Guido van Rossum2001-01-181-1/+23
| | | | these fall back to __cmp__.
* Rich comparison testsGuido van Rossum2001-01-182-0/+364
|
* Document rich comparisons.Guido van Rossum2001-01-181-5/+42
|
* Updated for 2.1; removed references to BeOpen.com and PythonLabs.Guido van Rossum2001-01-181-35/+28
| | | | Added Copyright GvR.
* Add my name to the copyright notice.Guido van Rossum2001-01-181-1/+5
|
* Add note about copyright ownership and license situation.Guido van Rossum2001-01-181-0/+10
|
* - Add note about complex numbers.Guido van Rossum2001-01-181-9/+16
| | | | | | - Changed description of rich comparisons to emphasize that < and > (etc.) are each other's reflection. Also use this word in the note about the demise of __rcmp__.
* correct typo - closes bug #129205Skip Montanaro2001-01-181-1/+1
|