[v7r2] Run most unit tests for Python 3#4726
Closed
chrisburr wants to merge 43 commits into
Closed
Conversation
Co-authored-by: fstagni <federico.stagni@cern.ch>
chaen
reviewed
Aug 26, 2020
chaen
reviewed
Aug 26, 2020
chaen
reviewed
Aug 26, 2020
chaen
reviewed
Aug 26, 2020
chaen
reviewed
Aug 26, 2020
chaen
reviewed
Aug 26, 2020
chaen
reviewed
Aug 26, 2020
chaen
reviewed
Aug 26, 2020
chaen
reviewed
Aug 26, 2020
andresailer
reviewed
Aug 26, 2020
andresailer
reviewed
Aug 26, 2020
andresailer
reviewed
Aug 26, 2020
andresailer
reviewed
Aug 26, 2020
andresailer
reviewed
Aug 26, 2020
andresailer
reviewed
Aug 26, 2020
andresailer
left a comment
Contributor
There was a problem hiding this comment.
I've clicked through all the files.
9f780cf to
8612127
Compare
This was referenced Aug 28, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This builds upon #4718 to add support for actually running the unit tests instead of just collecting them. As #4718 hasn't been merged yet, see here for the diff chrisburr/DIRAC@py3-pytest-discover...chrisburr:run-py3-pytest. As usual for these changes, reviewing individual commits might be easier that the entire PR.
There is a lot left to port but I limited myself to the unit tests so we can be reasonably sure I haven't broken anything. I suspect after this is merged it shouldn't take much more to get a functional client installation running with Python 3.
This PR includes #4391 as I didn't want waste time looking for a Python 3 build that uses OpenSSL 1.0.2, @chaen can #4391 be unmarked as WIP now M2Crypto has been updated?
There are three tests which are still disabled as they fail:
test_BaseType_Unicodeandtest_nestedStructurefail due to DEncode's string and unicode types being poorly defined. I think this is hard to fix without major changes to DIRAC or backwads incompatible changes to DEncode itself. Hopefully we can ignore it until we've moved to JSON.testLockedClassdeadlocks frequently due to the use of self.__processThread._Thread__stop(). Officially "threads cannot be destroyed, stopped, suspended, resumed, or interrupted" so the code should be rewritten to follow the supported alternative: "If you want your threads to stop gracefully, make them non-daemonic and use a suitable signalling mechanism such as an Event.".I also add
flakyto the CI astest_cpuUsagestruggles to produce enough system CPU usage to be registered thanks performance improvements in Python 3. I think it's worthwhile so we can use it for the handful of other tests which are unreliable.BEGINRELEASENOTES
*Python 3
NEW: Run most unit tests with Python 3
ENDRELEASENOTES