Skip to content

Commit

Permalink
Remove arbitrary version limit for Matplotlib<3.9
Browse files Browse the repository at this point in the history
Add a limit for Matplotlib<3.10 in setuppy, as a security measure to
avoid incompatibilities with future versions.
  • Loading branch information
claudiodsf committed Sep 23, 2024
1 parent d09cc8c commit 15147c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Copyright (c) 2011-2024 Claudio Satriano <[email protected]>
- Spectral plots: show information on the reason why a fit failed
- `plot_sourcepars`: possibility of selecting the latest runid for each event
- `plot_sourcepars`: new plot type: static stress drop vs. depth
- Support for Matplotlib 3.9

### Config file

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
install_requires=[
'numpy>=1.10',
'scipy>=0.17',
'matplotlib>=3.2',
'matplotlib>=3.2,<3.10',
'pillow>=4.0.0',
'obspy>=1.2.0',
'pyproj',
Expand Down
4 changes: 2 additions & 2 deletions sourcespec/ssp_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@ def _check_library_versions():
MATPLOTLIB_VERSION_STR = matplotlib.__version__
MATPLOTLIB_VERSION = MATPLOTLIB_VERSION_STR.split('.')[:3]
MATPLOTLIB_VERSION = tuple(map(int, MATPLOTLIB_VERSION))
MAX_MATPLOTLIB_VERSION = (3, 9, 0)
MAX_MATPLOTLIB_VERSION = (3, 10, 0)
if MATPLOTLIB_VERSION >= MAX_MATPLOTLIB_VERSION:
MAX_MATPLOTLIB_VERSION_STR = '.'.join(map(str, MAX_MATPLOTLIB_VERSION))
sys.stderr.write(
f'ERROR: Matplotlib >= {MAX_MATPLOTLIB_VERSION_STR}'
f'ERROR: Matplotlib >= {MAX_MATPLOTLIB_VERSION_STR} '
'is not yet supported. Please use a less recent version'
f' You have version: {MATPLOTLIB_VERSION_STR}\n'
)
Expand Down

0 comments on commit 15147c7

Please sign in to comment.