Why do you require connection in the open mapping theorem and maximum modulus principle? I cannot understand why we require the connection in these two theorems (or at least I've been taught this way, and also in some books you have it). 
The first states that every non-constant analytic function defined from an open and connected subset $U$ of $\mathbb{C}$ to $\mathbb{C}$ is open. 
The second says that if the norm of an analytic function defined in an open and connected subset $U$ of the complex plane has a real maximum in a point internal to $U$, then the function is constant. I'll try to prove these two theorems without using connection (or maybe I use that without realising).
First, I want to prove that for every  analytic function $f$ defined in an open subset $U$ such that $f(z) \ne 0 \forall z \in U$ and $\forall n$ positive integers, there is an analytic function $g$ such that $f(z)=g(z)^{n}$.(Here the teacher supposed $U$ to be connected or maybe even simply connected, it isn't clear in my notes).
You just have to consider a primitive $F$ of $\frac{f'}{f}$ and than it is easy to verify that $e^{(F(z)-c)/n}$ for some constant $c$ works. The only thing here that I'm not sure about (and it's where I think the problem is) is that I don't know if I can consider that primitive $F$. I don't see why I shouldn't though, as $f$ is uniquely representable by a power series in balls contained in $U$, and so I should also be able to define a primitive of $f$ locally. 
Ok, so let's try to prove the open mapping theorem
To prove that, you suppose $0 \in U$, consider an open ball $B$ contained in $U$ and require $f(0)=0$ (it shouldn't change anything, it's just translations). $f(z)=z^{k}g(z)$, where $k$ is the order of $f$, that is the minimum integer for which the coefficent of $z^k$ isn't 0. Then you have $g(z)$ an holomorpic function in $B$ such that $g(0) \ne 0$. By continuity, there is an open neighborhood  where $g$ is never 0. Using the result proven above, I can write $g(z)=(h(z))^{k}$, and so $f(z)=(zh(z))^k$. You can verify that $(zh)'(0) \ne 0$ and then using the inverse function theorem and the fact that $z \to z^k$ is an open mapping, you conclude.
The second theorem is now trivial, as for every point $a$ in the internal part of $U$ you can send an open neighborhood of $a$ in an open neighborhood of $f(a)$, and so  $f(a)$ cannot be a maximum.
I don't see why these proofs shouldn't work, or where I've used unconsiously the connection. thanks for the help.
 A: 
and so I should also be able to define a primitive of $f$ locally.

Yes, locally. Every holomorphic function has local primitives. But we need a global primitive of $f'/f$, and the existence of global primitives for all holomorphic functions is equivalent to simple connectedness [of each connected component of the open set]. To get a global primitive, we must be able to choose the local primitives in such a way that any two local primitives agree on the intersection of their domains. If you look at $z \mapsto 1/z$ on $\mathbb{C}\setminus \{0\}$, and try to piece together local primitives on the unit circle, you will note that when you come around the circle, the local primitives differ by $2\pi i$. There is hence no global primitive.
Your argument for the open mapping theorem assumes that $f$ doesn't vanish identically on a neighbourhood of $0$. If $f(z) = 0$ for all $z$ with $\lvert z\rvert < \varepsilon$, then we cannot write $f(z) = z^kg(z)$ with $k \in \mathbb{N}$ and a non-vanishing $g$. The identity theorem asserts that a holomorphic $f\colon U \to \mathbb{C}$ vanishing on $\{ z : \lvert z\rvert < \varepsilon\}$ is identically zero on the connected component of $U$ containing $0$, but if $U$ has more than one connected component, such an $f$ need not be globally constant. If we consider only connected $U$, then being locally constant implies being globally constant, and the arguments work. For disconnected $U$, we don't have the local $\to$ global implication.
