diff --git a/ming/mim.py b/ming/mim.py
index ef553f6..2c4aaa8 100644
--- a/ming/mim.py
+++ b/ming/mim.py
@@ -822,6 +822,9 @@ class Cursor(object):
         # Adding options to MIM does nothing.
         pass
 
+    def close(self):
+        self._iterator_gen = lambda: iter(())
+
 
 def cursor_comparator(keys):
     def comparator(a, b):

mim Cursor needs close() method
A couple errors like this from the Allura test suite, when going from pymongo 3.7.2 to pymongo 3.8 (on ming master):
```
  File "/Users/brondsem/sf/allura/Allura/allura/ext/admin/admin_main.py", line 412, in update
    c.project.save_icon(icon.filename, icon.file, content_type=icon.type)
  File "/Users/brondsem/sf/allura/Allura/allura/model/project.py", line 376, in save_icon
    icon_orig_img = PIL.Image.open(icon_orig.rfile())
  File "/Users/brondsem/sf/env-allura/lib/python2.7/site-packages/PIL/Image.py", line 2804, in open
    im = _open_core(fp, filename, prefix)
  File "/Users/brondsem/sf/env-allura/lib/python2.7/site-packages/PIL/Image.py", line 2789, in _open_core
    fp.seek(0)
  File "/Users/brondsem/sf/env-allura/lib/python2.7/site-packages/gridfs/grid_file.py", line 643, in seek
    self.__chunk_iter.close()
  File "/Users/brondsem/sf/env-allura/lib/python2.7/site-packages/gridfs/grid_file.py", line 778, in close
    self._cursor.close()
AttributeError: 'Cursor' object has no attribute 'close'
```
diff --git a/ming/tests/test_mim.py b/ming/tests/test_mim.py
index edb8a9d..bb7cf2b 100644
--- a/ming/tests/test_mim.py
+++ b/ming/tests/test_mim.py
@@ -159,6 +159,13 @@ class TestDatastore(TestCase):
         cursor.rewind()
         assert cursor.next() == doc
 
+    def test_close(self):
+        collection = self.bind.db.coll
+        collection.insert({'a': 'b'})
+        cursor = collection.find()
+        cursor.close()
+        self.assertRaises(StopIteration, cursor.next)
+
     def test_search(self):
         conn = mim.Connection().get()
         coll = conn.searchdatabase.coll

pip install -e .[dev]
parse_log_pytest
requirements.txt
nose mock WebOb webtest FormEncode pytest
3.7
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
beautifulsoup4==4.13.3
certifi @ file:///croot/certifi_1671487769961/work/certifi
exceptiongroup==1.2.2
FormEncode==2.1.1
importlib-metadata==6.7.0
iniconfig==2.0.0
-e git+https://github.com/TurboGears/Ming.git@4311d0d2a1c8cce83b6fe83c7d36ccd74a0432b4#egg=Ming
mock==5.2.0
nose==1.3.7
packaging==24.0
pluggy==1.2.0
pymongo==3.7.2
pytest==7.4.4
pytz==2025.2
six==1.17.0
soupsieve==2.4.1
tomli==2.0.1
typing_extensions==4.7.1
waitress==2.1.2
WebOb==1.8.9
WebTest==3.0.1
zipp==3.15.0

name: Ming
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - beautifulsoup4==4.13.3
      - exceptiongroup==1.2.2
      - formencode==2.1.1
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - mock==5.2.0
      - nose==1.3.7
      - packaging==24.0
      - pluggy==1.2.0
      - pymongo==3.7.2
      - pytest==7.4.4
      - pytz==2025.2
      - six==1.17.0
      - soupsieve==2.4.1
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - waitress==2.1.2
      - webob==1.8.9
      - webtest==3.0.1
      - zipp==3.15.0
prefix: /opt/conda/envs/Ming

ming/tests/test_mim.py::TestDatastore::test_close
ming/tests/test_mim.py::TestDatastore::test_all ming/tests/test_mim.py::TestDatastore::test_eq ming/tests/test_mim.py::TestDatastore::test_exists ming/tests/test_mim.py::TestDatastore::test_find_with_fields ming/tests/test_mim.py::TestDatastore::test_find_with_progection_positive_slice ming/tests/test_mim.py::TestDatastore::test_find_with_projection_negative_slice ming/tests/test_mim.py::TestDatastore::test_find_with_projection_of_0 ming/tests/test_mim.py::TestDatastore::test_find_with_projection_of_0_dotted ming/tests/test_mim.py::TestDatastore::test_find_with_projection_of_1 ming/tests/test_mim.py::TestDatastore::test_find_with_projection_of_text_score ming/tests/test_mim.py::TestDatastore::test_find_with_projection_skip_and_limit_slice ming/tests/test_mim.py::TestDatastore::test_gt ming/tests/test_mim.py::TestDatastore::test_gte ming/tests/test_mim.py::TestDatastore::test_limit ming/tests/test_mim.py::TestDatastore::test_lt ming/tests/test_mim.py::TestDatastore::test_lte ming/tests/test_mim.py::TestDatastore::test_ne ming/tests/test_mim.py::TestDatastore::test_or ming/tests/test_mim.py::TestDatastore::test_range_equal ming/tests/test_mim.py::TestDatastore::test_range_inequal ming/tests/test_mim.py::TestDatastore::test_regex ming/tests/test_mim.py::TestDatastore::test_regex_options ming/tests/test_mim.py::TestDatastore::test_rewind ming/tests/test_mim.py::TestDatastore::test_search ming/tests/test_mim.py::TestDottedOperators::test_addToSet_dotted ming/tests/test_mim.py::TestDottedOperators::test_addToSet_empty ming/tests/test_mim.py::TestDottedOperators::test_find_dotted ming/tests/test_mim.py::TestDottedOperators::test_inc_dotted ming/tests/test_mim.py::TestDottedOperators::test_inc_dotted_dollar ming/tests/test_mim.py::TestDottedOperators::test_lt_dotted ming/tests/test_mim.py::TestDottedOperators::test_pop_dotted ming/tests/test_mim.py::TestDottedOperators::test_project_dotted ming/tests/test_mim.py::TestDottedOperators::test_pull_all_dotted ming/tests/test_mim.py::TestDottedOperators::test_pull_dotted ming/tests/test_mim.py::TestDottedOperators::test_push_dotted ming/tests/test_mim.py::TestDottedOperators::test_set_dotted ming/tests/test_mim.py::TestDottedOperators::test_set_dotted_with_integer ming/tests/test_mim.py::TestDottedOperators::test_unset_dotted ming/tests/test_mim.py::TestCommands::test_filemd5 ming/tests/test_mim.py::TestCommands::test_findandmodify_new ming/tests/test_mim.py::TestCommands::test_findandmodify_old ming/tests/test_mim.py::TestCollection::test_delete_many ming/tests/test_mim.py::TestCollection::test_delete_one ming/tests/test_mim.py::TestCollection::test_distinct ming/tests/test_mim.py::TestCollection::test_distinct_filtered ming/tests/test_mim.py::TestCollection::test_find_and_modify_returns_new_value_on_new ming/tests/test_mim.py::TestCollection::test_find_and_modify_returns_new_value_on_new_filter_id ming/tests/test_mim.py::TestCollection::test_find_and_modify_returns_new_value_on_new_upsert ming/tests/test_mim.py::TestCollection::test_find_and_modify_returns_none_on_no_entries ming/tests/test_mim.py::TestCollection::test_find_and_modify_returns_none_on_upsert_and_no_new ming/tests/test_mim.py::TestCollection::test_find_and_modify_returns_old_value_on_no_new ming/tests/test_mim.py::TestCollection::test_find_and_modify_with_remove ming/tests/test_mim.py::TestCollection::test_find_one_and_delete ming/tests/test_mim.py::TestCollection::test_find_with_limit ming/tests/test_mim.py::TestCollection::test_find_with_paging ming/tests/test_mim.py::TestCollection::test_find_with_skip ming/tests/test_mim.py::TestCollection::test_find_with_slice_invalid ming/tests/test_mim.py::TestCollection::test_find_with_slice_limit ming/tests/test_mim.py::TestCollection::test_find_with_slice_skip ming/tests/test_mim.py::TestCollection::test_find_with_slice_skip_limit ming/tests/test_mim.py::TestCollection::test_getitem_clones ming/tests/test_mim.py::TestCollection::test_hint_invalid ming/tests/test_mim.py::TestCollection::test_hint_simple ming/tests/test_mim.py::TestCollection::test_index_information ming/tests/test_mim.py::TestCollection::test_insert_manipulate_false ming/tests/test_mim.py::TestCollection::test_insert_manipulate_true ming/tests/test_mim.py::TestCollection::test_unique_index_subdocument ming/tests/test_mim.py::TestCollection::test_unique_index_whole_sdoc ming/tests/test_mim.py::TestCollection::test_update_addToSet_with_each ming/tests/test_mim.py::TestCollection::test_upsert_duplicated ming/tests/test_mim.py::TestCollection::test_upsert_inc ming/tests/test_mim.py::TestCollection::test_upsert_push ming/tests/test_mim.py::TestCollection::test_upsert_setOnInsert ming/tests/test_mim.py::TestCollection::test_upsert_simple ming/tests/test_mim.py::TestBsonCompare::test_boolean_bson_type ming/tests/test_mim.py::TestBsonCompare::test_float_bson_type ming/tests/test_mim.py::TestMatch::test_all ming/tests/test_mim.py::TestMatch::test_dotted_match ming/tests/test_mim.py::TestMatch::test_elem_match ming/tests/test_mim.py::TestMatch::test_exists ming/tests/test_mim.py::TestMatch::test_gt ming/tests/test_mim.py::TestMatch::test_gte ming/tests/test_mim.py::TestMatch::test_list_match ming/tests/test_mim.py::TestMatch::test_lt ming/tests/test_mim.py::TestMatch::test_lte ming/tests/test_mim.py::TestMatch::test_or ming/tests/test_mim.py::TestMatch::test_range ming/tests/test_mim.py::TestMatch::test_regex_match ming/tests/test_mim.py::TestMatch::test_regex_match_array ming/tests/test_mim.py::TestMatch::test_regex_match_begin ming/tests/test_mim.py::TestMatch::test_regex_match_inside ming/tests/test_mim.py::TestMatch::test_simple_match ming/tests/test_mim.py::TestMatch::test_subdoc_deep ming/tests/test_mim.py::TestMatch::test_subdoc_deep_list ming/tests/test_mim.py::TestMatch::test_subdoc_exact ming/tests/test_mim.py::TestMatch::test_subdoc_partial ming/tests/test_mim.py::TestMatch::test_traverse_list ming/tests/test_mim.py::TestMatch::test_traverse_none ming/tests/test_mim.py::TestBulkOperations::test_update_one ming/tests/test_mim.py::TestAggregate::test_aggregate_match ming/tests/test_mim.py::TestAggregate::test_aggregate_match_sort ming/tests/test_mim.py::TestAggregate::test_aggregate_match_sort_limit
ming/mim.py
ming/mim.py