Skip to content

Commit

Permalink
MAINT: remove certifi py3.11 warning filter (#17149)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnirudhDagar committed Oct 5, 2022
1 parent 42f5a71 commit bf2934b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
7 changes: 1 addition & 6 deletions scipy/datasets/_fetchers.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
from numpy import array, frombuffer, load
from ._registry import registry, registry_urls
import warnings

try:
# https://github.com/scipy/scipy/pull/15607#issuecomment-1176457275
# TODO: Remove warning filter after next certifi release
with warnings.catch_warnings():
warnings.filterwarnings('ignore', category=DeprecationWarning)
import pooch
import pooch
except ImportError:
pooch = None
data_fetcher = None
Expand Down
8 changes: 2 additions & 6 deletions scipy/datasets/tests/test_data.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
from scipy.datasets._registry import registry
from scipy.datasets._fetchers import fetch_data, data_fetcher
from scipy.datasets import ascent, face, electrocardiogram
from numpy.testing import assert_equal, assert_almost_equal, suppress_warnings
from numpy.testing import assert_equal, assert_almost_equal
import os
import pytest

try:
# https://github.com/scipy/scipy/pull/15607#issuecomment-1176457275
# TODO: Remove warning filter after next certifi release
with suppress_warnings() as sup:
sup.filter(category=DeprecationWarning)
import pooch
import pooch
except ImportError:
raise ImportError("Missing optional dependency 'pooch' required "
"for scipy.datasets module. Please use pip or "
Expand Down

0 comments on commit bf2934b

Please sign in to comment.