diff -r c2d3d8c3e0bf Lib/test/test_os.py --- a/Lib/test/test_os.py Thu Jun 02 19:38:20 2016 -0400 +++ b/Lib/test/test_os.py Thu Jun 02 17:08:08 2016 -0700 @@ -2852,6 +2852,7 @@ self.assertEqual(stat1, stat2) def check_entry(self, entry, name, is_dir, is_file, is_symlink): + self.assertIsInstance(entry, os.DirEntry) self.assertEqual(entry.name, name) self.assertEqual(entry.path, os.path.join(self.path, name)) self.assertEqual(entry.inode(), diff -r c2d3d8c3e0bf Modules/posixmodule.c --- a/Modules/posixmodule.c Thu Jun 02 19:38:20 2016 -0400 +++ b/Modules/posixmodule.c Thu Jun 02 17:08:08 2016 -0700 @@ -13248,6 +13248,7 @@ Py_DECREF(unicode); } PyModule_AddObject(m, "_have_functions", list); + PyModule_AddObject(m, "DirEntry", (PyObject *)&DirEntryType); initialized = 1;