I have read in several places (e.g. in the wikipedia page and in this MSE question) that the epimorphisms in the category TOP of topological spaces with continuous maps are exactly the surjective continuous maps. However, I thought of an example that would contradict this statement. If I am wrong, could anybody help me figure out where?
Let $X=(0,1)$ and $Y=(0,1]$ with the subspace topology from $\mathbb{R}$. I claim that the inclusion $i:X\hookrightarrow Y$ is an epimorphism.
To prove that, consider two continuous functions $f,g:Y\to Z$, where $Z$ is any topological space, such that $f\circ i=g\circ i$. The goal is to prove that $f=g$. If $y\in(0,1)$, then $$f(y)=f\circ i(y)=g\circ i(y)=g(y)$$ and we are done. If $y=1$, then using that $f$ and $g$ are sequentially continuous $$f(1)=\lim_{n\to\infty}f\left(1-\frac{1}{n}\right)=\lim_{n\to\infty}f\circ i\left(1-\frac{1}{n}\right)=$$ $$\lim_{n\to\infty}g\circ i\left(1-\frac{1}{n}\right)=\lim_{n\to\infty}g\left(1-\frac{1}{n}\right)=g(1).$$
Hence, $f(y)=g(y)$ for all $y\in Y=(0,1]$, therefore $i$ is epimorphism which is not surjective.