hugovk · Discussions on Python.org

Yes, here’s a bunch.

os.errno: import errno was removed from os in 3.7, which broke things like os.errno.ENOENT from real codebases.

Requests once vendored its urllib3, chardet and idna dependencies in packages, but was depended on so much that they kept a compat shim:

# This code exists for backwards compatibility reasons.
# I don't like it either. Just look the other way. :)

And botocore had vendored dependencies under vendored but that didn’t stop people using stuff like from botocore.vendored.requests.packages.urllib3.exceptions import ReadTimeoutError!!

SciPy once exposed NumPy modules at the top-level, such that scipy.random was an alias for numpy.random, and so on, before being deprecated and removed:

scikit-learn once vendored six and joblib and downstream packages imported them from sklearn.externals.six and sklearn.externals.joblib, which broke when removed in sklearn 0.23. Some discussion threads advised workarounds like pinning scikit-learn==0.20.3 or sys.modules['sklearn.externals.six'] = six to keep old code running.

pandas.np and pandas.datetime:

django.utils.six was once encouraged:

A customized version of six is bundled with Django as of version 1.4.2. You can import it as django.utils.six`.

Read the original on discuss.python.org ↗