Closed njwilson closed 12 years ago
@merwok, does this seem like the right approach?
Sounds good. If at one time you depend on things that are not in packaging in 3.3, then you will depend on distutils2 X.Y for 3.3 too and remove the import packaging.
Our
compat.py
currently importspackaging
/unittest.mock
from the standard library in Python 3.3+ and the third-partydistutils2
/mock
(not from the standard library) in older versions.This comment from Éric Araujo on the distutils-sig mailing list makes me think we should always prefer/import the third-party versions (
distutils2
andmock
) if they are installed, otherwise fall back to the stdlib versions: "In the worst case packaging 1.0 in Python 3.3 will work for simple cases and people will be able to use it to install a newer version of distutils2."