1. 08 Jan, 2005 6 commits
    • Johannes Gijsbers's avatar
      Clean up tests by reusing functions from other modules: · 663a5d35
      Johannes Gijsbers authored
      * replace deltree with shutil.rmtree()
      * replace mkdirs with os.makedirs()
      * fold touchfile into GlobTests.mktemp()
      663a5d35
    • Johannes Gijsbers's avatar
      Patch #943206: · 66bff3ce
      Johannes Gijsbers authored
      `glob.glob()` currently calls itself recursively to build a list of matches of
      the dirname part of the pattern and then filters by the basename part. This is
      effectively BFS. ``glob.glob('*/*/*/*/*/foo')`` will build a huge list of all
      directories 5 levels deep even if only a handful of them contain a ``foo``
      entry. A generator-based recusion would never have to store these list at once
      by implementing DFS. This patch converts the `glob` function to an `iglob`
      recursive generator . `glob()` now just returns ``list(iglob(pattern))``.
      
      I also cleaned up the code a bit (reduced duplicate `has_magic()` checks and
      created a second `glob0` helper func so that the main loop need not be
      duplicated).
      
      Thanks to Cherniavsky Beni for the patch!
      66bff3ce
    • Johannes Gijsbers's avatar
      Patch #1094015: · aa1e85c6
      Johannes Gijsbers authored
      * Use os.makedirs() instead os.mkdir(). (bug #975763)
      * Use copystat() to copy directory bits (bug #1048878)
      aa1e85c6
    • Tim Peters's avatar
      threading._DummyThread.__init__(): document obscure new code. · 099fe2f5
      Tim Peters authored
      test_threading.test_foreign_thread():  new test does a basic check that
      "foreign" threads can using the threading module, and that they create
      a _DummyThread instance in at least one use case.  This isn't a very
      good test, since a thread created by thread.start_new_thread() isn't
      particularly "foreign".
      099fe2f5
    • Tim Peters's avatar
      Converted to a unittest. Added checks that the bounded semaphore actually · 6842273a
      Tim Peters authored
      does what it's supposed to do.
      6842273a
    • Brett Cannon's avatar
      In _DummyThread objects the lock stored in __block (allocated thanks to · 93124c10
      Brett Cannon authored
      _Thread.__init__) was never used.  This is a waste since locks use OS
      primitives that are in limited supply.  So the lock is deleted in
      _DummyThread.__init__ .
      
      Closes bug #1089632.
      93124c10
  2. 07 Jan, 2005 15 commits
  3. 06 Jan, 2005 1 commit
  4. 05 Jan, 2005 5 commits
  5. 04 Jan, 2005 1 commit
  6. 03 Jan, 2005 4 commits
  7. 02 Jan, 2005 2 commits
  8. 01 Jan, 2005 6 commits