While many say eating pineapples and papaya should be avoided in pregnancy because they can trigger miscarriage and the onset of premature labour, this opinion are based on theoretical consideration and some laboratory animal studies.
I am not aware of any clinical studies in humans, anecdotal reports or conclusions at clinical or scientific medical meetings, etc. that eating pineapples and papaya in pregnancy have caused miscarriage or premature labour. I have personally managed many thousands of pregnant women and pineapples and papayas causing miscarriage or preterm labour has never been an issue.
So I consider pineapples and papayas safe to eat in moderation and I have never advised a patient to avoid them.
Papayas and pineapples are an excellent source of vitamins and other nutrients.
Some pregnant woman may not tolerate pineapples especially if heartburn is an issue. In contrast some pregnant women have found papayas help reduce heartburn. Obviously if there is an allergy concern then there should be avoidance.