The positron fraction in cosmic rays was found to be a steadily increasing in function of energy, above $sim$ 10 GeV. This behaviour contradicts standard astrophysical mechanisms, in which positrons are secondary particles, produced in the interactions of primary cosmic rays during the propagation in the interstellar medium. The observed anomaly in the positron fraction triggered a lot of excitement, as it could be interpreted as an indirect signature of the presence of dark matter species in the Galaxy. Alternatively, it could be produced by nearby astrophysical sources, such as pulsars. Both hypotheses are probed in this work in light of the latest AMS-02 positron fraction measurements. The transport of the primary and secondary positrons in the Galaxy is described using a semi-analytic two-zone model. MicrOMEGAs is used to model the positron flux generated by dark matter species. The description of the positron fraction from astrophysical sources is based on the pulsar observations included in the ATNF catalogue. We find that the mass of the favoured dark matter candidates is always larger than 500 GeV. The only dark matter species that fulfils the numerous gamma ray and cosmic microwave background bounds is a particle annihilating into four leptons through a light scalar or vector mediator, with a mixture of tau (75%) and electron (25%) channels, and a mass between 0.5 and 1 TeV. The positron anomaly can also be explained by a single astrophysical source and a list of five pulsars from the ATNF catalogue is given. Those results are obtained with the cosmic ray transport parameters that best fit the B/C ratio. Uncertainties in the propagation parameters turn out to be very significant. In the WIMP annihilation cross section to mass plane for instance, they overshadow the error contours derived from the positron data.