Commit Graph

23851 Commits

Author SHA1 Message Date
Guido van Rossum fc26c0730c Undo Barry's change. This file is not imported, it's fed as input to
the tokenize module by test_tokenize.py.  The FutureWarnings only
appeared during installation, and I've figured out a way to suppress
those in a different way.
2002-08-29 15:10:30 +00:00
Guido van Rossum a29eafa614 Suppress warnings when byte-compiling the installed library modules.
This seems the sanest thing to do.
2002-08-29 15:04:37 +00:00
Guido van Rossum f0253f2bc5 Restore the hex/oct constant tests that Barry commented out for fear
of FutureWarnings.  Added a comment explaining the situation.
2002-08-29 14:57:26 +00:00
Raymond Hettinger 604cd6ae79 complex() was the only numeric constructor that created a new instance
when given its own type as an argument.
2002-08-29 14:22:51 +00:00
Barry Warsaw 18bd11205d Fixed three exceptions in the Plain integers test, although I'm not
sure these are the best fixes.

- Test maxint-1 against the negative octal constant -020000000000

- Comment out the tests for oct -1 and hex -1, since 037777777777 and
  0xffffffff raise FutureWarnings now and in Python 2.4 those
  constants will produce positive values, not negative values.  So the
  existing test seems to test something that won't be true in 2.4.
2002-08-29 13:09:47 +00:00
Barry Warsaw c6f80fd995 The test_tokenize output has changed slightly, by the addition of some
trailing `L's.
2002-08-29 12:56:59 +00:00
Jack Jansen 278a3a22d7 Distutils-based script by Bill Fancher to download the Python documentation
HTML tarball and use it to create a documentation tree readable and
searchable with Apple Help Viewer. The documentation also shows up in
Project Builder (if you add Python.framework to your project).
2002-08-28 22:22:10 +00:00
Jack Jansen 4684a09fc5 - Install a symlink to the documentation (which lives in the framework)
in Python.app, and refer to it in Info.plist. This makes Apple Help
  Viewer recognize the Python documentation.
- Changed the externally visible name of Python.app to "Python" (was PythonW).
2002-08-28 21:27:02 +00:00
Jack Jansen c58eafbe3e Distutils-based script by Bill Fancher to download the Python documentation
HTML tarball and use it to create a documentation tree readable and
searchable with Apple Help Viewer. The documentation also shows up in
Project Builder (if you add Python.framework to your project).
2002-08-28 21:23:53 +00:00
Jack Jansen f90367c6d4 This file never made it to the repository, somehow. 2002-08-28 21:19:26 +00:00
Jack Jansen 5472376f0d These were regenerated some time ago (with ascii chars only and
fully qualified imports) but somehow not checked in yet.
2002-08-28 21:18:37 +00:00
Jack Jansen 4f2d89f1f8 Interface to Apple Help Viewer. 2002-08-28 21:16:53 +00:00
Barry Warsaw 266e6b1f4b Quite down some FutureWarnings. 2002-08-28 16:36:11 +00:00
Skip Montanaro ee113f08f8 add warning about exception messages 2002-08-28 01:14:57 +00:00
Raymond Hettinger 9240be2a35 Note change in behavior from 1.5.2. The new argument to NameError is
an error message and not just the missing name.

Closes SF Bug 599869.
2002-08-27 23:53:23 +00:00
Barry Warsaw 1a1607546c Whitespace normalization. 2002-08-27 22:38:50 +00:00
Barry Warsaw 48b0d36b4d Typo 2002-08-27 22:34:44 +00:00
Peter Schneider-Kamp 4c0134248c execfile should call PyErr_SetFromErrnoWithFilename instead of
simply PyErr_SetFromErrno

This closes bug 599163.
2002-08-27 16:58:00 +00:00
Fred Drake 80a04a4894 Add strong security warning about the rexec module.
Closes SF patch #600861.

Minor markup changes.
2002-08-27 16:46:06 +00:00
Fred Drake 246beb2526 Don't use tempfile.mktemp(), since it produces annoying warnings, and
usually isn't what we want anyway.
2002-08-27 16:34:54 +00:00
Fred Drake e20131efc3 Fix a couple of whitespace consistency nits. 2002-08-26 21:20:30 +00:00
Fred Drake 6049cb8918 Simplify, and avoid PyModule_GetDict() while we're at it. 2002-08-26 21:15:11 +00:00
Barry Warsaw da5628f286 Fix an inaccuracy in the comment 2002-08-26 16:44:56 +00:00
Tim Peters 454602f0f7 Gave intersection_update a speed boost. 2002-08-26 00:44:07 +00:00
Tim Peters cd06eeb20c Gave issubet() and issuperset() major speed boosts. That's it for now!
Someone else may want to tackle the mutating operations similarly.
2002-08-25 20:12:19 +00:00
Tim Peters b8940393e9 Gave __sub__/difference a factor of 2-5 speed boost. 2002-08-25 19:50:43 +00:00
Tim Peters 334b4a5c39 Gave __xor__/symmetric_difference a factor of 2-5 speed boost. 2002-08-25 19:47:54 +00:00
Tim Peters 37faed2532 Sped union by a factor of 3-4. 2002-08-25 19:21:27 +00:00
Tim Peters d33e6be59d Sped intersection by large factors (3-5x faster than before on sets of
cardinality 500; and the smaller the intersection, the bigger the speedup).
2002-08-25 19:12:45 +00:00
Tim Peters 4a2f91e302 Added a clue about why xyz_update isn't the same as __xyz__. 2002-08-25 18:59:04 +00:00
Tim Peters ea76c98014 Implemented <, <=, >, >= for sets, giving subset and proper-subset
meanings.  I did not add new, e.g., ispropersubset() methods; we're
going nuts on those, and, e.g., there was no "friendly name" for
== either.
2002-08-25 18:43:10 +00:00
Tim Peters 93d8d48c15 TestSubset(): Generalized the framework to support testing upcoming
<, <=, etc methods too.
2002-08-25 18:21:47 +00:00
Tim Peters 4127e91d20 Rewrote all remaining assert stmts. 2002-08-25 18:02:29 +00:00
Tim Peters 62c62438ff Simplified construction of the test suite. 2002-08-25 17:49:04 +00:00
Tim Peters de830ca4eb Simplified code building sets of characters. 2002-08-25 17:40:29 +00:00
Tim Peters a777799040 Ack! Virtually every test here relied on an assert stmt. assert stmts
should never be used in tests.  Repaired dozens, but more is needed.
2002-08-25 17:38:49 +00:00
Tim Peters 0bbb30830c Simplified the setup for is-subset testing. 2002-08-25 17:22:23 +00:00
Tim Peters 4924db176b Record a clue about why __or__ is not union, etc. 2002-08-25 17:10:17 +00:00
Raymond Hettinger c8f8034512 Replace 0 with False to match working in documentation. SF 599681. 2002-08-25 16:36:49 +00:00
Raymond Hettinger 7ad09552d0 Correct documentation of allow_reuse_address to match the actual script.
Closes SF bug 599681.
2002-08-25 16:27:33 +00:00
Kurt B. Kaiser adc63847e4 1. Revert subprocess environment clearing, will restart subprocess
instead.
2. Preserve the Idle client's listening socket for reuse with the
   fresh subprocess.
3. Remove some unused rpc code, comment out additional unused code.

Modified Files:
ScriptBinding.py rpc.py run.py
2002-08-25 14:08:07 +00:00
Kurt B. Kaiser a552e3a0c9 Improve exception handling across rpc interface
Modified Files:
 	rpc.py
2002-08-24 23:57:17 +00:00
Raymond Hettinger e87ab3fefe Removed < <= > >= from the API. Implemented as comparisons of the
underlying dictionaries, there were no reasonable use cases (lexicographic
sorting of a list of sets is somewhat esoteric).  Frees the operators
for other uses (such as strict subset and superset comparisons).

Updated documentation and test suite accordingly.
2002-08-24 07:33:06 +00:00
Guido van Rossum bf935fde15 string_contains(): speed up by avoiding function calls where
possible.  This always called PyUnicode_Check() and PyString_Check(),
at least one of which would call PyType_IsSubtype().  Also, this would
call PyString_Size() on known string objects.
2002-08-24 06:57:49 +00:00
Guido van Rossum 9d6897accc Speed up the most egregious "if token in (long tuple)" cases by using
a dict instead.  (Alas, using a Set would be slower instead of
faster.)
2002-08-24 06:54:19 +00:00
Guido van Rossum 6248f441ea Speedup for PyObject_IsTrue(): check for True and False first.
Because all built-in tests return bools now, this is the most common
path!
2002-08-24 06:31:34 +00:00
Raymond Hettinger 1b9f5d4c1a At Tim Peter's suggestion, propagated GvR's binary operator changes to
the inplace operators.  The strategy is to have the operator overloading
code do the work and then to define equivalent method calls which rely on
the operators.  The changes facilitate proper application of TypeError
and NonImplementedErrors.

Added corresponding tests to the test suite to make sure both the operator
and method call versions get exercised.

Add missing tests for difference_update().
2002-08-24 06:19:02 +00:00
Guido van Rossum 81912d4764 Speedup for PyObject_RichCompareBool(): PyObject_RichCompare() almost
always returns a bool, so avoid calling PyObject_IsTrue() in that
case.
2002-08-24 05:33:28 +00:00
Raymond Hettinger d50185127f Since instances of _TemporarilyImmutableSet are always thrown away
immediately after the comparison, there in no use in caching the hashcode.
The test, 'if self._hashcode is None', never fails.  Removing the caching
saves a few lines and a little time.
2002-08-24 04:47:42 +00:00
Raymond Hettinger 045e51a9a5 Expanded tests for sets of sets. 2002-08-24 02:56:01 +00:00