The equation of motion of the simple pendulum is nonlinear. The small-angle approximation (sin θ ≈ θ) linearizes it into a harmonic oscillator, but is only valid below roughly 10°. Beyond that, the true period grows with amplitude and the error becomes significant.
Starting from conservation of energy, θ(t) can be expressed exactly for any initial amplitude using Jacobi elliptic functions. The full proof is in the PDF. The Python script below compares this solution against numerical integration via odeint
References: Pendulum at arbitrary amplitude (Wikipedia), Jacobi functions (MathWorld).