Martin v. Löwis [Sun, 26 Sep 2004 17:26:55 +0000 (17:26 +0000)]
Replace -soname with -h for Solaris compatibility. Fixes #
1034496.
Backported to 2.3.
Tim Peters [Sun, 26 Sep 2004 05:13:18 +0000 (05:13 +0000)]
Updated doctest doc news.
Tim Peters [Sun, 26 Sep 2004 05:09:59 +0000 (05:09 +0000)]
Added a lot of new stuff to the debugging section.
Tim Peters [Sun, 26 Sep 2004 03:50:06 +0000 (03:50 +0000)]
Removed debug_script from the public API: no docs, not public. I'm in
the process of writing docs for the other "missing" debug support
functions.
Tim Peters [Sun, 26 Sep 2004 02:38:41 +0000 (02:38 +0000)]
register_optionflag(): Moved from the Debugging section to the section
on option flags; added a versionadded decoration.
Tim Peters [Sun, 26 Sep 2004 02:12:40 +0000 (02:12 +0000)]
Document set_unittest_reportflags().
Tim Peters [Sun, 26 Sep 2004 01:50:24 +0000 (01:50 +0000)]
Add set_unittest_reportflags() to the public API. Docs will follow
"soon", after I repair the LaTeX I somehow damaged.
Tim Peters [Sun, 26 Sep 2004 01:24:23 +0000 (01:24 +0000)]
Removed two undocumented unittest support classes, and one undocumented
unittest support function, from the public interface. If they're not
documented, they shouldn't be public.
Raymond Hettinger [Sat, 25 Sep 2004 08:09:23 +0000 (08:09 +0000)]
Fix double word error.
Tim Peters [Sat, 25 Sep 2004 03:50:35 +0000 (03:50 +0000)]
Assorted minor changes, plus a lot more soap.
Tim Peters [Sat, 25 Sep 2004 03:02:23 +0000 (03:02 +0000)]
Explain the motivation for the unittest functions, and beef up the
example. Squash repeated argument descriptions. Minor rewordings.
Tim Peters [Sat, 25 Sep 2004 02:41:28 +0000 (02:41 +0000)]
Removed most of the module docstring. There's too much to explain now,
and the LaTeX docs are in increasingly good shape.
Tim Peters [Sat, 25 Sep 2004 01:51:49 +0000 (01:51 +0000)]
Repaired mistakes in the descriptions of testmod()/testfile(), and
squashed massive duplication of common argument descriptions.
Brett Cannon [Sat, 25 Sep 2004 01:39:56 +0000 (01:39 +0000)]
Add warning notation about using 'bomb' setting.
Brett Cannon [Sat, 25 Sep 2004 01:37:24 +0000 (01:37 +0000)]
Remove 'extern' declaration for _Py_SwappedOp.
Tim Peters [Sat, 25 Sep 2004 01:30:16 +0000 (01:30 +0000)]
Since the doctest warnings section was reduced to one bullet point,
get rid of the itemize structure.
Tim Peters [Sat, 25 Sep 2004 01:22:29 +0000 (01:22 +0000)]
In the "doctest warnings" section, removed obsolete info, and noted that
ELLIPSIS can be used to deal with examples that embed object addresses.
Johannes Gijsbers [Sat, 25 Sep 2004 00:55:38 +0000 (00:55 +0000)]
Raymond observed that sometimes it's better not to link modules, so I reverted
part of my previous last changes.
Tim Peters [Sat, 25 Sep 2004 00:49:53 +0000 (00:49 +0000)]
Beef up the section on testfile(), giving a complete example in
reStructuredText format. Remove words describing the return value of
testmod() and testfile() in the intro sections, since it's never
useful in such simple cases.
Tim Peters [Sat, 25 Sep 2004 00:11:43 +0000 (00:11 +0000)]
Typo.
Tim Peters [Sat, 25 Sep 2004 00:10:53 +0000 (00:10 +0000)]
Since the LaTeX isn't doctest'ed, examples are always wrong <wink>.
Johannes Gijsbers [Fri, 24 Sep 2004 23:25:25 +0000 (23:25 +0000)]
- Use itemize instead of plain-text '*' for marking up a list.
- Add more ulink's to modules (this should probably become a standard macro).
Tim Peters [Fri, 24 Sep 2004 23:16:41 +0000 (23:16 +0000)]
Whitespace normalization.
Johannes Gijsbers [Fri, 24 Sep 2004 21:36:52 +0000 (21:36 +0000)]
Port test_unpack to doctest (patch #736962).
Neil Schemenauer [Fri, 24 Sep 2004 19:18:42 +0000 (19:18 +0000)]
Add yet more tests for buffer().
Neil Schemenauer [Fri, 24 Sep 2004 19:17:26 +0000 (19:17 +0000)]
Ensure negative offsets cannot be passed to buffer(). When composing
buffers, compute the new buffer size based on the old buffer size.
Fixes SF bug #
1034242.
Neil Schemenauer [Fri, 24 Sep 2004 15:41:27 +0000 (15:41 +0000)]
Fix buffer offset calculation (need to compute it before changing
'base'). Fixes SF bug #
1033720. Move offset sanity checking to
buffer_from_memory().
Neil Schemenauer [Fri, 24 Sep 2004 15:35:15 +0000 (15:35 +0000)]
Add a few more tests for the buffer() object.
Vinay Sajip [Fri, 24 Sep 2004 11:46:44 +0000 (11:46 +0000)]
Added log() function documentation
Vinay Sajip [Fri, 24 Sep 2004 11:45:52 +0000 (11:45 +0000)]
Added log() function
Vinay Sajip [Fri, 24 Sep 2004 11:45:13 +0000 (11:45 +0000)]
Added exception handling during handler initialization in fileConfig()
Tim Peters [Fri, 24 Sep 2004 04:36:47 +0000 (04:36 +0000)]
Whitespace normalization.
Raymond Hettinger [Fri, 24 Sep 2004 04:31:19 +0000 (04:31 +0000)]
Add docstrings for regular expression objects and methods.
Raymond Hettinger [Fri, 24 Sep 2004 03:41:05 +0000 (03:41 +0000)]
Granted Noam Raphael's request for minor improvements to the re module and
its documentation.
* Documented that the compiled re methods are supposed to be more full
featured than their simpilified function counterparts.
* Documented the existing start and stop position arguments for the
findall() and finditer() methods of compiled regular expression objects.
* Added an optional flags argument to the re.findall() and re.finditer()
functions. This aligns their API with that for re.search() and
re.match().
Andrew M. Kuchling [Thu, 23 Sep 2004 20:17:26 +0000 (20:17 +0000)]
Update for beta1
Andrew M. Kuchling [Thu, 23 Sep 2004 20:15:41 +0000 (20:15 +0000)]
Add various items
Tim Peters [Thu, 23 Sep 2004 19:22:41 +0000 (19:22 +0000)]
float_richcompare(): Use the new Py_IS_NAN macro to ensure that, on
platforms where that macro works, NaN compared to an int or long works
the same as NaN compared to a finite float.
Tim Peters [Thu, 23 Sep 2004 19:11:32 +0000 (19:11 +0000)]
Introduced a Py_IS_NAN macro, which probably works on the major platforms
today. pyconfig.h can override it if not, and can also override
Py_IS_INFINITY now. Py_IS_NAN and Py_IS_INFINITY are overridden now
for Microsoft compilers, using efficient MS-specific spellings.
Tim Peters [Thu, 23 Sep 2004 08:06:40 +0000 (08:06 +0000)]
SF bug #513866: Float/long comparison anomaly.
When an integer is compared to a float now, the int isn't coerced to float.
This avoids spurious overflow exceptions and insane results. This should
compute correct results, without raising spurious exceptions, in all cases
now -- although I expect that what happens when an int/long is compared to
a NaN is still a platform accident.
Note that we had potential problems here even with "short" ints, on boxes
where sizeof(long)==8. There's #ifdef'ed code here to handle that, but
I can't test it as intended. I tested it by changing the #ifdef to
trigger on my 32-bit box instead.
I suppose this is a bugfix candidate, but I won't backport it. It's
long-winded (for speed) and messy (because the problem is messy). Note
that this also depends on a previous 2.4 patch that introduced
_Py_SwappedOp[] as an extern.
Raymond Hettinger [Thu, 23 Sep 2004 07:27:39 +0000 (07:27 +0000)]
Improve three recipes in the itertools docs.
Raymond Hettinger [Thu, 23 Sep 2004 07:00:47 +0000 (07:00 +0000)]
Arghh, checked in wrong draft. Replacing with correct one.
Raymond Hettinger [Thu, 23 Sep 2004 06:43:25 +0000 (06:43 +0000)]
Use local variables in StringIO.write().
Makes it easier on the eyes and a bit more snappy.
Phillip J. Eby [Thu, 23 Sep 2004 04:37:36 +0000 (04:37 +0000)]
Fix for SF bug #
1029475 : reload() doesn't work with PEP 302 loaders.
Tim Peters [Thu, 23 Sep 2004 02:39:37 +0000 (02:39 +0000)]
A static swapped_op[] array was defined in 3 different C files, & I think
I need to define it again. Bite the bullet and define it once as an
extern, _Py_SwappedOp[].
Tim Peters [Thu, 23 Sep 2004 01:56:02 +0000 (01:56 +0000)]
Removed redundant declaration of _PyLong_NumBits().
Raymond Hettinger [Wed, 22 Sep 2004 18:44:21 +0000 (18:44 +0000)]
SF patch #
1031667: Fold tuples of constants into a single constant
Example:
>>> import dis
>>> dis.dis(compile('1,2,3', '', 'eval'))
0 0 LOAD_CONST 3 ((1, 2, 3))
3 RETURN_VALUE
Raymond Hettinger [Wed, 22 Sep 2004 18:03:47 +0000 (18:03 +0000)]
Clarify that iteration is over headers, not Mime elements.
Raymond Hettinger [Wed, 22 Sep 2004 17:17:32 +0000 (17:17 +0000)]
Bug #
1030125: rfc822 __iter__ problem
Add iteration support to the Message class.
Vinay Sajip [Wed, 22 Sep 2004 12:55:16 +0000 (12:55 +0000)]
Added getLoggerClass()
Vinay Sajip [Wed, 22 Sep 2004 12:39:26 +0000 (12:39 +0000)]
Added getLoggerClass()
Edward Loper [Tue, 21 Sep 2004 03:24:24 +0000 (03:24 +0000)]
- Minor docstring fixes.
- Simplified code to find names for file-based tests.
Edward Loper [Tue, 21 Sep 2004 03:20:34 +0000 (03:20 +0000)]
- Changed SampleClass docstrings to test docstring parsing a little
more thouroughly.
Edward Loper [Tue, 21 Sep 2004 03:00:51 +0000 (03:00 +0000)]
- Updated docs to reflect changes in 2.4.
- Reorganized the documentation
- Shifted focus a little more towards "literate testing"
- Documented new functions and classes:
- testfile()
- Example, DocTest
- DocTestParser, DocTestFinder, DocTestRunner, OutputChecker
- DocFileSuite
- DebugRunner, DocTestFailure, UnexpectedException
- register_optionflag()
Brett Cannon [Mon, 20 Sep 2004 22:33:21 +0000 (22:33 +0000)]
Add a commented-out recipe on making trailing whitespace explicit.
If people think this is not too intrusive it could be uncommented.
Tim Peters [Mon, 20 Sep 2004 19:52:34 +0000 (19:52 +0000)]
Whitespace normalization.
Raymond Hettinger [Mon, 20 Sep 2004 18:08:31 +0000 (18:08 +0000)]
Import no longer needed.
Raymond Hettinger [Mon, 20 Sep 2004 17:47:46 +0000 (17:47 +0000)]
Fix minor grammar typo.
Skip Montanaro [Mon, 20 Sep 2004 16:43:30 +0000 (16:43 +0000)]
Raymond reminded me to use DSU key
Skip Montanaro [Mon, 20 Sep 2004 15:40:38 +0000 (15:40 +0000)]
Sort classes by fully qualified name. In the common case where you are
displaying a set of classes from one module it doesn't matter, but if you
are displaying a large class tree from multiple modules it improves the
display to sort by module.name.
Martin v. Löwis [Mon, 20 Sep 2004 06:17:46 +0000 (06:17 +0000)]
Patch #
1024670: Support int objects in PyLong_AsUnsignedLong[Mask].
Martin v. Löwis [Sun, 19 Sep 2004 18:36:45 +0000 (18:36 +0000)]
Fix lib-tk PythonPath.
Edward Loper [Sun, 19 Sep 2004 17:19:33 +0000 (17:19 +0000)]
- Added "testfile" function, a simple function for running & verifying
all examples in a given text file. (analagous to "testmod")
- Minor docstring fixes.
- Added module_relative parameter to DocTestFile/DocTestSuite, which
controls whether paths are module-relative & os-independent, or
os-specific.
Raymond Hettinger [Sun, 19 Sep 2004 06:00:15 +0000 (06:00 +0000)]
SF bug #
1030557: PyMapping_Check crashes when argument is NULL
Make PySequence_Check() and PyMapping_Check() handle NULL inputs. This
goes beyond what most of the other checks do, but it is nice defensive
programming and solves the OP's problem.
Brett Cannon [Sun, 19 Sep 2004 05:43:13 +0000 (05:43 +0000)]
When this file is sourced in, or used as, one's vimrc file it will set the proper settings to follow the style guidelines laid out in PEPs 7 & 8 as best it can without forcing extraneous settings.
Suggested settings are commented out and included at the end of the file.
The goal is to have this file prevent as much as possible from deviating from the style guidelines. It is not meant to collect every cool macro possible for Python. Any useful settings for features included with Vim can be included and commented out, but anything overly extraneous should be left out.
Raymond Hettinger [Sun, 19 Sep 2004 01:54:09 +0000 (01:54 +0000)]
SF patch #
1020845: Decimal performance enhancements
(Contributed by Nick Coghlan.)
Various code cleanups and optimizations (saves about 40% on testsuite
execution time and on the telco benchmark).
* caches results of various operations on self (esp. checks for being
a special value).
* _WorkRep now uses ints and longs for intermediate computations.
Edward Loper [Sun, 19 Sep 2004 01:16:44 +0000 (01:16 +0000)]
- Updated example output to match actual output
- Minor wording changes
- Changed the docs to reflect the fact that multiple option directives
can be specified on a single line (and updated the directive
production list, as well).
Barry Warsaw [Sat, 18 Sep 2004 21:13:43 +0000 (21:13 +0000)]
Update Template/PEP 292 documentation to current implementation.
Edward Loper [Sat, 18 Sep 2004 20:27:04 +0000 (20:27 +0000)]
In DocFileTest:
- Fixed bug in handling of absolute paths.
- If run from an interactive session, make paths relative to the
directory containing sys.argv[0] (since __main__ doesn't have
a __file__ attribute).
Martin v. Löwis [Sat, 18 Sep 2004 16:16:34 +0000 (16:16 +0000)]
Link with ws2_32 instead of wsock32.
Martin v. Löwis [Sat, 18 Sep 2004 16:07:58 +0000 (16:07 +0000)]
Patch #
1021596: Check for None to determine whether _urandomfd is
uninitialized.
Martin v. Löwis [Sat, 18 Sep 2004 16:01:23 +0000 (16:01 +0000)]
Convert boolean results back to strings. Fixes #807871.
Will backport to 2.3.
Martin v. Löwis [Sat, 18 Sep 2004 10:07:03 +0000 (10:07 +0000)]
Make curses.h inclusion conditional as in the original patch #
1012280.
Backported to 2.3.
Martin v. Löwis [Sat, 18 Sep 2004 09:54:52 +0000 (09:54 +0000)]
Patch #
1012280: Include curses.h for term.h check. Fixes #933795.
Will backport to 2.3.
Martin v. Löwis [Sat, 18 Sep 2004 09:08:52 +0000 (09:08 +0000)]
Patch #
1029061: Always extract member names from the tarinfo.
Martin v. Löwis [Sat, 18 Sep 2004 09:03:49 +0000 (09:03 +0000)]
Patch #
1025790: Add status code constants to httplib.
Barry Warsaw [Sat, 18 Sep 2004 00:06:34 +0000 (00:06 +0000)]
At the cost of a modest (but useful in its own right) change in the semantics
of the Template.delimiter attribute, we make use of the delimiter in the
escaped group, and in the safe_substitute() method more robust.
Now, .delimiter should be the unescaped delimiter literal, e.g. '$' or '&', or
whatever. The _TemplateMetaclass will re.escape() this value when it builds
the pattern.
Fred Drake [Fri, 17 Sep 2004 20:23:47 +0000 (20:23 +0000)]
remove gzipped archives from the list of expected distributions
Sean Reifschneider [Fri, 17 Sep 2004 08:34:12 +0000 (08:34 +0000)]
SF Patch
1022011: Add a command-line argument --no-autoreq, which sets the
"AutoReq: 0" to disable automatic dependency searching.
Sean Reifschneider [Fri, 17 Sep 2004 08:23:22 +0000 (08:23 +0000)]
SF Patch
1022003: Change bdist_rpm _topdir to use
os.path.abspath(self.rpm_base) instead of os.getcwd() + '/' + self.rpm_base
Raymond Hettinger [Thu, 16 Sep 2004 16:41:57 +0000 (16:41 +0000)]
SF bug #
1014215: Unspecific errors with metaclass
High level error message was stomping useful detailed messages from lower
level routines.
The new approach is to augment string error messages returned by the low
level routines. The provides both high and low level information. If
the exception value is not a string, no changes are made.
To see the improved messages in action, type:
import random
class R(random): pass
class B(bool): pass
Skip Montanaro [Thu, 16 Sep 2004 03:28:13 +0000 (03:28 +0000)]
Initialize sep and seplen to suppress warning from gcc.
Tim Peters [Thu, 16 Sep 2004 01:30:50 +0000 (01:30 +0000)]
SF bug #
1028306: date-datetime comparison
Treat comparing a date to a datetime like a mixed-type comparison.
Tim Peters [Thu, 16 Sep 2004 00:09:19 +0000 (00:09 +0000)]
Whitespace normalization.
Brett Cannon [Wed, 15 Sep 2004 23:26:23 +0000 (23:26 +0000)]
Remove tabs.
Thomas Heller [Wed, 15 Sep 2004 11:41:32 +0000 (11:41 +0000)]
Add a missing line continuation character.
Martin v. Löwis [Wed, 15 Sep 2004 06:02:54 +0000 (06:02 +0000)]
Patch #
1026986: Add OpenBSD 3.5 and 3.6 to list of broken systems.
Martin v. Löwis [Tue, 14 Sep 2004 21:45:36 +0000 (21:45 +0000)]
Strip square brackets from IPv6 address.
Skip Montanaro [Tue, 14 Sep 2004 17:58:31 +0000 (17:58 +0000)]
mention httplib ipv6 fix
Skip Montanaro [Tue, 14 Sep 2004 17:55:21 +0000 (17:55 +0000)]
missed the obvious test case and corresponding fix
Michael W. Hudson [Tue, 14 Sep 2004 17:19:09 +0000 (17:19 +0000)]
Make the word "module" appear in the error string for calling the
module type with silly arguments. (The exact name can be quibbled
over, if you care).
This was partially inspired by bug #
1014215 and so on, but is also
just a good idea.
Michael W. Hudson [Tue, 14 Sep 2004 17:09:47 +0000 (17:09 +0000)]
Move a comment back to its rightful location.
Skip Montanaro [Tue, 14 Sep 2004 16:32:02 +0000 (16:32 +0000)]
Search from the end of the host/port combination to find the colon which
separates ip address from the port to accommodate ipv6 addresses.
Walter Dörwald [Tue, 14 Sep 2004 09:45:10 +0000 (09:45 +0000)]
Make the hint about the None default less ambiguous.
Walter Dörwald [Tue, 14 Sep 2004 09:40:45 +0000 (09:40 +0000)]
Enhance the docstrings for unicode.split() and string.split()
to make it clear that it is possible to pass None as the
separator argument to get the default "any whitespace" separator.
Martin v. Löwis [Tue, 14 Sep 2004 07:52:22 +0000 (07:52 +0000)]
Remove claims that Python source code is ASCII. Fixes #
1026038.
Raymond Hettinger [Tue, 14 Sep 2004 06:32:20 +0000 (06:32 +0000)]
Tweak the wording. Improve examples. Make more brief.
Raymond Hettinger [Tue, 14 Sep 2004 05:21:42 +0000 (05:21 +0000)]
Cover string.Template in the tutorial's library tour.
Raymond Hettinger [Tue, 14 Sep 2004 02:34:08 +0000 (02:34 +0000)]
Fix small bugs in Template code.
* The parameterization of "delimiter" was incomplete.
* safe_substitute's code for braced delimiters should only be executed
when braced is not None.
* Invalid pattern group names now raise a ValueError. Formerly, the
convert code would fall off the end and improperly return None.
Beefed-up tests.
* Test delimiter override for all paths in substitute and safe_substitute.
* Alter unittest invocation to match other modules (now it itemizes the
tests as they are run).
Raymond Hettinger [Mon, 13 Sep 2004 22:23:21 +0000 (22:23 +0000)]
SF #
1027105: HardwareRandom should be renamed OSRandom
Renamed the new generator at Trevor's recommendation.
The name HardwareRandom suggested a bit more than it
delivered (no radioactive decay detectors or such).
Barry Warsaw [Mon, 13 Sep 2004 20:53:27 +0000 (20:53 +0000)]
The 4th group is now 'invalid' instead of 'bogus'.