Repository: obspy/obspy

Issue:
`scipy.signal` window deprecation warning in e.g. `Trace.taper()`
### Avoid duplicates

- [X] I searched existing issues

### Bug Summary

I noticed a deprecation warning today w/ SciPy windows when tapering data. It looks like `scipy.signal.<window_name>` is going to become `scipy.signal.windows.<window_name>` — see traceback.

Looks like [these lines](https://github.com/obspy/obspy/blob/master/setup.py#L535-L551) in `setup.py` will need to have `.windows` inserted, but I wasn't sure on that.

Not urgent but an FYI for the future...

### Code to Reproduce

```python
obspy.core.trace.Trace.taper()  # With defaults
```


### Error Traceback

```Python traceback
/Users/ldtoney/opt/mambaforge/envs/sonify/lib/python3.11/site-packages/obspy/core/trace.py:2174:
DeprecationWarning: Importing hann from 'scipy.signal' is deprecated and will raise an error in SciPy 1.13.0. Please use 'scipy.signal.windows.hann' or the convenience function 'scipy.signal.get_window' instead.
    taper_sides = func(2 * wlen + 1, **kwargs)
```


### ObsPy Version?

1.4.0

### Operating System?

macOS (Intel)

### Python Version?

3.11.4

### Installation Method?

conda


Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -514,23 +514,26 @@
         ],
     'obspy.plugin.taper': [
         'cosine = obspy.signal.invsim:cosine_taper',
-        'barthann = scipy.signal:barthann',
-        'bartlett = scipy.signal:bartlett',
-        'blackman = scipy.signal:blackman',
-        'blackmanharris = scipy.signal:blackmanharris',
-        'bohman = scipy.signal:bohman',
-        'boxcar = scipy.signal:boxcar',
-        'chebwin = scipy.signal:chebwin',
-        'flattop = scipy.signal:flattop',
-        'gaussian = scipy.signal:gaussian',
-        'general_gaussian = scipy.signal:general_gaussian',
-        'hamming = scipy.signal:hamming',
-        'hann = scipy.signal:hann',
-        'kaiser = scipy.signal:kaiser',
-        'nuttall = scipy.signal:nuttall',
-        'parzen = scipy.signal:parzen',
-        'slepian = scipy.signal:slepian',
-        'triang = scipy.signal:triang',
+        'barthann = scipy.signal.windows:barthann',
+        'bartlett = scipy.signal.windows:bartlett',
+        'blackman = scipy.signal.windows:blackman',
+        'blackmanharris = scipy.signal.windows:blackmanharris',
+        'bohman = scipy.signal.windows:bohman',
+        'boxcar = scipy.signal.windows:boxcar',
+        'chebwin = scipy.signal.windows:chebwin',
+        'flattop = scipy.signal.windows:flattop',
+        'gaussian = scipy.signal.windows:gaussian',
+        'general_gaussian = scipy.signal.windows:general_gaussian',
+        'hamming = scipy.signal.windows:hamming',
+        'hann = scipy.signal.windows:hann',
+        'kaiser = scipy.signal.windows:kaiser',
+        'nuttall = scipy.signal.windows:nuttall',
+        'parzen = scipy.signal.windows:parzen',
+        # TODO slepian has been removed from scipy with version 1.6.0
+        # see https://docs.scipy.org/doc/scipy/release/1.1.0-notes.html
+        # see https://docs.scipy.org/doc/scipy/release/1.6.0-notes.html
+        'slepian = scipy.signal.windows:slepian',
+        'triang = scipy.signal.windows:triang',
         ],
     'obspy.plugin.trigger': [
         'recstalta = obspy.signal.trigger:recursive_sta_lta',


Test patch: