From 3b6b879735616237111f18f220f43ebb25a702f9 Mon Sep 17 00:00:00 2001 From: Saurav Chakravorty Date: Mon, 15 Apr 2019 23:43:42 +0530 Subject: [PATCH 01/13] add install for xsel --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 022e11b7db950..2451f7415b5c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,6 +62,7 @@ matrix: before_install: - echo "before_install" + - sudo apt-get install -y xsel # set non-blocking IO on travis # https://github.com/travis-ci/travis-ci/issues/8920#issuecomment-352661024 - python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);' From 41ef5c0b1c466e68a6ef64a66fa159f46d1022e6 Mon Sep 17 00:00:00 2001 From: Saurav Chakravorty Date: Tue, 16 Apr 2019 00:27:55 +0530 Subject: [PATCH 02/13] changed from xsel to xclip --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2451f7415b5c2..02d20b305832a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,7 +62,7 @@ matrix: before_install: - echo "before_install" - - sudo apt-get install -y xsel + - sudo apt-get install xclip python3-pyqt4 # set non-blocking IO on travis # https://github.com/travis-ci/travis-ci/issues/8920#issuecomment-352661024 - python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);' From dddadf663c393bd948b5ecadd5125a4eaf16f011 Mon Sep 17 00:00:00 2001 From: Saurav Chakravorty Date: Tue, 16 Apr 2019 01:45:16 +0530 Subject: [PATCH 03/13] adding a test for xclip. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 02d20b305832a..7f5e6bfe61ecd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,7 +62,8 @@ matrix: before_install: - echo "before_install" - - sudo apt-get install xclip python3-pyqt4 + - sudo apt-get install xclip + - which xclip # set non-blocking IO on travis # https://github.com/travis-ci/travis-ci/issues/8920#issuecomment-352661024 - python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);' From 649966729f6ff35db61d9b1221f20f5d47f62bb9 Mon Sep 17 00:00:00 2001 From: Saurav Chakravorty Date: Thu, 18 Apr 2019 13:17:05 +0530 Subject: [PATCH 04/13] added diagnostic message --- pandas/io/clipboard/clipboards.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandas/io/clipboard/clipboards.py b/pandas/io/clipboard/clipboards.py index 3c8abe74912fd..cec03a00ad0d4 100644 --- a/pandas/io/clipboard/clipboards.py +++ b/pandas/io/clipboard/clipboards.py @@ -66,6 +66,7 @@ def paste_qt(): def init_xclip_clipboard(): + print("X Clip ") def copy_xclip(text): p = subprocess.Popen(['xclip', '-selection', 'c'], stdin=subprocess.PIPE, close_fds=True) From 257314d20d009d3114ae1e44ba562e2fccb0098d Mon Sep 17 00:00:00 2001 From: Saurav Chakravorty Date: Thu, 18 Apr 2019 21:55:52 +0530 Subject: [PATCH 05/13] change display variable. --- ci/setup_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/setup_env.sh b/ci/setup_env.sh index 414a5c8705ee9..0eb2a8273c411 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -118,7 +118,7 @@ echo "conda list" conda list # Install DB for Linux -export DISPLAY=":99." +export DISPLAY=":99.0" if [ ${TRAVIS_OS_NAME} == "linux" ]; then echo "installing dbs" mysql -e 'create database pandas_nosetest;' From 8df38fe1125d6a806c4ba936e9a03182e5b6e992 Mon Sep 17 00:00:00 2001 From: Saurav Chakravorty Date: Fri, 19 Apr 2019 09:33:39 +0530 Subject: [PATCH 06/13] investigative messages --- pandas/io/clipboard/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/io/clipboard/__init__.py b/pandas/io/clipboard/__init__.py index b76a843e3e7f2..ccba606cf92e2 100644 --- a/pandas/io/clipboard/__init__.py +++ b/pandas/io/clipboard/__init__.py @@ -58,6 +58,8 @@ def determine_clipboard(): return init_windows_clipboard() if os.name == 'mac' or platform.system() == 'Darwin': return init_osx_clipboard() + print("Has Diplay ", os.getenv("DISPLAY", False)) + print("HAS_DISPLAY", HAS_DISPLAY) if HAS_DISPLAY: # Determine which command/module is installed, if any. try: From e097d62d4cc0311a120405e9c07701e068ecae4d Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 14 May 2019 21:42:52 +0200 Subject: [PATCH 07/13] add display in before_script --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7f5e6bfe61ecd..02707945fc1d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,6 +88,9 @@ install: - ci/submit_cython_cache.sh - echo "install done" +before_script: + - export DISPLAY=":99.0" + script: - echo "script start" - source activate pandas-dev From 896e3dbec987b3708171292c6cfc5bc10337f7d7 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Wed, 15 May 2019 08:27:53 +0200 Subject: [PATCH 08/13] clean-up --- .travis.yml | 2 -- pandas/io/clipboard/__init__.py | 2 -- pandas/io/clipboard/clipboards.py | 1 - 3 files changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 02707945fc1d5..890fbb5fd387f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,8 +62,6 @@ matrix: before_install: - echo "before_install" - - sudo apt-get install xclip - - which xclip # set non-blocking IO on travis # https://github.com/travis-ci/travis-ci/issues/8920#issuecomment-352661024 - python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);' diff --git a/pandas/io/clipboard/__init__.py b/pandas/io/clipboard/__init__.py index ccba606cf92e2..b76a843e3e7f2 100644 --- a/pandas/io/clipboard/__init__.py +++ b/pandas/io/clipboard/__init__.py @@ -58,8 +58,6 @@ def determine_clipboard(): return init_windows_clipboard() if os.name == 'mac' or platform.system() == 'Darwin': return init_osx_clipboard() - print("Has Diplay ", os.getenv("DISPLAY", False)) - print("HAS_DISPLAY", HAS_DISPLAY) if HAS_DISPLAY: # Determine which command/module is installed, if any. try: diff --git a/pandas/io/clipboard/clipboards.py b/pandas/io/clipboard/clipboards.py index cec03a00ad0d4..3c8abe74912fd 100644 --- a/pandas/io/clipboard/clipboards.py +++ b/pandas/io/clipboard/clipboards.py @@ -66,7 +66,6 @@ def paste_qt(): def init_xclip_clipboard(): - print("X Clip ") def copy_xclip(text): p = subprocess.Popen(['xclip', '-selection', 'c'], stdin=subprocess.PIPE, close_fds=True) From a2973703c2e9c9049ace59e9f28de060444f1d1e Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Wed, 15 May 2019 12:22:49 +0200 Subject: [PATCH 09/13] move xvfb start to before_script --- .travis.yml | 3 +++ ci/setup_env.sh | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 890fbb5fd387f..85c5797824abe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,6 +88,9 @@ install: before_script: - export DISPLAY=":99.0" + - echo "sh -e /etc/init.d/xvfb start" + - sh -e /etc/init.d/xvfb start + - sleep 3 script: - echo "script start" diff --git a/ci/setup_env.sh b/ci/setup_env.sh index 0eb2a8273c411..e2667558a63d7 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -118,16 +118,10 @@ echo "conda list" conda list # Install DB for Linux -export DISPLAY=":99.0" if [ ${TRAVIS_OS_NAME} == "linux" ]; then echo "installing dbs" mysql -e 'create database pandas_nosetest;' psql -c 'create database pandas_nosetest;' -U postgres - - echo - echo "sh -e /etc/init.d/xvfb start" - sh -e /etc/init.d/xvfb start - sleep 3 else echo "not using dbs on non-linux" fi From d64a5bfc93388ab01505242947dd1a8a7aa0ad23 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Thu, 16 May 2019 08:16:44 +0200 Subject: [PATCH 10/13] add print statement --- pandas/tests/io/test_clipboard.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandas/tests/io/test_clipboard.py b/pandas/tests/io/test_clipboard.py index 04223efd6eacb..784920789254e 100644 --- a/pandas/tests/io/test_clipboard.py +++ b/pandas/tests/io/test_clipboard.py @@ -15,6 +15,7 @@ try: DataFrame({'A': [1, 2]}).to_clipboard() _DEPS_INSTALLED = 1 + print("running clipboard tests") except (PyperclipException, RuntimeError): _DEPS_INSTALLED = 0 From 4dfe1cbd038e0da24a43ec388ae0e87e12f60b43 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Thu, 16 May 2019 08:18:56 +0200 Subject: [PATCH 11/13] add comment --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 85c5797824abe..ce8817133a477 100644 --- a/.travis.yml +++ b/.travis.yml @@ -87,6 +87,8 @@ install: - echo "install done" before_script: + # display server (for clipboard functionality) needs to be started here, + # does not work if done in install:setup_env.sh (GH-26103) - export DISPLAY=":99.0" - echo "sh -e /etc/init.d/xvfb start" - sh -e /etc/init.d/xvfb start From a5b3edd3db4035c2b08e711e41af7ec5a1ee8202 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Thu, 16 May 2019 09:26:49 +0200 Subject: [PATCH 12/13] try extra prints --- pandas/tests/io/test_clipboard.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/tests/io/test_clipboard.py b/pandas/tests/io/test_clipboard.py index 784920789254e..5fa381035d6f2 100644 --- a/pandas/tests/io/test_clipboard.py +++ b/pandas/tests/io/test_clipboard.py @@ -18,6 +18,7 @@ print("running clipboard tests") except (PyperclipException, RuntimeError): _DEPS_INSTALLED = 0 + print("NOT running clipboard tests") def build_kwargs(sep, excel): @@ -131,6 +132,7 @@ def check_round_trip_frame(self, data, excel=None, sep=None, # Test that default arguments copy as tab delimited def test_round_trip_frame(self, df): + print("running clipboard tests") self.check_round_trip_frame(df) # Test that explicit delimiters are respected From d8c6dc4377fcbb16be40ef5d4ccfe30800618988 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Thu, 16 May 2019 14:17:05 +0200 Subject: [PATCH 13/13] remove printing --- pandas/tests/io/test_clipboard.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/pandas/tests/io/test_clipboard.py b/pandas/tests/io/test_clipboard.py index 5fa381035d6f2..04223efd6eacb 100644 --- a/pandas/tests/io/test_clipboard.py +++ b/pandas/tests/io/test_clipboard.py @@ -15,10 +15,8 @@ try: DataFrame({'A': [1, 2]}).to_clipboard() _DEPS_INSTALLED = 1 - print("running clipboard tests") except (PyperclipException, RuntimeError): _DEPS_INSTALLED = 0 - print("NOT running clipboard tests") def build_kwargs(sep, excel): @@ -132,7 +130,6 @@ def check_round_trip_frame(self, data, excel=None, sep=None, # Test that default arguments copy as tab delimited def test_round_trip_frame(self, df): - print("running clipboard tests") self.check_round_trip_frame(df) # Test that explicit delimiters are respected