If the upload module is disabled, you will get an error when trying to import a file because of the use of _upload_file_limits(), so the upload module should be added to the dependencies.