          self.assertEqual(ls, ls.wkt)
          self.assertNotEqual(p, 'bar')
          # Error shouldn't be raise on equivalence testing with
          # an invalid type.
          for g in (p, ls):
              self.assertNotEqual(g, None)
              self.assertNotEqual(g, {'foo': 'bar'})
              self.assertNotEqual(g, False)
 
</s> remove                 g = wkt_r().read(force_bytes(wkt_m.group('wkt')))
 </s> add                 g = self._from_wkt(force_bytes(wkt_m.group('wkt'))) </s> remove             if other.startswith('SRID=0;'):
                return self.ewkt == other[7:]  # Test only WKT part of other
            return self.ewkt == other
        elif isinstance(other, GEOSGeometry):
            return self.srid == other.srid and self.equals_exact(other)
        else:
            return False
 </s> add             try:
                other = GEOSGeometry.from_ewkt(other)
            except (ValueError, GEOSException):
                return False
        return isinstance(other, GEOSGeometry) and self.srid == other.srid and self.equals_exact(other)
        self.assertEqual(p, 'POINT(5.0 23.0)')
          self.assertEqual(ls, ls.wkt)
          self.assertNotEqual(p, 'bar')
        self.assertEqual(p, 'POINT(5.0 23.0)')
          # Error shouldn't be raise on equivalence testing with
          # an invalid type.
          for g in (p, ls):
              self.assertNotEqual(g, None)
              self.assertNotEqual(g, {'foo': 'bar'})
              self.assertNotEqual(g, False)
keep add keep keep keep keep keep keep
 Fixed #28433 -- Made GEOSGeometry.__eq__() work correctly with non-canonical EWKT string. 
tests/gis_tests/geos_tests/test_geos.py