1. 08 Aug, 2004 9 commits
    • Tim Peters's avatar
      Get rid of the ignore_imports argument to DocTestFinder.find(). · f3f57473
      Tim Peters authored
      This got slammed in when find() was fixed to stop grabbing doctests
      from modules imported *by* the module being tested.  Such tests cannot
      be expected to succeed, since they'll be run with the current module's
      globals.  Dozens of Zope3 doctests were failing because of that.
      
      It wasn't clear why ignore_imports got added then.  Maybe it's because
      some existing tests failed when the change was made.  Whatever, it's
      a Bad Idea so it's gone now.
      
      The only use of it was exceedingly obscure, in test_doctest's "Duplicate
      Removal" test.  It was "needed" there because, as an artifact of running
      a doctest inside a doctest, the func_globals of functions compiled in
      the second-level doctest don't match the module globals, and so the
      test-finder believed these functions were from a foreign module and
      skipped them.  But that took a long time to figure out, and I actually
      understand some of this stuff <0.9 wink>.
      
      That problem was resolved by moving the source code for the second-level
      doctest into an actual module (test/doctest_aliases.py).
      
      The only remaining difficulty was that the test for the deprecated
      Tester.rundict() then failed, because the test finder doesn't take
      module=None at face value, trying to guess which module the user really
      intended then.  Its guess wasn't appropriate for what Tester.rundict
      needs when module=None is given to *it*, which is "no, there is no
      module here, and I mean it".  So now passing module=False means exactly
      that.  This is hokey, but ignore_imports=False was really a hack to worm
      around that there was no way to tell the test-finder that module=None
      *sometimes* means what it says.  There was no use case for the combination
      of passing a real module with ignore_imports=False.
      f3f57473
    • Raymond Hettinger's avatar
      * Context.copy() now makes a deepcopy. · 9fce44bc
      Raymond Hettinger authored
      * Facilitate reloads of local thread.
      9fce44bc
    • Tim Peters's avatar
      Type in docstring. · 161c9632
      Tim Peters authored
      161c9632
    • Tim Peters's avatar
      Also deprecated the old Tester class, which is no longer used by anything · 3ddd60a8
      Tim Peters authored
      except internal tests.
      3ddd60a8
    • Tim Peters's avatar
      Deprecate the doctest.is_private() function. · bafb1fed
      Tim Peters authored
      bafb1fed
    • Tim Peters's avatar
      Deprecated testmod's useless & confusing isprivate gimmick. · f727c6c2
      Tim Peters authored
      Ripped out the docs for the new DocTestFinder's namefilter argument,
      and renamed it to _namefilter; this only existed to support isprivate.
      Removed the new DocTestFinder's objfilter argument.  No point adding
      more cruft to a broken filtering design.
      f727c6c2
    • Tim Peters's avatar
      Whitespace normalization. · 9ca3f855
      Tim Peters authored
      9ca3f855
    • Tim Peters's avatar
      Bug 1003471: Python 1.5.2 security vulnerability still present in 2.3.4 · ec8c5a93
      Tim Peters authored
      That's the title of the report, but the hole was probably plugged since
      Python 2.0.  See corresponding checkin to PC/getpathp.c:  a crucial
      precondition for joinpath() was neither documented nor verified, and there
      are so many callers with so many conditional paths that no "eyeball
      analysis" is satisfactory.  Now Python dies with a fatal error if the
      precondition isn't satisfied, instead of allowing a buffer overrun.
      
      NOT TESTED!  The Windows version of the patch was, but not this one.  I
      don't feel like waiting for someone to notice the patch I attached to the
      bug report.  If it doesn't compile, sorry, but fix it <wink>.  If it
      does compile, it's "obviously correct".
      ec8c5a93
    • Tim Peters's avatar
  2. 07 Aug, 2004 31 commits