Is a closed subset of a trivial bundle with all fibers homeomorphic a fiber bundle itself?

Let $X$ and $Y$ topological spaces and $\pi:X\times Y\to X$ the projection. Assume that $P\subset X\times Y$ is a closed subset, $\iota:P\to X\times Y$ the embedding and assume that $p=\pi\iota:P\to X$ is surjective, such that all fibers $p^{-1}(x)$ are homeomorphic.

Is $p$ a fiber bundle?

More specifically, if this is the case, is the local trivialization of $p$ induced by restricting the homeomorphisms $\pi^{-1}(U)\cong U\times Y$ (where $U\subset X$ open) which we have for the trivial bundle $\pi$, to $p^{-1}(U)$?

Edit: This seems not to be true in general. In the application I have in mind, all fibers are $\mathbb C$-vector spaces of the same finite dimension, $X$ and $Y$ are (possibly non-irreducible) affine varieties and $P$ is closed in the Zariski topology.

I don't think this is true. Take $X = Y = \mathbb{R}$ and $$P = \{(x,y) \in \mathbb{R}^2 : \lvert y \rvert \leq \lvert x \rvert\} \cup \{(0,y) \in \mathbb{R}^2 : 0 \leq y \leq 1\}.$$ Then all the fibers look like closed intervals, and $P$ is not a fiber bundle over $X = \mathbb{R}$: there is no local trivialization at $0$.
Response to edit: I still don't think it's true. Take $X = Y = \mathbb{A}^1_\mathbb{C}$, say $X = \operatorname{Spec} \mathbb{C}[x]$ and $Y = \operatorname{Spec} \mathbb{C}[y]$, so $X \times Y \cong \mathbb{A}^2_\mathbb{C} = \operatorname{Spec} \mathbb{C}[x,y]$ and $P = V(xy-1) \cup V(x,y)$. Then all the fibers are points (= o-dimensional $\mathbb{C}$-vector spaces), but the $\mathbb{C}[x,y]/(x(xy-1), y(xy-1))$ is not flat over $\mathbb{C}[x]$ because $x$ is a zero divisor in $\mathbb{C}[x,y]/(x(xy-1), y(xy-1))$. So, assuming whatever you mean by a "fiber bundle" in algebraic geometry should require flatness, $P$ is not a fiber bundle.
By the way, if you want positive-dimensional fibers, you can just take $P \times \mathbb{A}^n_\mathbb{C} \to X$ instead.
• I thought about a "fiber bundle" topologically and don't consider $p$ as a morphism, but only as a continuous map with respect to the Zariski topology. What I wanted to have is something like a local trivialization in the topological sense, but using the Zariski topology on the products of the open subsets and the fiber instead of the product topology. Maybe the name "fiber bundle" would then be inadequate. Nevertheless, this condition would imply that $p$ is an open map, which I am most interested in. Commented Apr 29, 2017 at 12:03
• I guess in the second example, $p|_P$ is not an open map. Indeed $P$ has two connected components, and the component $V(x,y)$ - which is open in $P$ - is mapped to $\{0\} \in \mathbb{A}^1$, which is not open.