# Buggy code
def __new__(
    cls,
    data=None,
    unit=None,
    freq=None,
    closed=None,
    dtype=_TD_DTYPE,
    copy=False,
    name=None,
):
    if is_scalar(data):
        raise TypeError(
            f"{cls.__name__}() must be called with a "
            f"collection of some kind, {repr(data)} was passed"
        )

    if unit in {"Y", "y", "M"}:
        raise ValueError(
            "Units 'M' and 'Y' are no longer supported, as they do not "
            "represent unambiguous timedelta values durations."
        )

    if isinstance(data, TimedeltaArray):
        if copy:
            data = data.copy()
        return cls._simple_new(data, name=name, freq=freq)

    if isinstance(data, TimedeltaIndex) and freq is None and name is None:
        if copy:
            return data.copy()
        else:
            return data._shallow_copy()

    # - Cases checked above all return/raise before reaching here - #

    tdarr = TimedeltaArray._from_sequence(
        data, freq=freq, unit=unit, dtype=dtype, copy=copy
    )
    return cls._simple_new(tdarr._data, freq=tdarr.freq, name=name)


# Traceback (TypeError)
In [5]: pd.Series([], name=[])
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-2c73ddde103e> in <module>
----> 1 pd.Series([], name=[])

~/sandbox/pandas/pandas/core/series.py in __init__(self, data, index, dtype, name, copy, fastpath)
326         generic.NDFrame.__init__(self, data, fastpath=True)
327
--> 328         self.name = name
329         self._set_axis(0, index, fastpath=True)
330

~/sandbox/pandas/pandas/core/generic.py in __setattr__(self, name, value)
5257             object.__setattr__(self, name, value)
5258         elif name in self._metadata:
-> 5259             object.__setattr__(self, name, value)
5260         else:
5261             try:

~/sandbox/pandas/pandas/core/series.py in name(self, value)
468     def name(self, value):
469         if value is not None and not is_hashable(value):
--> 470             raise TypeError("Series.name must be a hashable type")
471         object.__setattr__(self, "_name", value)
472

TypeError: Series.name must be a hashable type

# Fixed code
def __new__(
    cls,
    data=None,
    unit=None,
    freq=None,
    closed=None,
    dtype=_TD_DTYPE,
    copy=False,
    name=None,
):
    name = maybe_extract_name(name, data, cls)

    if is_scalar(data):
        raise TypeError(
            f"{cls.__name__}() must be called with a "
            f"collection of some kind, {repr(data)} was passed"
        )

    if unit in {"Y", "y", "M"}:
        raise ValueError(
            "Units 'M' and 'Y' are no longer supported, as they do not "
            "represent unambiguous timedelta values durations."
        )

    if isinstance(data, TimedeltaArray):
        if copy:
            data = data.copy()
        return cls._simple_new(data, name=name, freq=freq)

    if isinstance(data, TimedeltaIndex) and freq is None and name is None:
        if copy:
            return data.copy()
        else:
            return data._shallow_copy()

    # - Cases checked above all return/raise before reaching here - #

    tdarr = TimedeltaArray._from_sequence(
        data, freq=freq, unit=unit, dtype=dtype, copy=copy
    )
    return cls._simple_new(tdarr._data, freq=tdarr.freq, name=name)