Commit Graph

16035 Commits

Author SHA1 Message Date
Guido van Rossum
10b04180a0 Bump __version__; add authorship note for the BaseServer patch. 2001-01-19 16:45:46 +00:00
Andrew M. Kuchling
f5c9e86333 Add Jason Tishler to the ACKS file 2001-01-19 16:29:28 +00:00
Andrew M. Kuchling
989835c9fc Patch #103220 from Jason Tishler:
This patch adds support for Cygwin to util.get_platform(). A Cygwin
  specific case is needed due to the format of Cygwin's uname command,
  which contains '/' characters.
2001-01-19 16:26:12 +00:00
Andrew M. Kuchling
ae89af9c63 Minor patch from Thomas Gellekum:
* Deletes the Panel_NoArgReturnStringFunction() macro, which isn't used
     anymore
   * Adjusts two comments.
2001-01-19 15:35:26 +00:00
Fredrik Lundh
95f1e6f631 new unicode name database (~160k) 2001-01-19 11:52:33 +00:00
Fredrik Lundh
2acb54a194 improved the ucnhash test a bit 2001-01-19 11:13:46 +00:00
Fredrik Lundh
ee865c64da added "getcode" and "getname" methods to the ucnhash module (they're
probably more useful for the test code than for any applications, but
one never knows...)
2001-01-19 11:00:42 +00:00
Tim Peters
d5d2cd149f Color all word instances of "as" after "import", & on the same line, as if
keywords.  Cheap approximation to the truth.
2001-01-19 10:41:49 +00:00
Fredrik Lundh
0fdb90cafe refactored the unicodeobject/ucnhash interface, to hide the
implementation details inside the ucnhash module.

also cleaned up the unicode copyright blurb a little; Secret Labs'
internal revision history isn't that interesting...
2001-01-19 09:45:02 +00:00
Tim Peters
a2bf2709b3 Update the example DLL instructions for 2.1. Add example.def to the
MSVC project file (as the instructions always recommended doing).
2001-01-19 08:45:48 +00:00
Tim Peters
cc58363611 urllib.py very recently changed to produce uppercase escapes, but no
corresponding changes were made to its std test.
2001-01-19 07:00:08 +00:00
Tim Peters
8880f6d3c4 Whitespace normalization. 2001-01-19 06:12:17 +00:00
Tim Peters
1a8a53d16f test_urllib is failing on Windows. I don't know why, but I can at least
change the test to give a clue about *where* it's failing.
2001-01-19 06:06:37 +00:00
Tim Peters
983874dd32 Use constructor form of "raise"; normalize <wink> docstrings. 2001-01-19 05:59:21 +00:00
Tim Peters
d93c0b6a37 Jeremy's patch #103323: trivial tests of all untested modules. 2001-01-19 05:41:36 +00:00
Guido van Rossum
9d593a526b This still mentioned IdlePrefs.py as the place to edit color
preferences.  It is now in config.txt or ~/.idle.
2001-01-19 03:30:58 +00:00
Jeremy Hylton
1a34c879bc make the output of _test() suitable for use in the regression test 2001-01-19 03:30:22 +00:00
Guido van Rossum
e27a7b8074 Anonymous SF bug 129288: "The python 2.0 urllib has %%%x as a format
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.
2001-01-19 03:28:15 +00:00
Jeremy Hylton
e1bb5f9814 make error msg more informative when test of exec fails 2001-01-19 03:26:33 +00:00
Jeremy Hylton
047e2c93e2 add test for SyntaxError on
def f(a):
        global a
2001-01-19 03:25:56 +00:00
Jeremy Hylton
c862cf400f clearer error messages for apply() and "no locals" 2001-01-19 03:25:05 +00:00
Jeremy Hylton
b4ed8c4db0 add test of bastion and rexec to std regression test suite 2001-01-19 03:22:48 +00:00
Jeremy Hylton
e36f77814e This patch introduces an extra pass to the compiler that generates a
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.
2001-01-19 03:21:30 +00:00
Tim Peters
19fe14e76a Derivative of patch #102549, "simpler, faster(!) implementation of string.join".
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.
2001-01-19 03:03:47 +00:00
Andrew M. Kuchling
e3d6e41d81 Revert a single line of my large change earlier today; this broke the ability
to build in a subdirectory.  The additional directory is unfortunately
    redundant when *not* building in a subdirectory, which is why I took
    it out.
2001-01-19 02:50:34 +00:00
Guido van Rossum
fc53c13dd5 Checking in a slight variation of Barry's patch 103303. 2001-01-19 02:41:41 +00:00
Guido van Rossum
8dabbf149e Fix for the bug in complex() just reported by Ping. 2001-01-19 02:11:59 +00:00
Guido van Rossum
90cb9067b8 SF Patch #102980, by Luke Kenneth Casson Leighton: BaseServer class
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.
2001-01-19 00:44:41 +00:00
Guido van Rossum
3fa560b343 SF Patch #103188, by Donn Cave: BeOS/ar-fake support for extra
libraries.

(I have no way to test this, I just trust Donn.)
2001-01-19 00:31:10 +00:00
Guido van Rossum
7150a77863 SF Patch #103185, by jlt63: Some more standard modules cleanup for Cygwin
Support building this as a DLL under Cygwin.
2001-01-19 00:29:06 +00:00
Guido van Rossum
6915c4d0a8 Support building this as a DLL under Cygwin. 2001-01-19 00:28:08 +00:00
Guido van Rossum
fc5ce61abd SF Patch #103250, by pj99: Optimize a strspn() out of startup.
Minor startup speedup: avoid a call to strspn().
2001-01-19 00:24:06 +00:00
Guido van Rossum
2312024eb7 Add test that ensures hash() of objects defining __cmp__ or __eq__ but
not __hash__ raises TypeError.
2001-01-18 23:47:15 +00:00
Guido van Rossum
65e8bd7fd5 Rich comparisons fallout: instance_hash() should check for both
__cmp__ and __eq__ absent before deciding to do a quickie
based on the object address.  (Tim Peters discovered this.)
2001-01-18 23:46:31 +00:00
Guido van Rossum
0c6614c789 Add test that ensures hash([]) and hash({}) raise TypeError. 2001-01-18 23:36:14 +00:00
Guido van Rossum
41c3244875 Rich comparisons fallout: PyObject_Hash() should check for both
tp_compare and tp_richcompare NULL before deciding to do a quickie
based on the object address.  (Tim Peters discovered this.)
2001-01-18 23:33:37 +00:00
Guido van Rossum
a3af41d564 Changes to recursive-object comparisons, having to do with a test case
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...
2001-01-18 22:07:06 +00:00
Guido van Rossum
4e8db2ed9d Since I'm about to check in a change to the recursion-detection code
for comparisons that outlaws requets for ordering on recursive data
structures, remove the tests for ordering recursive data structures.
2001-01-18 21:52:26 +00:00
Andrew M. Kuchling
95695e2fa3 Patch #103313: Fixes "make test" by adding a little file named
"platform", running the Python binary to create it, and then
    using it to set PYTHONPATH.
2001-01-18 21:20:56 +00:00
Andrew M. Kuchling
5bbc7b9283 Patch from Barry: gets rid of two unused imports,
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)
2001-01-18 20:39:34 +00:00
Tim Peters
befc97ca34 Clarifications. 2001-01-18 19:01:39 +00:00
Andrew M. Kuchling
fbe73769a4 Sizable reorganization of how header and library files are found
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
2001-01-18 18:44:20 +00:00
Fred Drake
bc0b260a77 Minor markup cleaning, and one required fix in the unistr() description. 2001-01-18 18:09:07 +00:00
Andrew M. Kuchling
697a0b0f96 Use openssl/*.h to include the OpenSSL header files 2001-01-18 17:41:41 +00:00
Guido van Rossum
2f1064c77b A dumb test for the dumdbm module. 2001-01-18 16:46:52 +00:00
Guido van Rossum
890f209619 Add test for comparing recursive data types. 2001-01-18 16:21:57 +00:00
Andrew M. Kuchling
1c2fb9ce29 Make the original, makesetup-based, targets for building shared modules
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.
2001-01-18 16:10:56 +00:00
Guido van Rossum
753a68e2cc Bite the bullet: use rich comparisons here, too. 2001-01-18 16:09:55 +00:00
Guido van Rossum
9710bd5deb Add test for misbehaving rich comparisons (always returning 0) --
these fall back to __cmp__.
2001-01-18 15:55:59 +00:00
Guido van Rossum
c4a6e8b65a Rich comparison tests 2001-01-18 15:48:05 +00:00