def movie_sort(movies):
    """Sorts a list of movies by their release date using bubble sort.

    Args:
        movies: a list of movies.

    Returns:
        A sorted list of movies.
    """
    sorted_movies = movies.copy()
    swapped = True
    while swapped:
        swapped = False
        for i in range(1, len(sorted_movies[1:])):
            if sorted_movies[i - 1].year > sorted_movies[i].year:
                sorted_movies[i], sorted_movies[i - 1] = \
                    sorted_movies[i - 1], sorted_movies[i]
                swapped = True
    return sorted_movies