diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c
index da304f78a0e10e45840852ec7d728122f8bbbc6c_bWVyY3VyaWFsL2NleHQvcGFyc2Vycy5j..252d2f3f0d173a1c86f2da351b021d382c7a6647_bWVyY3VyaWFsL2NleHQvcGFyc2Vycy5j 100644
--- a/mercurial/cext/parsers.c
+++ b/mercurial/cext/parsers.c
@@ -347,25 +347,6 @@
 	return (PyObject *)dirstate_item_from_v1_data(state, mode, size, mtime);
 };
 
-/* constructor to help legacy API to build a new "from_p2" item
-
-Should eventually be removed */
-static PyObject *dirstate_item_new_from_p2(PyTypeObject *subtype)
-{
-	/* We do all the initialization here and not a tp_init function because
-	 * dirstate_item is immutable. */
-	dirstateItemObject *t;
-	t = (dirstateItemObject *)subtype->tp_alloc(subtype, 1);
-	if (!t) {
-		return NULL;
-	}
-	t->flags = dirstate_flag_wc_tracked | dirstate_flag_p2_info;
-	t->mode = 0;
-	t->size = 0;
-	t->mtime = 0;
-	return (PyObject *)t;
-};
-
 /* constructor to help legacy API to build a new "possibly" item
 
 Should eventually be removed */
@@ -475,9 +456,6 @@
      "True if the stored mtime would be ambiguous with the current time"},
     {"from_v1_data", (PyCFunction)dirstate_item_from_v1_meth,
      METH_VARARGS | METH_CLASS, "build a new DirstateItem object from V1 data"},
-    {"new_from_p2", (PyCFunction)dirstate_item_new_from_p2,
-     METH_NOARGS | METH_CLASS,
-     "constructor to help legacy API to build a new \"from_p2\" item"},
     {"new_possibly_dirty", (PyCFunction)dirstate_item_new_possibly_dirty,
      METH_NOARGS | METH_CLASS,
      "constructor to help legacy API to build a new \"possibly_dirty\" item"},
diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py
index da304f78a0e10e45840852ec7d728122f8bbbc6c_bWVyY3VyaWFsL3B1cmUvcGFyc2Vycy5weQ==..252d2f3f0d173a1c86f2da351b021d382c7a6647_bWVyY3VyaWFsL3B1cmUvcGFyc2Vycy5weQ== 100644
--- a/mercurial/pure/parsers.py
+++ b/mercurial/pure/parsers.py
@@ -109,14 +109,6 @@
             self._mtime = parentfiledata[2]
 
     @classmethod
-    def new_from_p2(cls):
-        """constructor to help legacy API to build a new "from_p2" item
-
-        Should eventually be removed
-        """
-        return cls(wc_tracked=True, p2_info=True)
-
-    @classmethod
     def new_possibly_dirty(cls):
         """constructor to help legacy API to build a new "possibly_dirty" item
 
diff --git a/rust/hg-core/src/dirstate/entry.rs b/rust/hg-core/src/dirstate/entry.rs
index da304f78a0e10e45840852ec7d728122f8bbbc6c_cnVzdC9oZy1jb3JlL3NyYy9kaXJzdGF0ZS9lbnRyeS5ycw==..252d2f3f0d173a1c86f2da351b021d382c7a6647_cnVzdC9oZy1jb3JlL3NyYy9kaXJzdGF0ZS9lbnRyeS5ycw== 100644
--- a/rust/hg-core/src/dirstate/entry.rs
+++ b/rust/hg-core/src/dirstate/entry.rs
@@ -113,15 +113,6 @@
         }
     }
 
-    pub fn new_from_p2() -> Self {
-        Self {
-            // might be missing P1_TRACKED
-            flags: Flags::WDIR_TRACKED | Flags::P2_INFO,
-            mode_size: None,
-            mtime: None,
-        }
-    }
-
     pub fn new_possibly_dirty() -> Self {
         Self {
             flags: Flags::WDIR_TRACKED | Flags::P1_TRACKED,
diff --git a/rust/hg-cpython/src/dirstate/item.rs b/rust/hg-cpython/src/dirstate/item.rs
index da304f78a0e10e45840852ec7d728122f8bbbc6c_cnVzdC9oZy1jcHl0aG9uL3NyYy9kaXJzdGF0ZS9pdGVtLnJz..252d2f3f0d173a1c86f2da351b021d382c7a6647_cnVzdC9oZy1jcHl0aG9uL3NyYy9kaXJzdGF0ZS9pdGVtLnJz 100644
--- a/rust/hg-cpython/src/dirstate/item.rs
+++ b/rust/hg-cpython/src/dirstate/item.rs
@@ -139,12 +139,6 @@
     }
 
     @classmethod
-    def new_from_p2(_cls) -> PyResult<Self> {
-        let entry = DirstateEntry::new_from_p2();
-        DirstateItem::create_instance(py, Cell::new(entry))
-    }
-
-    @classmethod
     def new_possibly_dirty(_cls) -> PyResult<Self> {
         let entry = DirstateEntry::new_possibly_dirty();
         DirstateItem::create_instance(py, Cell::new(entry))