Preheat the oven to 200C/390F/Gas 6 and line a baking tray with baking parchment.
Mix the butternut squash, onion, olive oil and the sage together, season with salt and freshly ground black pepper and place inside the lined baking tray.
Roast until the squash is cooked (when a knife goes through it easily), then take from the oven and leave to cool.
Divide the pastry in half and roll each half out to a 60x20cm/24x8in rectangle on a lightly dusted work surface. Using a 20cm/8in diameter plate as a template, cut out three rounds from each piece. Lay these on a baking sheet and put in the fridge to rest for at least 20 minutes.
Once the butternut squash has cooled, tip it into a large bowl and mix in the pecans, ricotta and pumpkin seed oil, making sure you don't crush the squash.
Take the pastry rounds from the fridge and allow them to come up to room temperature.
Beat the egg with a pinch of salt and brush the pastry completely on one side with the egg-wash - it'll be easier to do this one piece at a time.
Take one-sixth of the butternut squash mixture and dollop it in the centre of a pastry round, then carefully fold the pastry in half, making sure the filling is enclosed.
Dip a fork in the flour and use it to press down and seal the edges. Try to squeeze out excess air as you do this - otherwise it can make the pastie pop open in the heat of the oven. As you finish each pastie, place it on a baking sheet lined with baking parchment. Brush the remaining egg-wash over the pasties and prick each one several times with the fork.
Bake for 25-35 minutes, until the pastry is golden and cooked through.
Serve straight out of the oven or leave them to cool and take on a picnic.