Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
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

Update pytest >=4.6 #1415

Merged
merged 9 commits into from Nov 25, 2019

Conversation

@benclifford
Copy link
Contributor

benclifford commented Oct 29, 2019

This commit requires a much newer version of pytest.

It changes conftest.py to use the API of that newer pytest.

This is needed as part of running CI with python 3.8

This is needed as part of running CI with
python 3.8
@benclifford

This comment has been minimized.

Copy link
Contributor Author

benclifford commented Oct 29, 2019

This failed once in CI for the python 3.5 test, but not for the other two version, with a ConnectionRefusedError on an ftp test. This seems unrelated to the changes introduced by the PR. I've restarted that test to see if it passes.

@benclifford

This comment has been minimized.

Copy link
Contributor Author

benclifford commented Oct 30, 2019

looks like our pytest marks are broken by this PR on 3.5 but not on other versions(!)

benclifford added 2 commits Nov 8, 2019
…causing trouble, and that is way historical by now
@benclifford benclifford changed the title Update pytest >=4.1 Update pytest >=4.6 Nov 8, 2019
@benclifford

This comment has been minimized.

Copy link
Contributor Author

benclifford commented Nov 8, 2019

This now passes in CI: on my laptop, with no pytest installed, the most recent valid pytest was install (4.6.6). In CI, pytest 4.1.0 is pre-installed. This was also valid according to the requirements I added, but didn't work. I've updated the requirements to >=4.6 and this now passes in CI.

Copy link
Member

yadudoc left a comment

I think this looks all right.

@benclifford

This comment has been minimized.

Copy link
Contributor Author

benclifford commented Nov 13, 2019

I'm seeing a bunch of

--- Logging error ---
Traceback (most recent call last):
  File "/opt/python/3.5.6/lib/python3.5/logging/__init__.py", line 988, in emit
    stream.write(msg)
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/_pytest/capture.py", line 441, in write
    self.buffer.write(obj)
ValueError: I/O operation on closed file
Call stack:
  File "/home/travis/build/Parsl/parsl/parsl/dataflow/dflow.py", line 855, in atexit_cleanup
    self.cleanup()
  File "/home/travis/build/Parsl/parsl/parsl/dataflow/dflow.py", line 882, in cleanup
    logger.info("DFK cleanup initiated")
Message: 'DFK cleanup initiated'
Arguments: ()

at the end of the --config local test run - although this does not cause pytest to fail with an exit code.

It looks related to this pytest issue to do with module imports setting up logging: pytest-dev/pytest#5502

@benclifford

This comment has been minimized.

Copy link
Contributor Author

benclifford commented Nov 13, 2019

These I/O operation on closed file errors also happen on my dev laptop.

benclifford added 2 commits Nov 17, 2019
@benclifford

This comment has been minimized.

Copy link
Contributor Author

benclifford commented Nov 24, 2019

It looks like the error messages that I reported were caused by test cases calling parsl.set_stream_logger() when they were imported, resulting in log configuration to stderr/stdout that this newer version of pytest does not like.

Those calls shouldn't have been made anyway, so I've removed them / moved to __main__ blocks in 4838b8a and the error messages no longer happen.

@benclifford

This comment has been minimized.

Copy link
Contributor Author

benclifford commented Nov 24, 2019

@yadudoc please can you look at this again?

@yadudoc yadudoc merged commit fc06b7d into master Nov 25, 2019
1 check passed
1 check passed
Travis CI - Pull Request Build Passed
Details
@yadudoc yadudoc deleted the benc-pytest-4.1 branch Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.