Skip to content

MNT Remove obsolete code (Python >= 3.7) #21092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions sklearn/externals/_pep562.py

This file was deleted.

2 changes: 0 additions & 2 deletions sklearn/impute/tests/test_impute.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import division

import pytest

import numpy as np
Expand Down
2 changes: 0 additions & 2 deletions sklearn/neighbors/_nca.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# John Chiotellis <ioannis.chiotellis@in.tum.de>
# License: BSD 3 clause

from __future__ import print_function

from warnings import warn
import numpy as np
import sys
Expand Down
7 changes: 0 additions & 7 deletions sklearn/tests/test_docstring_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from sklearn.utils.estimator_checks import _enforce_estimator_tags_x
from sklearn.utils.estimator_checks import _construct_instance
from sklearn.utils.deprecation import _is_deprecated
from sklearn.externals._pep562 import Pep562
from sklearn.datasets import make_classification
from sklearn.linear_model import LogisticRegression
from sklearn.preprocessing import FunctionTransformer
Expand Down Expand Up @@ -162,12 +161,6 @@ def test_tabs():
# because we don't import
mod = importlib.import_module(modname)

# TODO: Remove when minimum python version is 3.7
# unwrap to get module because Pep562 backport wraps the original
# module
if isinstance(mod, Pep562):
mod = mod._module

try:
source = inspect.getsource(mod)
except IOError: # user probably should have run "make clean"
Expand Down