From 94358d4587e28999cfa306fe32db2a9fbbf61acd Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Wed, 31 Mar 2021 15:54:42 -0400 Subject: [PATCH 01/12] Add newsfragment --- newsfragments/3616.minor | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 newsfragments/3616.minor diff --git a/newsfragments/3616.minor b/newsfragments/3616.minor new file mode 100644 index 000000000..e69de29bb From aebbc52f067faf3176809af4736ed162f53db505 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Wed, 31 Mar 2021 15:54:14 -0400 Subject: [PATCH 02/12] Add Python 3.6 to GitHub Actions test matrix Let us send more coverage reports to coveralls.io --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39cd114d3..c3e789ede 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: - windows-latest python-version: - 2.7 + - 3.6 steps: From dd3b95a0bd039ec5b337780f1ecc1adf9040b8cb Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Wed, 31 Mar 2021 15:54:31 -0400 Subject: [PATCH 03/12] Add ubuntu-latest to GitHub Actions matrix --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3e789ede..c45ceaa63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,7 @@ jobs: os: - macos-latest - windows-latest + - ubuntu-latest python-version: - 2.7 - 3.6 From 1351a62ac4b48a4b9c2a05635c1a676151e63cfb Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Wed, 31 Mar 2021 16:13:41 -0400 Subject: [PATCH 04/12] Expect coverage tests to fail on Python 3.6 + Windows --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c45ceaa63..3e460e722 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,17 @@ jobs: - ubuntu-latest python-version: - 2.7 - - 3.6 + + # Also run coverage tests with Python 3.6. Expect failures on + # Windows, until we've had a chance to deal with them. + include: + - python-version: 3.6 + os: + - macos-latest + - ubuntu-latest + - python-version: 3.6 + os: windows-latest + experimental: true steps: From 2e67e070811f42825f24f238cd813bfe18a2dca0 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Wed, 31 Mar 2021 16:42:39 -0400 Subject: [PATCH 05/12] Just don't run coverage tests with Python 3.6 + Windows Another test matrix setup I tried is this: jobs: coverage: matrix: os: - macos-latest - windows-latest - ubuntu-latest python-version: - 2.7 include: - python-version: 3.6 os: - macos-latest - ubuntu-latest - python-version: 3.6 os: windows-latest experimental: true But that failed on Python 3.6 + macOS with a simple error message, and no further explanation: "This check failed". Huh? Might simply exclude Windows altogether, because that approach sort of worked in another experiment. --- .github/workflows/ci.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e460e722..dcbab9461 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,17 +23,13 @@ jobs: - ubuntu-latest python-version: - 2.7 - - # Also run coverage tests with Python 3.6. Expect failures on - # Windows, until we've had a chance to deal with them. - include: - - python-version: 3.6 - os: - - macos-latest - - ubuntu-latest + - 3.6 + exclude: + # Do not run coverage tests with Python 3.6 on Windows for + # now. They will fail. Dealing with them separately would + # be simpler. - python-version: 3.6 os: windows-latest - experimental: true steps: From d17f3d36c2e7712f67cceb8b73ebce5899bbb3d6 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Wed, 31 Mar 2021 17:57:44 -0400 Subject: [PATCH 06/12] Run coveralls verbosely --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcbab9461..4c12c7f7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,7 +117,7 @@ jobs: - name: "Report Coverage to Coveralls" run: | pip3 install --upgrade coveralls==3.0.1 - python3 -m coveralls + python3 -m coveralls --verbose env: # Some magic value required for some magic reason. GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" @@ -152,7 +152,7 @@ jobs: - name: "Indicate completion to coveralls.io" run: | pip3 install --upgrade coveralls==3.0.1 - python3 -m coveralls --finish + python3 -m coveralls --verbose --finish env: # Some magic value required for some magic reason. GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" From 2a620863230e170cd4fdd51e0c509953690ad0b7 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Wed, 31 Mar 2021 19:16:58 -0400 Subject: [PATCH 07/12] Turn down coveralls verbosity --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c12c7f7f..dcbab9461 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,7 +117,7 @@ jobs: - name: "Report Coverage to Coveralls" run: | pip3 install --upgrade coveralls==3.0.1 - python3 -m coveralls --verbose + python3 -m coveralls env: # Some magic value required for some magic reason. GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" @@ -152,7 +152,7 @@ jobs: - name: "Indicate completion to coveralls.io" run: | pip3 install --upgrade coveralls==3.0.1 - python3 -m coveralls --verbose --finish + python3 -m coveralls --finish env: # Some magic value required for some magic reason. GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" From 65fd5a4912550b6da4e6d0e07cdc3aa131e7a7ef Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 5 Apr 2021 14:52:31 -0400 Subject: [PATCH 08/12] Add a note about adding Windows to GitHub Actions test matrix --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcbab9461..e029104b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,9 @@ jobs: # Do not run coverage tests with Python 3.6 on Windows for # now. They will fail. Dealing with them separately would # be simpler. + # + # XXX: https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3669 + # should track the effort to add Windows to the test matrix. - python-version: 3.6 os: windows-latest From 1cddae4133b67eac6e3955184c41cb251d1ea60c Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 5 Apr 2021 18:34:33 -0400 Subject: [PATCH 09/12] Add newsfragment --- newsfragments/3669.minor | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 newsfragments/3669.minor diff --git a/newsfragments/3669.minor b/newsfragments/3669.minor new file mode 100644 index 000000000..e69de29bb From 5f7c6e4552c75f9989c87423803137c387733649 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 5 Apr 2021 18:34:48 -0400 Subject: [PATCH 10/12] Remove Windows exclusion --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e029104b3..c45ceaa63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,15 +24,6 @@ jobs: python-version: - 2.7 - 3.6 - exclude: - # Do not run coverage tests with Python 3.6 on Windows for - # now. They will fail. Dealing with them separately would - # be simpler. - # - # XXX: https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3669 - # should track the effort to add Windows to the test matrix. - - python-version: 3.6 - os: windows-latest steps: From d9446f9f06e8efdddce2774e979eab5b2b685905 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 5 Apr 2021 18:57:47 -0400 Subject: [PATCH 11/12] Remove deprecated `U` mode from open() call Under the right conditions (with newer Python 3.x versions), we will see this warning: setup.py:360: DeprecationWarning: 'U' mode is deprecated `U` is for `universal newline mode`. Docs for open() says this: 'U' mode is deprecated and will raise an exception in future versions of Python. It has no effect in Python 3. Use newline to control universal newlines mode. Off it goes. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index df770fadc..308ac0334 100644 --- a/setup.py +++ b/setup.py @@ -357,7 +357,7 @@ if version: setup(name="tahoe-lafs", # also set in __init__.py description='secure, decentralized, fault-tolerant file store', - long_description=open('README.rst', 'rU').read(), + long_description=open('README.rst', 'r').read(), author='the Tahoe-LAFS project', author_email='tahoe-dev@tahoe-lafs.org', url='https://tahoe-lafs.org/', From ae6e1e9e2fde6d8029e7c7e02d3973e345708254 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 5 Apr 2021 19:11:58 -0400 Subject: [PATCH 12/12] Use io.open() instead of builtin open() Windows does not like when we open README.rst using builtin open(): Traceback (most recent call last): File "setup.py", line 360, in long_description=open('README.rst', 'rU').read(), File "c:\hostedtoolcache\windows\python\3.6.8\x64\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 1720: character maps to --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 308ac0334..df917eb40 100644 --- a/setup.py +++ b/setup.py @@ -11,6 +11,7 @@ import sys # See the docs/about.rst file for licensing information. import os, subprocess, re +from io import open basedir = os.path.dirname(os.path.abspath(__file__)) @@ -357,7 +358,7 @@ if version: setup(name="tahoe-lafs", # also set in __init__.py description='secure, decentralized, fault-tolerant file store', - long_description=open('README.rst', 'r').read(), + long_description=open('README.rst', 'r', encoding='utf-8').read(), author='the Tahoe-LAFS project', author_email='tahoe-dev@tahoe-lafs.org', url='https://tahoe-lafs.org/',