Skip to content

Commit

Permalink
Unblacklist JVM check_style Python 3 integration test thanks to using…
Browse files Browse the repository at this point in the history
… Python 3.5+ (#6882)

## Problem
shutil.copytree was failing in CI for the `backend/jvm/tasks:checkstyle_integration` target due to a bug with Python 3.4.

```
shutil.Error: [('/home/travis/build/pantsbuild/pants/build-support/bin/native/src', '/tmp/tmpjdehtsq4/build-support/bin/native/src', "[Errno 21] Is a directory: '/home/travis/build/pantsbuild/pants/build-support/bin/native/src'"), ('/home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/include/python2.7', '/tmp/tmpjdehtsq4/build-support/pants_dev_deps.venv/include/python2.7', "[Errno 21] Is a directory: '/home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/include/python2.7'"), ('/home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/lib/python2.7/config', '/tmp/tmpjdehtsq4/build-support/pants_dev_deps.venv/lib/python2.7/config', "[Errno 21] Is a directory: '/home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/lib/python2.7/config'"), ('/home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/lib/python2.7/encodings', '/tmp/tmpjdehtsq4/build-support/pants_dev_deps.venv/lib/python2.7/encodings', "[Errno 21] Is a directory: '/home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/lib/python2.7/encodings'"), ('/home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/lib/python2.7/lib-dynload', '/tmp/tmpjdehtsq4/build-support/pants_dev_deps.venv/lib/python2.7/lib-dynload', "[Errno 21] Is a directory: '/home/travis/build/pantsbuild/pants/build-support/pants_dev_deps.venv/lib/python2.7/lib-dynload'")]
```

This error is confusing, because those are intentionally directories. Also, it doesn't reproduce on Python 2.7 and other Python 3 versions.

The bug is from the [std lib's handling of symbolic directories](https://bugs.python.org/issue21697). `shutil.copytree` treated all symbolic folders as files, which leads to the error `is a directory`. This was fixed in Python 3.5+.

## Solution
We upgraded Travis to Python 3.5 with #6885. This allows us to raise the floor of minimum Python 3 to 3.5, fixing this bug.
  • Loading branch information
Eric-Arellano authored Dec 12, 2018
1 parent 7da3ab5 commit cf40141
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion build-support/known_py3_integration_failures.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
tests/python/pants_test/backend/codegen/antlr/python:integration
tests/python/pants_test/backend/jvm/tasks:checkstyle_integration
tests/python/pants_test/backend/python/tasks:integration
tests/python/pants_test/backend/python/tasks:python_native_code_testing_1
tests/python/pants_test/backend/python/tasks:python_native_code_testing_2
Expand Down

0 comments on commit cf40141

Please sign in to comment.