• Freshly ground black pepper
To make pastry: Put flour into large mixing bowl, then rub in butter with your fingertips until mixture resembles fine breadcrumbs. Add 3 to 4 tablespoons cold water and mix to a stiff dough. Roll dough into a ball, seal it in plastic wrap and refrigerate for at least 30 minutes.
Meanwhile, to make filling: Drizzle a little vegetable oil into a large skillet set over medium-low heat. Add onion and thyme and cook slowly, stirring regularly, until onion has caramelized and is golden in color. Do not allow it to crisp up or burn. Once cooked, set aside to cool. (This will take a while, about 40 minutes or more, for the best result, if you're really cooking the onions slowly.)
To assemble: Roll out dough on a floured surface. Make it slightly larger than a 9 1/2-inch pie plate. Transfer dough into pie plate. Don't worry if it breaks; you can easily patch it up later with dough trimmings.
Push dough gently into edges of pie plate, leaving a little overhanging. Now sweep rolling pin across the top of the pie plate to cut off the overhanging dough. Use the trimmings to patch up any cracks or holes. Crimp edges, if you prefer, for a nice look. Cover with plastic wrap and refrigerate for at least 20 minutes.