]> granicus.if.org Git - python/log
python
20 years agoFix the spelling of Fredrik Lundh's last name (unless there really is a
Brett Cannon [Fri, 27 Aug 2004 05:00:22 +0000 (05:00 +0000)]
Fix the spelling of Fredrik Lundh's last name (unless there really is a
"Fredrik Lund" who contributed the code in question).

20 years agoRemove unused method _OutputRedirectingPdb.resume
Edward Loper [Fri, 27 Aug 2004 04:29:23 +0000 (04:29 +0000)]
Remove unused method _OutputRedirectingPdb.resume

20 years ago- Removed redundant call to expandtabs in DocTestParesr.
Edward Loper [Fri, 27 Aug 2004 02:07:46 +0000 (02:07 +0000)]
- Removed redundant call to expandtabs in DocTestParesr.
- Improvements to interactive debugging support:
  - Changed the replacement pdb.set_trace to redirect stdout to the
    real stdout *only* during interactive debugging; stdout from code
    continues to go to the fake stdout.
  - When the interactive debugger gets to the end of an example,
    automatically continue.
  - Use a replacement linecache.getlines that will return source lines
    from doctest examples; this makes the source available to the
    debugger for interactive debugging.
- In test_doctest, use a specialized _FakeOutput class instead of a
  temporary file to fake stdin for the interactive interpreter.

20 years agoPyUnicode_Join(): Two primary aims:
Tim Peters [Fri, 27 Aug 2004 01:49:32 +0000 (01:49 +0000)]
PyUnicode_Join():  Two primary aims:

1. u1.join([u2]) is u2
2. Be more careful about C-level int overflow.

Since PySequence_Fast() isn't needed to achieve #1, it's not used -- but
the code could sure be simpler if it were.

20 years ago- Added DocTestParser.parse(), which parses a docstring into Examples
Edward Loper [Thu, 26 Aug 2004 18:05:07 +0000 (18:05 +0000)]
- Added DocTestParser.parse(), which parses a docstring into Examples
  and intervening text strings.
- Removed DocTestParser.get_program(): use script_from_examples()
  instead.
- Fixed bug in DocTestParser._INDENT_RE
- Fixed bug in DocTestParser._min_indent
- Moved _want_comment() to the utility function section

20 years agoMove test_bug1001011() to string_tests.MixinStrUnicodeTest so that
Walter Dörwald [Thu, 26 Aug 2004 16:53:04 +0000 (16:53 +0000)]
Move test_bug1001011() to string_tests.MixinStrUnicodeTest so that
it can be used for str and unicode. Drop the test for
   "".join([s]) is s
because this is an implementation detail (and doesn't work for unicode)

20 years agoCorrect incorrect "it's" to "its".
Johannes Gijsbers [Thu, 26 Aug 2004 10:40:12 +0000 (10:40 +0000)]
Correct incorrect "it's" to "its".

20 years agooutput_difference(): In fancy-diff cases, the way this split expected &
Tim Peters [Thu, 26 Aug 2004 05:44:27 +0000 (05:44 +0000)]
output_difference():  In fancy-diff cases, the way this split expected &
actual output into lines created spurious empty lines at the ends of
each.  Those matched, but the fancy diffs had surprising line counts (1
larger than expected), and tests kept having to slam <BLANKLINE> into the
expected output to account for this.  Using the splitlines() string method
with keepends=True instead accomplishes what was intended directly.

20 years agoAdd missing executable option to DummyCommand.
Martin v. Löwis [Thu, 26 Aug 2004 05:44:02 +0000 (05:44 +0000)]
Add missing executable option to DummyCommand.

20 years agoWhitespace normalization.
Tim Peters [Thu, 26 Aug 2004 05:23:19 +0000 (05:23 +0000)]
Whitespace normalization.

20 years ago_do_a_fancy_diff(): Pay no attention to the ellipses behind the curtain.
Tim Peters [Thu, 26 Aug 2004 05:21:59 +0000 (05:21 +0000)]
_do_a_fancy_diff():  Pay no attention to the ellipses behind the curtain.

While a fancy diff can be confusing in the presence of ellipses, so far
I'm finding (2-0-0) that it's much more a major aid in narrowing down the
possibilities when an ellipsis-slinging test fails.  So we no longer
refuse to do a fancy diff just because of ellipses.

This isn't ideal; it's just better.

20 years agoFine tune a word.
Tim Peters [Thu, 26 Aug 2004 04:52:46 +0000 (04:52 +0000)]
Fine tune a word.

20 years agoThinko repair.
Tim Peters [Thu, 26 Aug 2004 04:50:38 +0000 (04:50 +0000)]
Thinko repair.

20 years agoReorg of exception section. Now that there are fewer details needing
Tim Peters [Thu, 26 Aug 2004 04:47:31 +0000 (04:47 +0000)]
Reorg of exception section.  Now that there are fewer details needing
explanation, it's easier to push the remaining insufferably anal details
into a "fine print" section at the bottom.

20 years agoRemove unnecessary line.
Raymond Hettinger [Thu, 26 Aug 2004 04:29:47 +0000 (04:29 +0000)]
Remove unnecessary line.

20 years agoSmall wording fixups.
Raymond Hettinger [Thu, 26 Aug 2004 03:11:56 +0000 (03:11 +0000)]
Small wording fixups.

20 years agoChanged OutputChecker.output_difference to expect an Example object,
Edward Loper [Thu, 26 Aug 2004 03:00:24 +0000 (03:00 +0000)]
Changed OutputChecker.output_difference to expect an Example object,
rather than an expected output string.  This gives the
output_difference method access to more information, such as the
indentation of the example, which might be useful.

20 years agoAdded REPORT_ONLY_FIRST_FAILURE flag, which supresses output after the
Edward Loper [Thu, 26 Aug 2004 02:45:51 +0000 (02:45 +0000)]
Added REPORT_ONLY_FIRST_FAILURE flag, which supresses output after the
first failing example in each test.

20 years agoWhen building with --disable-toolbox-glue under Darwin, skip building any
Brett Cannon [Thu, 26 Aug 2004 01:44:07 +0000 (01:44 +0000)]
When building with --disable-toolbox-glue under Darwin, skip building any
Mac-specific modules.  Before all modules were compiled but would fail thanks
to a dependence on the code included when Python was built without the compiler
flag.

Closes bug #991962.

20 years agoRenamed UNIFIED_DIFF->REPORT_UDIFF; CONTEXT_DIFF->REPORT_CDIFF; and
Edward Loper [Thu, 26 Aug 2004 01:41:51 +0000 (01:41 +0000)]
Renamed UNIFIED_DIFF->REPORT_UDIFF; CONTEXT_DIFF->REPORT_CDIFF; and
NDIFF_DIFF->REPORT_NDIFF.  This establishes the naming convention that
all reporting options should begin with "REPORT_" (since reporting
options are a different class from output comparison options; but they
are both set in optionflags).

20 years agoShortened diff output for unified & context diffs
Edward Loper [Thu, 26 Aug 2004 01:31:56 +0000 (01:31 +0000)]
Shortened diff output for unified & context diffs

20 years ago- Changed the output of report_start() and report_unexpected_exception()
Edward Loper [Thu, 26 Aug 2004 01:19:50 +0000 (01:19 +0000)]
- Changed the output of report_start() and report_unexpected_exception()
  to be more consistent with report_failure()
- If `want` or `got` is empty, then print "Expected nothing\n" or
  "Got nothing\n" rather than "Expected:\n" or "Got:\n"
- Got rid of _tag_msg

20 years agoRestored half of a \versionadded only half of which should have been
Tim Peters [Thu, 26 Aug 2004 01:02:08 +0000 (01:02 +0000)]
Restored half of a \versionadded only half of which should have been
deleted.

20 years agoPatch #1015012. Improve markup and punctuation in libsocket.tex
Dave Cole [Thu, 26 Aug 2004 00:51:16 +0000 (00:51 +0000)]
Patch #1015012.  Improve markup and punctuation in libsocket.tex

20 years agoPatch #1014930. Expose current parse location to XMLParser.
Dave Cole [Thu, 26 Aug 2004 00:37:31 +0000 (00:37 +0000)]
Patch #1014930.  Expose current parse location to XMLParser.

20 years agoMinor improvements to the template code.
Raymond Hettinger [Thu, 26 Aug 2004 00:21:13 +0000 (00:21 +0000)]
Minor improvements to the template code.

* Add comment bars segregating this code from the rest.
* Improve readability of the re pattern with indentation and comments on
  the same line.
* Replace the groupdict() and get() pair with a direct call to group()
  which does the same thing.

20 years agoAdded an "exc_msg" attribute to Example (containing the expected
Edward Loper [Thu, 26 Aug 2004 00:05:43 +0000 (00:05 +0000)]
Added an "exc_msg" attribute to Example (containing the expected
exception message, or None if no exception is expected); and moved
exception parsing from DocTestRunner to DocTestParser.  This is
architecturally cleaner, since it moves all parsing work to
DocTestParser; and it should make it easier for code outside
DocTestRunner (notably debugging code) to properly handle expected
exceptions.

20 years agoRe-generate configure with recent configure.in change (for patch #1016224).
Trent Mick [Wed, 25 Aug 2004 23:59:39 +0000 (23:59 +0000)]
Re-generate configure with recent configure.in change (for patch #1016224).

20 years agoApply patch #1016224: configure.in change to allow build of _bsddb module on
Trent Mick [Wed, 25 Aug 2004 23:55:59 +0000 (23:55 +0000)]
Apply patch #1016224: configure.in change to allow build of _bsddb module on
AIX 5.1.

20 years agoOnly recognize the expected output as an exception if it *starts* with
Edward Loper [Wed, 25 Aug 2004 23:07:03 +0000 (23:07 +0000)]
Only recognize the expected output as an exception if it *starts* with
a traceback message.  I.e., examples that raise exceptions may no
longer generate pre-exception output.  This restores the behavior of
doctest in python 2.3.  The ability to check pre-exception output is
being removed because it makes the documentation simpler; and because
there are very few use cases for it.

20 years agoFix docstring typo.
Raymond Hettinger [Wed, 25 Aug 2004 19:42:12 +0000 (19:42 +0000)]
Fix docstring typo.

20 years agoBypass peepholing of code with lineno tables having intervals >= 255.
Raymond Hettinger [Wed, 25 Aug 2004 17:19:38 +0000 (17:19 +0000)]
Bypass peepholing of code with lineno tables having intervals >= 255.
Allows the lineno fixup code to remain simple and not have to deal with
multibyte codings.

* Add an assertion to that effect.
* Remove the XXX comment on the subject.

20 years agoFix typo in comment and add clarification.
Raymond Hettinger [Wed, 25 Aug 2004 15:15:56 +0000 (15:15 +0000)]
Fix typo in comment and add clarification.

20 years agoclean up markup for --executable description
Fred Drake [Wed, 25 Aug 2004 14:01:32 +0000 (14:01 +0000)]
clean up markup for --executable description

20 years agoAdd various items
Andrew M. Kuchling [Wed, 25 Aug 2004 13:38:46 +0000 (13:38 +0000)]
Add various items

20 years agoPatch #970015: Replace - by _ in version and release.
Martin v. Löwis [Wed, 25 Aug 2004 13:04:53 +0000 (13:04 +0000)]
Patch #970015: Replace - by _ in version and release.

20 years agoPatch #970019: Include version and release in the BuildRoot.
Martin v. Löwis [Wed, 25 Aug 2004 13:00:34 +0000 (13:00 +0000)]
Patch #970019: Include version and release in the BuildRoot.

20 years agoPatch #736857, #736859: Add -e option to build_scripts.
Martin v. Löwis [Wed, 25 Aug 2004 11:37:43 +0000 (11:37 +0000)]
Patch #736857, #736859: Add -e option to build_scripts.

20 years agoPatch #798244: More urllib2 examples.
Martin v. Löwis [Wed, 25 Aug 2004 11:24:42 +0000 (11:24 +0000)]
Patch #798244: More urllib2 examples.

20 years agoPatch #1014992: Never return more than a line from readline.
Martin v. Löwis [Wed, 25 Aug 2004 10:52:58 +0000 (10:52 +0000)]
Patch #1014992: Never return more than a line from readline.
Will backport to 2.3.

20 years agoPatch #1015021: Stop claiming that coerce can return None.
Martin v. Löwis [Wed, 25 Aug 2004 10:42:41 +0000 (10:42 +0000)]
Patch #1015021: Stop claiming that coerce can return None.
Will backport to 2.3.

20 years agoBack out 1.289, which breaks platforms needing addrinfo.h, and
Martin v. Löwis [Wed, 25 Aug 2004 06:24:58 +0000 (06:24 +0000)]
Back out 1.289, which breaks platforms needing addrinfo.h, and
1.293, 1.298, and 1.300, which have tried to fix this for specific
platforms.

20 years agoSimplify chains of conditional jumps.
Raymond Hettinger [Wed, 25 Aug 2004 03:18:29 +0000 (03:18 +0000)]
Simplify chains of conditional jumps.
(Suggested by Neal Norwitz.)

20 years agoAh whoops, we didn't turn string into a package (thanks Neal!)
Barry Warsaw [Wed, 25 Aug 2004 03:09:58 +0000 (03:09 +0000)]
Ah whoops, we didn't turn string into a package (thanks Neal!)

20 years agoPEP 292 classes Template and SafeTemplate are added to the string module.
Barry Warsaw [Wed, 25 Aug 2004 02:22:30 +0000 (02:22 +0000)]
PEP 292 classes Template and SafeTemplate are added to the string module.
This patch includes test cases and documentation updates, as well as NEWS file
updates.

This patch also updates the sre modules so that they don't import the string
module, breaking direct circular imports.

20 years agoStop producing or using OverflowWarning. PEP 237 thought this would
Tim Peters [Wed, 25 Aug 2004 02:14:08 +0000 (02:14 +0000)]
Stop producing or using OverflowWarning.  PEP 237 thought this would
happen in 2.3, but nobody noticed it still was getting generated (the
warning was disabled by default).  OverflowWarning and
PyExc_OverflowWarning should be removed for 2.5, and left notes all over
saying so.

20 years agoSF #1015517, get readline to compile with older compilers
Neal Norwitz [Wed, 25 Aug 2004 01:20:18 +0000 (01:20 +0000)]
SF #1015517, get readline to compile with older compilers

20 years agoFix for [ 1010677 ] thread Module Breaks PyGILState_Ensure(),
Mark Hammond [Tue, 24 Aug 2004 22:24:08 +0000 (22:24 +0000)]
Fix for [ 1010677 ] thread Module Breaks PyGILState_Ensure(),
and a test case.
When booting a new thread, use the PyGILState API to manage the GIL.

20 years agoKeep option parser from gobbling up the filename to be profiled and the
Skip Montanaro [Tue, 24 Aug 2004 14:26:43 +0000 (14:26 +0000)]
Keep option parser from gobbling up the filename to be profiled and the
flags it accepts.  It's too late to change optparse's default behavior now,
but I find the default setting of allow_interspersed_args very weird.

20 years agoFixed bug in DatagramHandler.send()
Vinay Sajip [Tue, 24 Aug 2004 09:36:23 +0000 (09:36 +0000)]
Fixed bug in DatagramHandler.send()

20 years agoIncorporate review comments courtesy of Neal Norwitz:
Raymond Hettinger [Tue, 24 Aug 2004 04:34:16 +0000 (04:34 +0000)]
Incorporate review comments courtesy of Neal Norwitz:
* Perform the code length check earlier.
* Eliminate the extra PyMem_Free() upon hitting an EXTENDED_ARG.
* Assert that the NOP count used in jump retargeting matches the NOPs
  eliminated in the final step.
* Add an XXX note to indicate that more work is being to done to
  handle linenotab with intervals > 255.

20 years agoSF Patch #1013667: Cleanup Peepholer Output
Raymond Hettinger [Mon, 23 Aug 2004 23:37:48 +0000 (23:37 +0000)]
SF Patch #1013667:  Cleanup Peepholer Output

* Make a pass to eliminate NOPs.  Produce code that is more readable,
  more compact, and a tiny bit faster.  Makes the peepholer more flexible
  in the scope of allowable transformations.

* With Guido's okay, bumped up the magic number so that this patch gets
  widely exercised before the alpha goes out.

20 years agoAdd Nick Coghlan for his patch solving an issue with joining string
Raymond Hettinger [Mon, 23 Aug 2004 23:30:20 +0000 (23:30 +0000)]
Add Nick Coghlan for his patch solving an issue with joining string
subclasses.

20 years agoSF Patch #1007087: Return new string for single subclass joins (Bug #1001011)
Raymond Hettinger [Mon, 23 Aug 2004 23:23:54 +0000 (23:23 +0000)]
SF Patch #1007087:  Return new string for single subclass joins (Bug #1001011)
(Patch contributed by Nick Coghlan.)

Now joining string subtypes will always return a string.
Formerly, if there were only one item, it was returned unchanged.

20 years agoThe attempt to shut up deprecation warnings for doctest's own use of
Tim Peters [Mon, 23 Aug 2004 22:42:55 +0000 (22:42 +0000)]
The attempt to shut up deprecation warnings for doctest's own use of
is_private in its tests failed if doctest.py was run directly.  Now
it works.

20 years agotest_DocTestFinder(): This test failed when test_doctest was run
Tim Peters [Mon, 23 Aug 2004 22:38:05 +0000 (22:38 +0000)]
test_DocTestFinder():  This test failed when test_doctest was run
directly, due to assuming a filename specific to running tests "the
normal way".  +ELLIPSIS to the rescue!

20 years agoMoved some test cases from doctest to test_doctest.
Tim Peters [Mon, 23 Aug 2004 22:13:22 +0000 (22:13 +0000)]
Moved some test cases from doctest to test_doctest.

20 years agoMisc cleanups.
Tim Peters [Mon, 23 Aug 2004 21:43:39 +0000 (21:43 +0000)]
Misc cleanups.

20 years agodebug_script(): I changed this in haste before to take out the use of
Tim Peters [Mon, 23 Aug 2004 21:37:56 +0000 (21:37 +0000)]
debug_script():  I changed this in haste before to take out the use of
NamedTemporaryFile (which can't work for this function's purposes on
Windows).  Leaving temp files behind wasn't a great idea either, though,
so try to clean up.  At least the test suite no longer leaves any of
these guys behind now.

20 years agoPatch #1014237: Consistently return booleans throughout.
Martin v. Löwis [Mon, 23 Aug 2004 20:42:35 +0000 (20:42 +0000)]
Patch #1014237: Consistently return booleans throughout.

20 years agoUpdated the socketpair() docstring and documentation to explain that the
Dave Cole [Mon, 23 Aug 2004 05:16:23 +0000 (05:16 +0000)]
Updated the socketpair() docstring and documentation to explain that the
default famility is AF_UNIX if defined for the platform, otherwise the
default is AF_INET.

20 years agoRemoved unnecessary calls to signal() to ignore SIGPIPE. SIGPIPE is ignored
Dave Cole [Mon, 23 Aug 2004 04:54:53 +0000 (04:54 +0000)]
Removed unnecessary calls to signal() to ignore SIGPIPE.  SIGPIPE is ignored
in initsigs() inside pythonrun.c.

20 years agoRemoved redundant versionadded{} for NDIFF_DIFF. Virtually everything
Tim Peters [Mon, 23 Aug 2004 00:26:42 +0000 (00:26 +0000)]
Removed redundant versionadded{} for NDIFF_DIFF.  Virtually everything
in this section is new in 2.4, and that's all mentioned already in
versionadded{} thingies at the end of the section.  It hurts readability
to have them after every line <wink>.

20 years agoAdd version info
Neal Norwitz [Sun, 22 Aug 2004 21:48:37 +0000 (21:48 +0000)]
Add version info

20 years agoFlush bz2 data even if nothing had been written so far. Fixes #1013882.
Martin v. Löwis [Sun, 22 Aug 2004 21:28:33 +0000 (21:28 +0000)]
Flush bz2 data even if nothing had been written so far. Fixes #1013882.
Will backport to 2.3.

20 years agoFix repr for negative imaginary part. Fixes #1013908.
Martin v. Löwis [Sun, 22 Aug 2004 21:09:15 +0000 (21:09 +0000)]
Fix repr for negative imaginary part. Fixes #1013908.

20 years agoStart deferring to the LaTeX docs for details. I'd like to move the
Tim Peters [Sun, 22 Aug 2004 20:51:53 +0000 (20:51 +0000)]
Start deferring to the LaTeX docs for details.  I'd like to move the
docstrings toward being a lot shorter, and telling the whole truth in
the manual instead.  This change is an example:  the manual has detailed
explanations of the option names now, so it's Bad to repeat them in
the docstring (two detailed descriptions are certain to get out of synch).
Just listing the names has memory-jogging benefits, though, so that's
still helpful in the docstring.

20 years agoAdded NDIFF_DIFF option.
Tim Peters [Sun, 22 Aug 2004 19:43:28 +0000 (19:43 +0000)]
Added NDIFF_DIFF option.

20 years agoWhitespace normalization.
Tim Peters [Sun, 22 Aug 2004 19:42:56 +0000 (19:42 +0000)]
Whitespace normalization.

20 years agoType in docstring.
Tim Peters [Sun, 22 Aug 2004 17:50:45 +0000 (17:50 +0000)]
Type in docstring.

20 years ago_parse_example(): Simplified new code to preserve trailing spaces before
Tim Peters [Sun, 22 Aug 2004 17:34:58 +0000 (17:34 +0000)]
_parse_example():  Simplified new code to preserve trailing spaces before
final newline.  Anything to get rid of "l" as a variable name <0.5 wink>.

20 years agoAdd acknowledgements to ExitDialog.
Martin v. Löwis [Sun, 22 Aug 2004 17:10:12 +0000 (17:10 +0000)]
Add acknowledgements to ExitDialog.

20 years agoPatch #997284: Allow pydoc to work with XP Themes (.manifest file)
Martin v. Löwis [Sun, 22 Aug 2004 16:13:26 +0000 (16:13 +0000)]
Patch #997284: Allow pydoc to work with XP Themes (.manifest file)
Will backport to 2.3.

20 years agoPatch #1009389: Make __credits__ a Unicode object.
Martin v. Löwis [Sun, 22 Aug 2004 16:08:04 +0000 (16:08 +0000)]
Patch #1009389: Make __credits__ a Unicode object.

20 years agoReplace yield with sequence class. Fixes #1009803.
Martin v. Löwis [Sun, 22 Aug 2004 16:04:50 +0000 (16:04 +0000)]
Replace yield with sequence class. Fixes #1009803.

20 years agoSF bug #1013760: Error in Chapter 4 of Tutorial
Raymond Hettinger [Sun, 22 Aug 2004 15:24:33 +0000 (15:24 +0000)]
SF bug #1013760: Error in Chapter 4 of Tutorial

Fit a nit.

20 years agoBugs fixed:
Jim Fulton [Sun, 22 Aug 2004 14:10:00 +0000 (14:10 +0000)]
Bugs fixed:

  - Test filenames sometimes had trailing .pyc or .pyo sufixes
    (when module __file__ did).

  - Trailing spaces spaces in expected output were dropped.

New default failure format:

  - Separation of examples from file info makes examples easier to see

  - More vertical separation, improving readability

  - Emacs-recognized file info (also closer to Python exception format)

20 years agoMove msi from sandbox to Tools.
Martin v. Löwis [Sun, 22 Aug 2004 13:34:34 +0000 (13:34 +0000)]
Move msi from sandbox to Tools.

20 years ago1. If user passes a non-existant filename on the commandline, just open
Kurt B. Kaiser [Sun, 22 Aug 2004 05:14:32 +0000 (05:14 +0000)]
1. If user passes a non-existant filename on the commandline, just open
   a new file, don't raise a dialog.  IDLEfork 954928.
2. Refactor EditorWindow.wakeup() to WindowList.ListedToplevel.wakeup() and
   clarify that the Toplevel of an EditorWindow is a WindowList.ListedToplevel.
3. Make a number of improvements to keyboard focus binding.  Improve window
   raising, especially in the debugger.  IDLEfork Bug 763524 (GvR list).
4. Bump idlever to 1.1a3

M Debugger.py
M EditorWindow.py
M FileList.py
M NEWS.txt
M PyShell.py
M WindowList.py
M idlever.py

20 years ago_ellipsis_match(): Removed special-casing of "...\n". The semantics
Tim Peters [Sun, 22 Aug 2004 01:47:51 +0000 (01:47 +0000)]
_ellipsis_match():  Removed special-casing of "...\n".  The semantics
are non-obvious either way because the newline character "is invisible",
but it's still there all the same, and it's easier to explain/predict
if that reality is left alone.

20 years agosf #1009373, #1005936. fix underscores in index entries in PDF files.
Neal Norwitz [Sat, 21 Aug 2004 15:13:52 +0000 (15:13 +0000)]
sf #1009373, #1005936. fix underscores in index entries in PDF files.
I couldn't test this, but it didn't break anything and the patch
reported fixed the problem.

Bugfix candidate.

20 years agoPatch #880621: the last message of a Babyl mailbox ends in '\037' instead of
Johannes Gijsbers [Sat, 21 Aug 2004 12:30:26 +0000 (12:30 +0000)]
Patch #880621: the last message of a Babyl mailbox ends in '\037' instead of
'\037\014\n' (see http://quimby.gnus.org/notes/BABYL) so look for that as well,
so that applications won't get '\037' as the last line of the last message.

20 years agoPatch #1011123: Use urllib.quote() instead of cgi.escape() for encoding the
Johannes Gijsbers [Sat, 21 Aug 2004 10:43:29 +0000 (10:43 +0000)]
Patch #1011123: Use urllib.quote() instead of cgi.escape() for encoding the
href attribute in list_directory(). This fixes the links for legal Unix
filenames such as 'a"b'.

20 years agoPatch 1012740: cStringIO's truncate doesn't
Tim Peters [Sat, 21 Aug 2004 06:55:43 +0000 (06:55 +0000)]
Patch 1012740:  cStringIO's truncate doesn't

truncate() left the stream position unchanged, which meant the
"truncated" data didn't go away:

>>> io.write('abc')
>>> io.truncate(0)
>>> io.write('xyz')
>>> io.getvalue()
'abcxyz'

Patch by Dima Dorfman.

20 years agoFix grammar, spotted by Hye-Shik Chang
Neal Norwitz [Fri, 20 Aug 2004 23:13:26 +0000 (23:13 +0000)]
Fix grammar, spotted by Hye-Shik Chang

20 years agoCorrect argument specifications of load_compiled and load_source: the file
Johannes Gijsbers [Fri, 20 Aug 2004 14:38:56 +0000 (14:38 +0000)]
Correct argument specifications of load_compiled and load_source: the file
argument is optional on both (the format string is "ss|O!").

20 years agoQuote # as \# to make lib compile again.
Johannes Gijsbers [Fri, 20 Aug 2004 14:37:05 +0000 (14:37 +0000)]
Quote # as \# to make lib compile again.

20 years agoBump minimum Python version to 2.1. Fixes #1009803.
Martin v. Löwis [Fri, 20 Aug 2004 07:31:37 +0000 (07:31 +0000)]
Bump minimum Python version to 2.1. Fixes #1009803.

20 years agoReplace tricky and/or with straight-forward if:else:
Martin v. Löwis [Fri, 20 Aug 2004 06:35:46 +0000 (06:35 +0000)]
Replace tricky and/or with straight-forward if:else:

20 years agoFail fatally if strdup fails.
Martin v. Löwis [Fri, 20 Aug 2004 06:26:59 +0000 (06:26 +0000)]
Fail fatally if strdup fails.

20 years agoRemove debug print.
Martin v. Löwis [Fri, 20 Aug 2004 06:19:23 +0000 (06:19 +0000)]
Remove debug print.

20 years agoWhitespace normalization.
Tim Peters [Fri, 20 Aug 2004 03:47:14 +0000 (03:47 +0000)]
Whitespace normalization.

20 years agoStab at SF 1010777: test_queue fails occasionally
Tim Peters [Fri, 20 Aug 2004 03:27:12 +0000 (03:27 +0000)]
Stab at SF 1010777:  test_queue fails occasionally

test_queue has failed occasionally for years, and there's more than one
cause.

The primary cause in the SF report appears to be that the test driver
really needs entirely different code for thread tests that expect to
raise exceptions than for thread tests that are testing non-exceptional
blocking semantics.  So gave them entirely different code, and added a
ton of explanation.

Another cause is that the blocking thread tests relied in several places
on the difference between sleep(.1) and sleep(.2) being long enough for
the trigger thread to do its stuff sot that the blocking thread could make
progress.  That's just not reliable on a loaded machine.  Boosted the 0.2's
to 10.0's instead, which should be long enough under any non-catastrophic
system conditions.  That doesn't make the test take longer to run, the 10.0
is just how long the blocking thread is *willing* to wait for the trigger
thread to do something.  But if the Queue module is plain broken, such
tests will indeed take 10 seconds to fail now.

For similar (heavy load) reasons, changed threaded-test termination to
be willing to wait 10 seconds for the signal thread to end too.

20 years agoSemantic-neutral format and comment changes.
Tim Peters [Fri, 20 Aug 2004 02:37:25 +0000 (02:37 +0000)]
Semantic-neutral format and comment changes.

20 years agoTry to improve grammar and use versionadded
Neal Norwitz [Fri, 20 Aug 2004 02:36:27 +0000 (02:36 +0000)]
Try to improve grammar and use versionadded

20 years agoGave _ellipsis_match() an attractive new leading underscore.
Tim Peters [Fri, 20 Aug 2004 02:08:04 +0000 (02:08 +0000)]
Gave _ellipsis_match() an attractive new leading underscore.

20 years agoFix markup. versionchanged automatically adds a period, so remove the extra one.
Neal Norwitz [Fri, 20 Aug 2004 01:52:42 +0000 (01:52 +0000)]
Fix markup.  versionchanged automatically adds a period, so remove the extra one.

20 years agoEstablish policies with respect to 2.3 compatibilty and treated spec
Raymond Hettinger [Thu, 19 Aug 2004 22:39:55 +0000 (22:39 +0000)]
Establish policies with respect to 2.3 compatibilty and treated spec
updates as bugfixes.

20 years agoSF bug #1012315: weakref.WeakValueDictionary should override .has_key()
Raymond Hettinger [Thu, 19 Aug 2004 21:32:06 +0000 (21:32 +0000)]
SF bug #1012315:  weakref.WeakValueDictionary should override .has_key()

* Check the found object for a None value during a contains/has_key
  lookup.  Perhaps it will help the OP who is likely suffering from an
  occassional GC or threading object deletion after self.data is checked.

* Complete the previous patch by removing the unnecessary indirection
  for weak dict iterators.  Makes the code cleaner and more readable.

20 years agoGot rid of nooutput() (was used by DocTestCase.debug())
Edward Loper [Thu, 19 Aug 2004 19:26:06 +0000 (19:26 +0000)]
Got rid of nooutput() (was used by DocTestCase.debug())

It's redundant, since no output is written anyway: DebugRunner doesn't
generate any output for failures and unexpected exceptions, and since
verbose=False, it won't generate any output for non-failures either.