You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:32:20 UTC

[buildstream] branch tpollard/python38 created (now d3c0a7d)

This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a change to branch tpollard/python38
in repository https://gitbox.apache.org/repos/asf/buildstream.git.


      at d3c0a7d  Try new copytree api on 3.8

This branch includes the following new commits:

     new 723d0d4  WIP
     new 8a746a5  Cov 5.0?
     new e1a9d94  Add pytest timeout to ci
     new ebd7286  Try a newer version of 3.8-buster
     new 1a4c6ae  Try coverage with 5.0 full release
     new 5456a94  Try adding parallel
     new 0b5ed7d  Turn off coverage
     new d3c0a7d  Try new copytree api on 3.8

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[buildstream] 01/08: WIP

Posted by no...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a commit to branch tpollard/python38
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 723d0d498e5dbe59acb9d71d2542e552336a4fa4
Author: Benjamin Schubert <bs...@bloomberg.net>
AuthorDate: Mon Dec 2 14:29:12 2019 +0000

    WIP
---
 .gitlab-ci.yml                          |  6 ++++++
 src/buildstream/_scheduler/scheduler.py |  9 ++++++++-
 tox.ini                                 | 34 ++++++++++++++++-----------------
 3 files changed, 31 insertions(+), 18 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1fe2581..1c605bd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -88,6 +88,12 @@ tests-centos-7.6:
   <<: *tests
   image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-centos:7.6.1810-${DOCKER_IMAGE_VERSION}
 
+tests-python-3.8-buster:
+  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-python:3.8-buster-chandan-python3-8-89265968
+  <<: *tests
+  variables:
+    TOXENV: py38
+
 overnight-fedora-30-aarch64:
   image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:aarch64-30-${DOCKER_IMAGE_VERSION}
   tags:
diff --git a/src/buildstream/_scheduler/scheduler.py b/src/buildstream/_scheduler/scheduler.py
index a45da82..4e66a03 100644
--- a/src/buildstream/_scheduler/scheduler.py
+++ b/src/buildstream/_scheduler/scheduler.py
@@ -171,6 +171,14 @@ class Scheduler:
         # Hold on to the queues to process
         self.queues = queues
 
+        # NOTE: Enforce use of `SafeChildWatcher` as we generally don't want
+        # background threads.
+        # In Python 3.8+, `ThreadedChildWatcher` is the default watcher, and not `SafeChildWatcher`
+        # This needs to be done before we call `new_event_loop`, otherwise the loop will not be
+        # setup correctly with the watcher.
+        _watcher = asyncio.SafeChildWatcher()
+        asyncio.set_child_watcher(_watcher)
+
         # Ensure that we have a fresh new event loop, in case we want
         # to run another test in this thread.
         self.loop = asyncio.new_event_loop()
@@ -187,7 +195,6 @@ class Scheduler:
 
         # Watch casd while running to ensure it doesn't die
         self._casd_process = casd_process_manager.process
-        _watcher = asyncio.get_child_watcher()
 
         def abort_casd(pid, returncode):
             asyncio.get_event_loop().call_soon(self._abort_on_casd_failure, pid, returncode)
diff --git a/tox.ini b/tox.ini
index 62737b0..8569708 100644
--- a/tox.ini
+++ b/tox.ini
@@ -2,7 +2,7 @@
 # Tox global configuration
 #
 [tox]
-envlist = py{35,36,37}
+envlist = py{35,36,37,38}
 skip_missing_interpreters = true
 isolated_build = true
 
@@ -14,22 +14,22 @@ isolated_build = true
 [testenv]
 usedevelop =
     # This is required by Cython in order to get coverage for cython files.
-    py{35,36,37}-!nocover: True
+    py{35,36,37,38}-!nocover: True
 
 commands =
     # Running with coverage reporting enabled
-    py{35,36,37}-!external-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
-    py{35,36,37}-!nocover: mkdir -p .coverage-reports
+    py{35,36,37,38}-!external-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
+    py{35,36,37,38}-!nocover: mkdir -p .coverage-reports
     external-!nocover: {envpython} {toxinidir}/tests/external_plugins.py {envtmpdir} --cov=buildstream --cov-append {posargs}
-    py{35,36,37}-!external-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
-    py{35,36,37}-external-!nocover: - mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
+    py{35,36,37,38}-!external-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
+    py{35,36,37,38}-external-!nocover: - mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
     # Running with coverage reporting disabled
-    py{35,36,37}-!external-nocover: pytest --basetemp {envtmpdir} {posargs}
+    py{35,36,37,38}-!external-nocover: pytest --basetemp {envtmpdir} {posargs}
     external-nocover: {envpython} {toxinidir}/tests/external_plugins.py {envtmpdir} {posargs}
 deps =
-    py{35,36,37}: -rrequirements/requirements.txt
-    py{35,36,37}: -rrequirements/dev-requirements.txt
-    py{35,36,37}: -rrequirements/plugin-requirements.txt
+    py{35,36,37,38}: -rrequirements/requirements.txt
+    py{35,36,37,38}: -rrequirements/dev-requirements.txt
+    py{35,36,37,38}: -rrequirements/plugin-requirements.txt
     git+https://gitlab.com/BuildStream/bst-plugins-experimental.git@5b004e5850ab0e987c00c681b2c768f6ae02586b
 
     # Only require coverage and pytest-cov when using it
@@ -58,17 +58,17 @@ passenv =
 # These keys are not inherited by any other sections
 #
 setenv =
-    py{35,36,37}: COVERAGE_FILE = {envtmpdir}/.coverage
-    py{35,36,37}: BST_TEST_HOME = {envtmpdir}
-    py{35,36,37}: BST_TEST_XDG_CACHE_HOME = {envtmpdir}/cache
-    py{35,36,37}: BST_TEST_XDG_CONFIG_HOME = {envtmpdir}/config
-    py{35,36,37}: BST_TEST_XDG_DATA_HOME = {envtmpdir}/share
+    py{35,36,37,38}: COVERAGE_FILE = {envtmpdir}/.coverage
+    py{35,36,37,38}: BST_TEST_HOME = {envtmpdir}
+    py{35,36,37,38}: BST_TEST_XDG_CACHE_HOME = {envtmpdir}/cache
+    py{35,36,37,38}: BST_TEST_XDG_CONFIG_HOME = {envtmpdir}/config
+    py{35,36,37,38}: BST_TEST_XDG_DATA_HOME = {envtmpdir}/share
     # This is required to get coverage for Cython
-    py{35,36,37}-!nocover: BST_CYTHON_TRACE = 1
+    py{35,36,37,38}-!nocover: BST_CYTHON_TRACE = 1
     randomized: PYTEST_ADDOPTS="--random-order-bucket=global"
 
 whitelist_externals =
-    py{35,36,37}:
+    py{35,36,37,38}:
         mv
         mkdir
 


[buildstream] 04/08: Try a newer version of 3.8-buster

Posted by no...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a commit to branch tpollard/python38
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit ebd72869e2ba4b5fb00f5c5ec7fa0011e4ec643c
Author: Tom Pollard <to...@codethink.co.uk>
AuthorDate: Mon Dec 16 10:35:46 2019 +0000

    Try a newer version of 3.8-buster
---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8247e54..18121ef 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -89,8 +89,8 @@ tests-centos-7.6:
   image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-centos:7.6.1810-${DOCKER_IMAGE_VERSION}
 
 tests-python-3.8-buster:
-  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-python:3.8-buster-chandan-python3-8-89265968
   <<: *tests
+  image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-python:3.8-buster-tlater-improve-artifact-cache-102956389
   variables:
     TOXENV: py38
 


[buildstream] 03/08: Add pytest timeout to ci

Posted by no...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a commit to branch tpollard/python38
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit e1a9d9489c587f4230d82e9944ace30aa2cab078
Author: Tom Pollard <to...@codethink.co.uk>
AuthorDate: Thu Dec 12 15:53:10 2019 +0000

    Add pytest timeout to ci
---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1c605bd..8247e54 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,7 +27,7 @@ variables:
   DOCKER_IMAGE_VERSION: master-103717922
   PYTEST_ADDOPTS: "--color=yes"
   INTEGRATION_CACHE: "${CI_PROJECT_DIR}/cache/integration-cache"
-  PYTEST_ARGS: "--color=yes --integration -n 2"
+  PYTEST_ARGS: "--color=yes --timeout=300 --integration -n 2"
   TEST_COMMAND: "tox -- ${PYTEST_ARGS}"
   EXTERNAL_TESTS_COMMAND: "tox -e py35-external,py36-external,py37-external -- ${PYTEST_ARGS}"
   COVERAGE_PREFIX: "${CI_JOB_NAME}."


[buildstream] 08/08: Try new copytree api on 3.8

Posted by no...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a commit to branch tpollard/python38
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit d3c0a7d0223f6a0b7440091a4ac76a0c4d4d5fd1
Author: Tom Pollard <to...@codethink.co.uk>
AuthorDate: Wed Dec 18 12:32:58 2019 +0000

    Try new copytree api on 3.8
---
 src/buildstream/testing/repo.py | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/buildstream/testing/repo.py b/src/buildstream/testing/repo.py
index 1b46ec8..264dde4 100644
--- a/src/buildstream/testing/repo.py
+++ b/src/buildstream/testing/repo.py
@@ -84,13 +84,20 @@ class Repo:
             src (str): The source directory
             dest (str): The destination directory
         """
-        for filename in os.listdir(src):
-            src_path = os.path.join(src, filename)
-            dest_path = os.path.join(dest, filename)
-            if os.path.isdir(src_path):
-                shutil.copytree(src_path, dest_path)
-            else:
-                shutil.copy2(src_path, dest_path)
+
+        # Try to use copytree new api in 3.8
+        import sys
+
+        if sys.version_info[:2] < (3, 8):
+            for filename in os.listdir(src):
+                src_path = os.path.join(src, filename)
+                dest_path = os.path.join(dest, filename)
+                if os.path.isdir(src_path):
+                    shutil.copytree(src_path, dest_path)
+                else:
+                    shutil.copy2(src_path, dest_path)
+        else:
+            shutil.copytree(src, dest, dirs_exist_ok=True)  # pylint: disable=unexpected-keyword-arg
 
     def copy(self, dest):
         """Creates a copy of this repository in the specified destination.


[buildstream] 05/08: Try coverage with 5.0 full release

Posted by no...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a commit to branch tpollard/python38
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 1a4c6ae221c8f1e96c74768653ff457ce938361d
Author: Tom Pollard <to...@codethink.co.uk>
AuthorDate: Mon Dec 16 12:36:26 2019 +0000

    Try coverage with 5.0 full release
---
 requirements/cov-requirements.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/requirements/cov-requirements.txt b/requirements/cov-requirements.txt
index 1e60e4a..beb9c3b 100644
--- a/requirements/cov-requirements.txt
+++ b/requirements/cov-requirements.txt
@@ -1,4 +1,4 @@
-coverage==5.0b2
+coverage==5.0
 pytest-cov==2.8.1
 Cython==0.29.14
 ## The following requirements were added by pip freeze:


[buildstream] 02/08: Cov 5.0?

Posted by no...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a commit to branch tpollard/python38
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 8a746a58a7f41244560bcc8ca44d80c5d25d8ab6
Author: Benjamin Schubert <bs...@bloomberg.net>
AuthorDate: Tue Dec 10 14:02:04 2019 +0000

    Cov 5.0?
---
 requirements/cov-requirements.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/requirements/cov-requirements.txt b/requirements/cov-requirements.txt
index c700aba..1e60e4a 100644
--- a/requirements/cov-requirements.txt
+++ b/requirements/cov-requirements.txt
@@ -1,4 +1,4 @@
-coverage==4.4
+coverage==5.0b2
 pytest-cov==2.8.1
 Cython==0.29.14
 ## The following requirements were added by pip freeze:


[buildstream] 06/08: Try adding parallel

Posted by no...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a commit to branch tpollard/python38
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 5456a94b57e7490b6da87fba15168f87963fdbfd
Author: Tom Pollard <to...@codethink.co.uk>
AuthorDate: Mon Dec 16 14:06:13 2019 +0000

    Try adding parallel
---
 .coveragerc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.coveragerc b/.coveragerc
index 5b06d81..a2b0a14 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -1,6 +1,7 @@
 [run]
 concurrency = multiprocessing
 plugins = Cython.Coverage
+parallel = True
 
 omit =
   # Omit some internals


[buildstream] 07/08: Turn off coverage

Posted by no...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a commit to branch tpollard/python38
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 0b5ed7dbd862754e972657d4ffe4084fd3aa8593
Author: Tom Pollard <to...@codethink.co.uk>
AuthorDate: Thu Dec 12 16:50:46 2019 +0000

    Turn off coverage
---
 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 18121ef..a98726b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,8 +27,8 @@ variables:
   DOCKER_IMAGE_VERSION: master-103717922
   PYTEST_ADDOPTS: "--color=yes"
   INTEGRATION_CACHE: "${CI_PROJECT_DIR}/cache/integration-cache"
-  PYTEST_ARGS: "--color=yes --timeout=300 --integration -n 2"
-  TEST_COMMAND: "tox -- ${PYTEST_ARGS}"
+  PYTEST_ARGS: "--color=yes --timeout=300 --integration -n 2 tests/"
+  TEST_COMMAND: "tox -e py35-nocover,py36-nocover,py37-nocover,py38-nocover -- ${PYTEST_ARGS}"
   EXTERNAL_TESTS_COMMAND: "tox -e py35-external,py36-external,py37-external -- ${PYTEST_ARGS}"
   COVERAGE_PREFIX: "${CI_JOB_NAME}."