The title is misleading: they announced a ban of the sales of new petrol vehicles by 2040 [0].
[0] (in french) http://www.lemonde.fr/planete/article/2017/07/06/nicolas-hul...
[0] (in french) http://www.lemonde.fr/planete/article/2017/07/06/nicolas-hul...
This is also a signal to consumers, as the government casts a definite vote of confidence towards electric vehicles, which may help drive EV sales up today, instead of making them freak out over a short deadline and reject EV out of it.
They're not getting rid of petrol/diesel engines completely, since they'll still be selling hybrids.