Aliette de Bodard considers the erasure of women in Sherlock and other contemporary media:
Women had a clearly defined place and clearly defined sphere in Victorian society, even though that place was deemed inferior to men. If you were a 19th-Century writer and wanted to write a story that took place in a realistic society (again, excluding “adventures abroad”), then you could hardly write something that had no women in them. It was expected that upstanding members of society would be married and have children, or have relatives which would include women (aunts, cousins, sisters). And those characters might well be subservient to men and have little freedom, but by and large, they’re always here. The wife, the maid, the daughter–they have a place and a role; they exist. The world isn’t 100%-male.
Whereas in our modern 21st-Century Western world… women have gained more rights in a general fashion, but we’ve also been moving towards a more individualistic society. Sherlock Holmes, a confirmed bachelor with no outward interest in the opposite gender, was an anomaly by Victorian standards (notice that Watson, the staunch everyman of the narration, gets all but engaged in the second ever Sherlock Holmes story, The Sign of the Four); by our modern Western 21st Century standards, a man who gets married/into a serious relationship too quickly is the oddity, rather than bachelor Sherlock Holmes. This means that you can put a male character in the narration; and said male character can be a bachelor with distant/non-existent female relatives, and no one will blink an eye. Et voilà, you’ve just managed to handily remove women from the narration.
Catherynne Valente riffs with relation to True Grit. See also Alex Dally MacFarlane on female friendships.